import { KlineWithIndicators, TimelineData, PeriodType, MarketType, AdjustType, IndicatorType, KLineDataProvider, SDKOptions, RequestOptions, IndicatorOptions } from '../types'; interface UseKlineDataParams { symbol: string; market: MarketType; period: PeriodType; adjust: AdjustType; dataProvider?: KLineDataProvider; sdkOptions?: SDKOptions; requestOptions?: RequestOptions; indicatorOptions?: IndicatorOptions; indicators?: IndicatorType[]; } interface UseKlineDataResult { data: KlineWithIndicators[]; timelineData: TimelineData[]; /** 昨收价:仅分时周期有效,由数据源 provider 提供 */ prevClose: number | null; loading: boolean; loadingMore: boolean; error: Error | null; hasMore: boolean; refresh: () => Promise; loadMore: () => Promise; } /** 分钟级行情行(聚合为分时序列所需的最小字段集) */ interface MinuteRow { time: string; close: number | null; volume: number | null; amount: number | null; } /** * 把分钟级数据聚合为分时序列:VWAP 均价按交易日重置累计量。 */ export declare function aggregateMinuteToTimeline(rows: MinuteRow[]): TimelineData[]; /** * 只保留最近 N 个交易日的分钟数据(time 前 10 位为 YYYY-MM-DD)。 */ export declare function keepLastTradingDays(rows: T[], days: number): T[]; /** * K 线数据获取 Hook */ export declare function useKlineData(params: UseKlineDataParams): UseKlineDataResult; export {};