2025-09-24 07:56:53 +00:00
|
|
|
import * as plugins from '../../plugins.js';
|
|
|
|
|
2025-07-11 08:38:48 +00:00
|
|
|
export interface IStockPrice {
|
|
|
|
ticker: string;
|
|
|
|
price: number;
|
|
|
|
currency: string;
|
|
|
|
change: number;
|
|
|
|
changePercent: number;
|
|
|
|
previousClose: number;
|
|
|
|
timestamp: Date;
|
|
|
|
provider: string;
|
|
|
|
marketState: 'PRE' | 'REGULAR' | 'POST' | 'CLOSED';
|
|
|
|
exchange?: string;
|
|
|
|
exchangeName?: string;
|
|
|
|
}
|
2025-09-24 07:56:53 +00:00
|
|
|
type CheckStockPrice = plugins.tsclass.typeFest.IsEqual<
|
|
|
|
IStockPrice,
|
|
|
|
plugins.tsclass.finance.IStockPrice
|
|
|
|
>;
|
2025-07-11 08:38:48 +00:00
|
|
|
|
|
|
|
export interface IStockPriceError {
|
|
|
|
ticker: string;
|
|
|
|
error: string;
|
|
|
|
provider: string;
|
|
|
|
timestamp: Date;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IStockQuoteRequest {
|
|
|
|
ticker: string;
|
|
|
|
includeExtendedHours?: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IStockBatchQuoteRequest {
|
|
|
|
tickers: string[];
|
|
|
|
includeExtendedHours?: boolean;
|
2025-09-24 07:56:53 +00:00
|
|
|
}
|