BREAKING CHANGE(stocks): Unify stock provider API to discriminated IStockDataRequest and add company name/fullname enrichment
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
import type { IStockPrice, IStockQuoteRequest, IStockBatchQuoteRequest } from './stockprice.js';
|
||||
import type { IStockPrice, IStockDataRequest } from './stockprice.js';
|
||||
|
||||
export interface IStockProvider {
|
||||
name: string;
|
||||
priority: number;
|
||||
|
||||
fetchPrice(request: IStockQuoteRequest): Promise<IStockPrice>;
|
||||
fetchPrices(request: IStockBatchQuoteRequest): Promise<IStockPrice[]>;
|
||||
|
||||
fetchData(request: IStockDataRequest): Promise<IStockPrice | IStockPrice[]>;
|
||||
isAvailable(): Promise<boolean>;
|
||||
|
||||
|
||||
supportsMarket?(market: string): boolean;
|
||||
supportsTicker?(ticker: string): boolean;
|
||||
|
||||
|
||||
readonly requiresAuth: boolean;
|
||||
readonly rateLimit?: {
|
||||
requestsPerMinute: number;
|
||||
|
||||
Reference in New Issue
Block a user