stock-sdk 1.2.2 → 1.3.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,3 +1,44 @@
1
+ interface RequestClientOptions {
2
+ baseUrl?: string;
3
+ timeout?: number;
4
+ }
5
+
6
+ /**
7
+ * 响应解析器
8
+ */
9
+ /**
10
+ * 将 ArrayBuffer 解码为 GBK 字符串
11
+ * 使用原生 TextDecoder(浏览器和 Node.js 18+ 均支持 GBK)
12
+ */
13
+ declare function decodeGBK(data: ArrayBuffer): string;
14
+ /**
15
+ * 解析腾讯财经响应文本
16
+ * 按 `;` 拆行,提取 `v_xxx="..."` 里的内容,返回 { key, fields }[]
17
+ */
18
+ declare function parseResponse(text: string): {
19
+ key: string;
20
+ fields: string[];
21
+ }[];
22
+ /**
23
+ * 安全转换为数字,空值返回 0
24
+ */
25
+ declare function safeNumber(val: string | undefined): number;
26
+ /**
27
+ * 安全转换为数字,空值返回 null
28
+ */
29
+ declare function safeNumberOrNull(val: string | undefined): number | null;
30
+
31
+ /**
32
+ * 将数组分割成指定大小的块
33
+ */
34
+ declare function chunkArray<T>(array: T[], chunkSize: number): T[][];
35
+ /**
36
+ * 并发控制执行异步任务
37
+ * @param tasks 任务函数数组
38
+ * @param concurrency 最大并发数
39
+ */
40
+ declare function asyncPool<T>(tasks: (() => Promise<T>)[], concurrency: number): Promise<T[]>;
41
+
1
42
  /**
2
43
  * A 股 / 指数 全量行情
3
44
  */
@@ -162,18 +203,50 @@ interface HKQuote {
162
203
  raw: string[];
163
204
  }
164
205
  /**
165
- * 美股简要行情
206
+ * 美股行情
166
207
  */
167
208
  interface USQuote {
209
+ /** 市场标识 */
168
210
  marketId: string;
211
+ /** 名称 */
169
212
  name: string;
213
+ /** 股票代码 */
170
214
  code: string;
215
+ /** 最新价 */
171
216
  price: number;
217
+ /** 昨收 */
218
+ prevClose: number;
219
+ /** 今开 */
220
+ open: number;
221
+ /** 成交量 */
222
+ volume: number;
223
+ /** 时间 */
224
+ time: string;
225
+ /** 涨跌额 */
172
226
  change: number;
227
+ /** 涨跌幅% */
173
228
  changePercent: number;
174
- volume: number;
229
+ /** 最高 */
230
+ high: number;
231
+ /** 最低 */
232
+ low: number;
233
+ /** 成交额 */
175
234
  amount: number;
176
- marketCap: number | null;
235
+ /** 换手率% */
236
+ turnoverRate: number | null;
237
+ /** 市盈率 */
238
+ pe: number | null;
239
+ /** 振幅% */
240
+ amplitude: number | null;
241
+ /** 总市值(亿) */
242
+ totalMarketCap: number | null;
243
+ /** 市净率 */
244
+ pb: number | null;
245
+ /** 52周最高价 */
246
+ high52w: number | null;
247
+ /** 52周最低价 */
248
+ low52w: number | null;
249
+ /** 原始字段数组 */
177
250
  raw: string[];
178
251
  }
179
252
  /**
@@ -295,6 +368,41 @@ interface TodayTimelineResponse {
295
368
  /** 分时数据列表 */
296
369
  data: TodayTimeline[];
297
370
  }
371
+ /**
372
+ * 港股/美股历史 K 线
373
+ */
374
+ interface HKUSHistoryKline {
375
+ /** 日期 YYYY-MM-DD */
376
+ date: string;
377
+ /** 股票代码 */
378
+ code: string;
379
+ /** 股票名称 */
380
+ name: string;
381
+ /** 开盘价 */
382
+ open: number | null;
383
+ /** 收盘价 */
384
+ close: number | null;
385
+ /** 最高价 */
386
+ high: number | null;
387
+ /** 最低价 */
388
+ low: number | null;
389
+ /** 成交量 */
390
+ volume: number | null;
391
+ /** 成交额 */
392
+ amount: number | null;
393
+ /** 振幅% */
394
+ amplitude: number | null;
395
+ /** 涨跌幅% */
396
+ changePercent: number | null;
397
+ /** 涨跌额 */
398
+ change: number | null;
399
+ /** 换手率% */
400
+ turnoverRate: number | null;
401
+ }
402
+
403
+ /**
404
+ * 腾讯财经 - 批量操作
405
+ */
298
406
 
299
407
  /**
300
408
  * 获取全部 A 股行情的配置选项
@@ -307,123 +415,416 @@ interface GetAllAShareQuotesOptions {
307
415
  /** 进度回调函数 */
308
416
  onProgress?: (completed: number, total: number) => void;
309
417
  }
418
+
419
+ /**
420
+ * 东方财富 - A 股 K 线
421
+ */
422
+
423
+ interface HistoryKlineOptions {
424
+ /** K 线周期 */
425
+ period?: 'daily' | 'weekly' | 'monthly';
426
+ /** 复权类型 */
427
+ adjust?: '' | 'qfq' | 'hfq';
428
+ /** 开始日期 YYYYMMDD */
429
+ startDate?: string;
430
+ /** 结束日期 YYYYMMDD */
431
+ endDate?: string;
432
+ }
433
+ interface MinuteKlineOptions {
434
+ /** K 线周期 */
435
+ period?: '1' | '5' | '15' | '30' | '60';
436
+ /** 复权类型(仅 5/15/30/60 分钟有效) */
437
+ adjust?: '' | 'qfq' | 'hfq';
438
+ /** 开始时间 */
439
+ startDate?: string;
440
+ /** 结束时间 */
441
+ endDate?: string;
442
+ }
443
+
444
+ /**
445
+ * 东方财富 - 港股 K 线
446
+ */
447
+
448
+ interface HKKlineOptions {
449
+ /** K 线周期 */
450
+ period?: 'daily' | 'weekly' | 'monthly';
451
+ /** 复权类型 */
452
+ adjust?: '' | 'qfq' | 'hfq';
453
+ /** 开始日期 YYYYMMDD */
454
+ startDate?: string;
455
+ /** 结束日期 YYYYMMDD */
456
+ endDate?: string;
457
+ }
458
+
459
+ /**
460
+ * 东方财富 - 美股 K 线
461
+ */
462
+
463
+ interface USKlineOptions {
464
+ /** K 线周期 */
465
+ period?: 'daily' | 'weekly' | 'monthly';
466
+ /** 复权类型 */
467
+ adjust?: '' | 'qfq' | 'hfq';
468
+ /** 开始日期 YYYYMMDD */
469
+ startDate?: string;
470
+ /** 结束日期 YYYYMMDD */
471
+ endDate?: string;
472
+ }
473
+
474
+ interface OHLCV {
475
+ open: number | null;
476
+ high: number | null;
477
+ low: number | null;
478
+ close: number | null;
479
+ volume?: number | null;
480
+ }
481
+ interface MAOptions {
482
+ /** 均线周期数组,默认 [5, 10, 20, 30, 60, 120, 250] */
483
+ periods?: number[];
484
+ /** 均线类型:'sma'(简单) | 'ema'(指数) | 'wma'(加权),默认 'sma' */
485
+ type?: 'sma' | 'ema' | 'wma';
486
+ }
487
+ interface MACDOptions {
488
+ /** 短期 EMA 周期,默认 12 */
489
+ short?: number;
490
+ /** 长期 EMA 周期,默认 26 */
491
+ long?: number;
492
+ /** 信号线 EMA 周期,默认 9 */
493
+ signal?: number;
494
+ }
495
+ interface BOLLOptions {
496
+ /** 均线周期,默认 20 */
497
+ period?: number;
498
+ /** 标准差倍数,默认 2 */
499
+ stdDev?: number;
500
+ }
501
+ interface KDJOptions {
502
+ /** RSV 周期,默认 9 */
503
+ period?: number;
504
+ /** K 值平滑周期,默认 3 */
505
+ kPeriod?: number;
506
+ /** D 值平滑周期,默认 3 */
507
+ dPeriod?: number;
508
+ }
509
+ interface RSIOptions {
510
+ /** RSI 周期数组,默认 [6, 12, 24] */
511
+ periods?: number[];
512
+ }
513
+ interface WROptions {
514
+ /** WR 周期数组,默认 [6, 10] */
515
+ periods?: number[];
516
+ }
517
+ interface BIASOptions {
518
+ /** BIAS 周期数组,默认 [6, 12, 24] */
519
+ periods?: number[];
520
+ }
521
+ interface CCIOptions {
522
+ /** CCI 周期,默认 14 */
523
+ period?: number;
524
+ }
525
+ interface ATROptions {
526
+ /** ATR 周期,默认 14 */
527
+ period?: number;
528
+ }
529
+ interface IndicatorOptions {
530
+ ma?: MAOptions | boolean;
531
+ macd?: MACDOptions | boolean;
532
+ boll?: BOLLOptions | boolean;
533
+ kdj?: KDJOptions | boolean;
534
+ rsi?: RSIOptions | boolean;
535
+ wr?: WROptions | boolean;
536
+ bias?: BIASOptions | boolean;
537
+ cci?: CCIOptions | boolean;
538
+ atr?: ATROptions | boolean;
539
+ }
540
+ interface MAResult {
541
+ [key: string]: number | null;
542
+ }
543
+ interface MACDResult {
544
+ dif: number | null;
545
+ dea: number | null;
546
+ macd: number | null;
547
+ }
548
+ interface BOLLResult {
549
+ mid: number | null;
550
+ upper: number | null;
551
+ lower: number | null;
552
+ bandwidth: number | null;
553
+ }
554
+ interface KDJResult {
555
+ k: number | null;
556
+ d: number | null;
557
+ j: number | null;
558
+ }
559
+ interface RSIResult {
560
+ [key: string]: number | null;
561
+ }
562
+ interface WRResult {
563
+ [key: string]: number | null;
564
+ }
565
+ interface BIASResult {
566
+ [key: string]: number | null;
567
+ }
568
+ interface CCIResult {
569
+ cci: number | null;
570
+ }
571
+ interface ATRResult {
572
+ /** 真实波幅 */
573
+ tr: number | null;
574
+ /** 平均真实波幅 */
575
+ atr: number | null;
576
+ }
577
+
578
+ /**
579
+ * 计算简单移动平均线 SMA
580
+ */
581
+ declare function calcSMA(data: (number | null)[], period: number): (number | null)[];
582
+ /**
583
+ * 计算指数移动平均线 EMA
584
+ * 使用前 N 天的 SMA 作为 EMA 初始值,避免首日偏差
585
+ */
586
+ declare function calcEMA(data: (number | null)[], period: number): (number | null)[];
587
+ /**
588
+ * 计算加权移动平均线 WMA
589
+ */
590
+ declare function calcWMA(data: (number | null)[], period: number): (number | null)[];
591
+ /**
592
+ * 批量计算均线
593
+ */
594
+ declare function calcMA(closes: (number | null)[], options?: MAOptions): MAResult[];
595
+
596
+ /**
597
+ * 计算 MACD 指标
598
+ */
599
+ declare function calcMACD(closes: (number | null)[], options?: MACDOptions): MACDResult[];
600
+
601
+ /**
602
+ * 计算布林带
603
+ */
604
+ declare function calcBOLL(closes: (number | null)[], options?: BOLLOptions): BOLLResult[];
605
+
606
+ /**
607
+ * 计算 KDJ 指标
608
+ */
609
+ declare function calcKDJ(data: OHLCV[], options?: KDJOptions): KDJResult[];
610
+
611
+ /**
612
+ * 计算 RSI 指标
613
+ */
614
+ declare function calcRSI(closes: (number | null)[], options?: RSIOptions): RSIResult[];
615
+
616
+ /**
617
+ * 计算威廉指标 WR
618
+ */
619
+ declare function calcWR(data: OHLCV[], options?: WROptions): WRResult[];
620
+
621
+ /**
622
+ * 计算乖离率 BIAS
623
+ *
624
+ * 公式:BIAS = (收盘价 - MA) / MA × 100
625
+ *
626
+ * 乖离率表示股价与移动平均线之间的偏离程度
627
+ * - 正乖离:股价在均线上方,可能超买
628
+ * - 负乖离:股价在均线下方,可能超卖
629
+ */
630
+ declare function calcBIAS(closes: (number | null)[], options?: BIASOptions): BIASResult[];
631
+
632
+ /**
633
+ * 计算商品通道指数 CCI
634
+ *
635
+ * 公式:
636
+ * TP(典型价格)= (最高价 + 最低价 + 收盘价) / 3
637
+ * MA = TP 的 N 日简单移动平均
638
+ * MD = TP 与 MA 的平均绝对偏差
639
+ * CCI = (TP - MA) / (0.015 × MD)
640
+ *
641
+ * CCI 用于判断超买超卖:
642
+ * - CCI > 100:超买区域
643
+ * - CCI < -100:超卖区域
644
+ * - CCI 在 -100 ~ 100 之间:正常区域
645
+ */
646
+ declare function calcCCI(data: OHLCV[], options?: CCIOptions): CCIResult[];
647
+
648
+ /**
649
+ * 计算平均真实波幅 ATR (Average True Range)
650
+ *
651
+ * 公式:
652
+ * TR(真实波幅)= max(
653
+ * 最高价 - 最低价,
654
+ * |最高价 - 昨收|,
655
+ * |最低价 - 昨收|
656
+ * )
657
+ * ATR = TR 的 N 日移动平均
658
+ *
659
+ * ATR 用于衡量市场波动性:
660
+ * - ATR 越大,市场波动越大
661
+ * - ATR 越小,市场波动越小
662
+ * - 常用于止损位设置(如 2 倍 ATR)
663
+ */
664
+ declare function calcATR(data: OHLCV[], options?: ATROptions): ATRResult[];
665
+
666
+ /**
667
+ * 带技术指标的 K 线数据
668
+ */
669
+ type KlineWithIndicators<T extends HistoryKline | HKUSHistoryKline> = T & {
670
+ ma?: MAResult;
671
+ macd?: MACDResult;
672
+ boll?: BOLLResult;
673
+ kdj?: KDJResult;
674
+ rsi?: RSIResult;
675
+ wr?: WRResult;
676
+ bias?: BIASResult;
677
+ cci?: CCIResult;
678
+ atr?: ATRResult;
679
+ };
680
+ /**
681
+ * 为 K 线数据添加技术指标
682
+ */
683
+ declare function addIndicators<T extends HistoryKline | HKUSHistoryKline>(klines: T[], options?: IndicatorOptions): KlineWithIndicators<T>[];
684
+
685
+ /**
686
+ * Stock SDK - 门面类
687
+ * 统一对外接口,组合各模块
688
+ */
689
+
690
+ /**
691
+ * 市场类型
692
+ */
693
+ type MarketType = 'A' | 'HK' | 'US';
310
694
  declare class StockSDK {
311
- private baseUrl;
312
- private timeout;
313
- constructor(options?: {
314
- baseUrl?: string;
315
- timeout?: number;
316
- });
317
- private request;
695
+ private client;
696
+ constructor(options?: RequestClientOptions);
318
697
  /**
319
698
  * 获取 A 股 / 指数 全量行情
320
- * @param codes ['sz000858', 'sh600000']
699
+ * @param codes 股票代码数组,如 ['sz000858', 'sh600000']
321
700
  */
322
701
  getFullQuotes(codes: string[]): Promise<FullQuote[]>;
323
- private parseFullQuote;
324
702
  /**
325
703
  * 获取简要行情
326
- * @param codes ['sz000858', 'sh000001'](自动添加 s_ 前缀)
704
+ * @param codes 股票代码数组,如 ['sz000858', 'sh000001']
327
705
  */
328
706
  getSimpleQuotes(codes: string[]): Promise<SimpleQuote[]>;
329
- private parseSimpleQuote;
330
- /**
331
- * 获取资金流向
332
- * @param codes 股票代码数组,如 ['sz000858', 'sh600000'](自动添加 ff_ 前缀)
333
- */
334
- getFundFlow(codes: string[]): Promise<FundFlow[]>;
335
- private parseFundFlow;
336
- /**
337
- * 获取盘口大单占比
338
- * @param codes 股票代码数组,如 ['sz000858', 'sh600000'](自动添加 s_pk 前缀)
339
- */
340
- getPanelLargeOrder(codes: string[]): Promise<PanelLargeOrder[]>;
341
- private parsePanelLargeOrder;
342
707
  /**
343
708
  * 获取港股扩展行情
344
- * @param codes 港股代码数组,如 ['09988', '00700'](自动添加 r_hk 前缀)
709
+ * @param codes 港股代码数组,如 ['09988', '00700']
345
710
  */
346
711
  getHKQuotes(codes: string[]): Promise<HKQuote[]>;
347
- private parseHKQuote;
348
712
  /**
349
713
  * 获取美股简要行情
350
- * @param codes 美股代码数组,如 ['BABA', 'AAPL'](自动添加 s_us 前缀)
714
+ * @param codes 美股代码数组,如 ['BABA', 'AAPL']
351
715
  */
352
716
  getUSQuotes(codes: string[]): Promise<USQuote[]>;
353
- private parseUSQuote;
354
717
  /**
355
718
  * 获取公募基金行情
356
- * @param codes 基金代码数组,如 ['000001', '110011'](自动添加 jj 前缀)
719
+ * @param codes 基金代码数组,如 ['000001', '110011']
357
720
  */
358
721
  getFundQuotes(codes: string[]): Promise<FundQuote[]>;
359
- private parseFundQuote;
360
722
  /**
361
- * 批量混合查询,返回原始解析结果(key + fields)
362
- * @param params 'sz000858,s_sh000001,jj000001'
723
+ * 获取资金流向
724
+ * @param codes 股票代码数组,如 ['sz000858', 'sh600000']
363
725
  */
364
- batchRaw(params: string): Promise<{
365
- key: string;
366
- fields: string[];
367
- }[]>;
726
+ getFundFlow(codes: string[]): Promise<FundFlow[]>;
727
+ /**
728
+ * 获取盘口大单占比
729
+ * @param codes 股票代码数组,如 ['sz000858', 'sh600000']
730
+ */
731
+ getPanelLargeOrder(codes: string[]): Promise<PanelLargeOrder[]>;
368
732
  /**
369
733
  * 获取当日分时走势数据
370
734
  * @param code 股票代码,如 'sz000001' 或 'sh600000'
371
- * @returns 当日分时数据
372
735
  */
373
736
  getTodayTimeline(code: string): Promise<TodayTimelineResponse>;
737
+ /**
738
+ * 获取 A 股历史 K 线(日/周/月)
739
+ */
740
+ getHistoryKline(symbol: string, options?: HistoryKlineOptions): Promise<HistoryKline[]>;
741
+ /**
742
+ * 获取 A 股分钟 K 线或分时数据
743
+ */
744
+ getMinuteKline(symbol: string, options?: MinuteKlineOptions): Promise<MinuteTimeline[] | MinuteKline[]>;
745
+ /**
746
+ * 获取港股历史 K 线(日/周/月)
747
+ */
748
+ getHKHistoryKline(symbol: string, options?: HKKlineOptions): Promise<HKUSHistoryKline[]>;
749
+ /**
750
+ * 获取美股历史 K 线(日/周/月)
751
+ */
752
+ getUSHistoryKline(symbol: string, options?: USKlineOptions): Promise<HKUSHistoryKline[]>;
374
753
  /**
375
754
  * 从远程获取 A 股代码列表
376
755
  * @param includeExchange 是否包含交易所前缀(如 sh、sz、bj),默认 true
377
- * @returns A 股代码数组
378
756
  */
379
757
  getAShareCodeList(includeExchange?: boolean): Promise<string[]>;
380
758
  /**
381
- * 获取全部 A 股实时行情(从远程获取股票代码列表)
382
- * @param options 配置选项
383
- * @param options.batchSize 单次请求的股票数量,默认 500
384
- * @param options.concurrency 最大并发请求数,默认 7
385
- * @param options.onProgress 进度回调函数
386
- * @returns 全部 A 股的实时行情数据
759
+ * 从远程获取美股代码列表
760
+ * @param includeMarket 是否包含市场前缀(如 105.、106.),默认 true
761
+ */
762
+ getUSCodeList(includeMarket?: boolean): Promise<string[]>;
763
+ /**
764
+ * 从远程获取港股代码列表
765
+ */
766
+ getHKCodeList(): Promise<string[]>;
767
+ /**
768
+ * 获取全部 A 股实时行情
387
769
  */
388
770
  getAllAShareQuotes(options?: GetAllAShareQuotesOptions): Promise<FullQuote[]>;
389
771
  /**
390
- * 获取全部 A 股实时行情(使用自定义股票代码列表)
391
- * @param codes 股票代码列表
392
- * @param options 配置选项
772
+ * 获取全部港股实时行情
773
+ */
774
+ getAllHKShareQuotes(options?: GetAllAShareQuotesOptions): Promise<HKQuote[]>;
775
+ /**
776
+ * 获取全部美股实时行情
777
+ */
778
+ getAllUSShareQuotes(options?: GetAllAShareQuotesOptions): Promise<USQuote[]>;
779
+ /**
780
+ * 获取全部股票实时行情(使用自定义股票代码列表)
393
781
  */
394
782
  getAllQuotesByCodes(codes: string[], options?: GetAllAShareQuotesOptions): Promise<FullQuote[]>;
395
783
  /**
396
- * 获取 A 股历史 K 线(日/周/月)
397
- * @param symbol 股票代码(6位纯数字,如 '000001',或带前缀如 'sz000001')
398
- * @param options 配置选项
399
- * @param options.period K线周期:'daily' | 'weekly' | 'monthly',默认 'daily'
400
- * @param options.adjust 复权类型:'' (不复权) | 'qfq' (前复权) | 'hfq' (后复权),默认 'hfq'
401
- * @param options.startDate 开始日期 YYYYMMDD,默认 '19700101'
402
- * @param options.endDate 结束日期 YYYYMMDD,默认 '20500101'
403
- * @returns 历史 K 线数据
784
+ * 批量混合查询,返回原始解析结果(key + fields)
785
+ * @param params 'sz000858,s_sh000001,jj000001'
404
786
  */
405
- getHistoryKline(symbol: string, options?: {
406
- period?: 'daily' | 'weekly' | 'monthly';
407
- adjust?: '' | 'qfq' | 'hfq';
408
- startDate?: string;
409
- endDate?: string;
410
- }): Promise<HistoryKline[]>;
787
+ batchRaw(params: string): Promise<{
788
+ key: string;
789
+ fields: string[];
790
+ }[]>;
411
791
  /**
412
- * 获取 A 股分钟 K 线或分时数据
413
- * @param symbol 股票代码(6位纯数字,如 '000001',或带前缀如 'sz000001')
414
- * @param options 配置选项
415
- * @param options.period K线周期:'1' (分时) | '5' | '15' | '30' | '60',默认 '1'
416
- * @param options.adjust 复权类型(仅 5/15/30/60 分钟有效):'' | 'qfq' | 'hfq',默认 'hfq'
417
- * @param options.startDate 开始时间 'YYYY-MM-DD HH:mm:ss'
418
- * @param options.endDate 结束时间 'YYYY-MM-DD HH:mm:ss'
419
- * @returns 分钟 K 线或分时数据
792
+ * 市场类型识别
793
+ */
794
+ private detectMarket;
795
+ /**
796
+ * 安全获取数组最大值
797
+ */
798
+ private safeMax;
799
+ /**
800
+ * 计算各指标所需的最大前置天数
420
801
  */
421
- getMinuteKline(symbol: string, options?: {
422
- period?: '1' | '5' | '15' | '30' | '60';
802
+ private calcRequiredLookback;
803
+ /**
804
+ * 计算实际请求的开始日期
805
+ */
806
+ private calcActualStartDate;
807
+ /**
808
+ * 日期字符串转时间戳
809
+ */
810
+ private dateToTimestamp;
811
+ /**
812
+ * 获取带技术指标的历史 K 线
813
+ */
814
+ getKlineWithIndicators(symbol: string, options?: {
815
+ /** 市场类型,不传则自动识别 */
816
+ market?: MarketType;
817
+ /** K 线周期 */
818
+ period?: 'daily' | 'weekly' | 'monthly';
819
+ /** 复权类型 */
423
820
  adjust?: '' | 'qfq' | 'hfq';
821
+ /** 开始日期 YYYYMMDD */
424
822
  startDate?: string;
823
+ /** 结束日期 YYYYMMDD */
425
824
  endDate?: string;
426
- }): Promise<MinuteTimeline[] | MinuteKline[]>;
825
+ /** 技术指标配置 */
826
+ indicators?: IndicatorOptions;
827
+ }): Promise<KlineWithIndicators<HistoryKline | HKUSHistoryKline>[]>;
427
828
  }
428
829
 
429
- export { type FullQuote, type FundFlow, type FundQuote, type GetAllAShareQuotesOptions, type HKQuote, type HistoryKline, type MinuteKline, type MinuteTimeline, type PanelLargeOrder, type SimpleQuote, StockSDK, type TodayTimeline, type TodayTimelineResponse, type USQuote, StockSDK as default };
830
+ export { type ATROptions, type BIASOptions, type BOLLOptions, type CCIOptions, type FullQuote, type FundFlow, type FundQuote, type GetAllAShareQuotesOptions, type HKQuote, type HKUSHistoryKline, type HistoryKline, type IndicatorOptions, type KDJOptions, type KlineWithIndicators, type MACDOptions, type MAOptions, type MarketType, type MinuteKline, type MinuteTimeline, type PanelLargeOrder, type RSIOptions, type SimpleQuote, StockSDK, type TodayTimeline, type TodayTimelineResponse, type USQuote, type WROptions, addIndicators, asyncPool, calcATR, calcBIAS, calcBOLL, calcCCI, calcEMA, calcKDJ, calcMA, calcMACD, calcRSI, calcSMA, calcWMA, calcWR, chunkArray, decodeGBK, StockSDK as default, parseResponse, safeNumber, safeNumberOrNull };