stock-sdk 1.9.2 → 1.10.0
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/README.md +29 -13
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +584 -3
- package/dist/index.d.ts +584 -3
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -139,6 +139,17 @@ interface CircuitBreakerOptions {
|
|
|
139
139
|
onStateChange?: (from: CircuitState, to: CircuitState) => void;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
+
interface HostHealthState {
|
|
143
|
+
host: string;
|
|
144
|
+
failureCount: number;
|
|
145
|
+
successCount: number;
|
|
146
|
+
cooldownUntil: number;
|
|
147
|
+
lastFailureAt: number;
|
|
148
|
+
lastErrorCode?: SdkErrorCode;
|
|
149
|
+
}
|
|
150
|
+
interface HostHealthStats extends HostHealthState {
|
|
151
|
+
}
|
|
152
|
+
|
|
142
153
|
/**
|
|
143
154
|
* 请求客户端配置选项
|
|
144
155
|
*/
|
|
@@ -162,6 +173,64 @@ interface RequestClientOptions {
|
|
|
162
173
|
*/
|
|
163
174
|
providerPolicies?: Partial<Record<ProviderName, ProviderRequestPolicy>>;
|
|
164
175
|
}
|
|
176
|
+
/**
|
|
177
|
+
* GET 请求选项
|
|
178
|
+
*/
|
|
179
|
+
interface GetOptions {
|
|
180
|
+
responseType?: 'text' | 'json' | 'arraybuffer';
|
|
181
|
+
provider?: ProviderName;
|
|
182
|
+
}
|
|
183
|
+
declare class RequestClient {
|
|
184
|
+
private readonly baseUrl;
|
|
185
|
+
private readonly defaultPolicy;
|
|
186
|
+
private readonly providerPolicies;
|
|
187
|
+
private readonly runtimeStates;
|
|
188
|
+
private readonly fallbackManager;
|
|
189
|
+
constructor(options?: RequestClientOptions);
|
|
190
|
+
/**
|
|
191
|
+
* 获取 provider 运行时状态,按需初始化限流器和熔断器。
|
|
192
|
+
*/
|
|
193
|
+
private getProviderState;
|
|
194
|
+
/**
|
|
195
|
+
* 获取默认超时时间
|
|
196
|
+
*/
|
|
197
|
+
getTimeout(): number;
|
|
198
|
+
/**
|
|
199
|
+
* 获取 host 健康状态
|
|
200
|
+
*/
|
|
201
|
+
getHostHealth(provider?: ProviderName): HostHealthStats[];
|
|
202
|
+
/**
|
|
203
|
+
* 计算指数退避延迟时间
|
|
204
|
+
*/
|
|
205
|
+
private calculateDelay;
|
|
206
|
+
/**
|
|
207
|
+
* 休眠指定毫秒
|
|
208
|
+
*/
|
|
209
|
+
private sleep;
|
|
210
|
+
/**
|
|
211
|
+
* 判断是否应该重试
|
|
212
|
+
*/
|
|
213
|
+
private shouldRetry;
|
|
214
|
+
/**
|
|
215
|
+
* 单 host 带重试的请求执行器
|
|
216
|
+
*/
|
|
217
|
+
private executeWithRetry;
|
|
218
|
+
/**
|
|
219
|
+
* 执行单次 HTTP 请求
|
|
220
|
+
*/
|
|
221
|
+
private performRequest;
|
|
222
|
+
/**
|
|
223
|
+
* 发送 GET 请求(带自动重试、限流、熔断和 fallback)
|
|
224
|
+
*/
|
|
225
|
+
get<T = string>(url: string, options?: GetOptions): Promise<T>;
|
|
226
|
+
/**
|
|
227
|
+
* 腾讯财经专用请求(GBK 解码,带自动重试)
|
|
228
|
+
*/
|
|
229
|
+
getTencentQuote(params: string): Promise<{
|
|
230
|
+
key: string;
|
|
231
|
+
fields: string[];
|
|
232
|
+
}[]>;
|
|
233
|
+
}
|
|
165
234
|
|
|
166
235
|
/**
|
|
167
236
|
* 响应解析器
|
|
@@ -233,6 +302,93 @@ interface JsonpOptions {
|
|
|
233
302
|
*/
|
|
234
303
|
declare function jsonpRequest<T = unknown>(url: string, options?: JsonpOptions): Promise<T>;
|
|
235
304
|
|
|
305
|
+
/**
|
|
306
|
+
* JS 变量声明文件双端解析工具
|
|
307
|
+
*
|
|
308
|
+
* 解决:东方财富等数据源返回的不是 JSONP 而是 `var X = ...; var Y = ...;` 形式
|
|
309
|
+
* 的 JS 变量声明文件(如 pingzhongdata、funddataIndex_Interface),且响应通常没有
|
|
310
|
+
* CORS 头,浏览器侧无法用 fetch 直接拿到。本工具双端实现:
|
|
311
|
+
*
|
|
312
|
+
* - 浏览器端:动态 `<script>` 注入,从 `window` 读全局变量,读完立即删除
|
|
313
|
+
* - Node.js 端:fetch 文本 + 括号配对扫描 + `JSON.parse`;若传入 `client`,走
|
|
314
|
+
* `RequestClient` 享受 SDK 重试 / 限流 / 熔断 / fallback host 治理
|
|
315
|
+
*
|
|
316
|
+
* 仅支持值是合法 JSON 字面量的变量(数组 / 对象 / 数字 / 字符串 / 布尔 / null)。
|
|
317
|
+
*
|
|
318
|
+
* 浏览器端并发安全:内部用 `withScriptMutex` 做全局串行化(key 为
|
|
319
|
+
* `BROWSER_JSVARS_MUTEX_KEY`),任意两个浏览器 fetchJsVars 调用都按提交顺序
|
|
320
|
+
* 串行执行,避免不同接口的全局变量名集合交集(如 pingzhongdata 系列共享
|
|
321
|
+
* `fS_code` / `fS_name`)导致的相互覆盖。
|
|
322
|
+
*
|
|
323
|
+
* ⚠️ 浏览器端限制:
|
|
324
|
+
* - 通过 `<script>` 注入加载,`options.client` / `options.headers` 都不会生效;
|
|
325
|
+
* SDK 治理(retry / rateLimit / circuitBreaker / providerPolicies)仅 Node 端生效
|
|
326
|
+
* - 数据源若把字面量改成 JS 表达式(如带函数引用、未引号 key),解析失败的字段将
|
|
327
|
+
* 返回 `undefined`,但不会抛错
|
|
328
|
+
*/
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* 浏览器端所有 fetchJsVars 调用共享的 mutex 键。
|
|
332
|
+
*
|
|
333
|
+
* 用全局键(而非按变量名集合算 key)的原因:不同接口的变量名集合常有交集
|
|
334
|
+
* (如 pingzhongdata 的 `fS_code` / `fS_name` 同时被多个接口写入)。按集合
|
|
335
|
+
* 分组的 key 会让"集合不同但有交集"的并发请求互相覆盖全局变量。
|
|
336
|
+
*
|
|
337
|
+
* 代价:浏览器端任意两个 fetchJsVars 调用都串行;收益:彻底消除变量交集漏洞。
|
|
338
|
+
*
|
|
339
|
+
* Node 端不走 mutex,不受影响。
|
|
340
|
+
*/
|
|
341
|
+
declare const BROWSER_JSVARS_MUTEX_KEY = "jsVars";
|
|
342
|
+
interface FetchJsVarsOptions {
|
|
343
|
+
/** 超时毫秒数,默认 15000(仅在裸 fetch 路径生效;走 client 时由 client 治理) */
|
|
344
|
+
timeout?: number;
|
|
345
|
+
/** 额外的 fetch headers(仅 Node 端裸 fetch 路径生效;client 路径请通过 client 配置) */
|
|
346
|
+
headers?: Record<string, string>;
|
|
347
|
+
/**
|
|
348
|
+
* 可选的 SDK 请求客户端。
|
|
349
|
+
* - 传入:Node 端走 `client.get<string>(url, { responseType: 'text' })`,享受 SDK 重试 /
|
|
350
|
+
* 限流 / 熔断 / fallback host / providerPolicies 全套治理
|
|
351
|
+
* - 不传:Node 端用裸 `fetch`(兼容直接用工具的高级用户)
|
|
352
|
+
* - 浏览器端始终走 `<script>` 注入,此参数不生效
|
|
353
|
+
*/
|
|
354
|
+
client?: RequestClient;
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* 从一个 JS 变量声明文件中提取指定变量的值。
|
|
358
|
+
*
|
|
359
|
+
* @param url 目标 URL
|
|
360
|
+
* @param varNames 要提取的变量名列表
|
|
361
|
+
* @param options 选项(timeout / headers)
|
|
362
|
+
* @returns 一个对象;键是变量名,值是解析后的 JS 值;变量不存在或解析失败时键不出现
|
|
363
|
+
*/
|
|
364
|
+
declare function fetchJsVars<T extends object>(url: string, varNames: (keyof T & string)[], options?: FetchJsVarsOptions): Promise<Partial<T>>;
|
|
365
|
+
/**
|
|
366
|
+
* 从给定 JS 文本中提取多个变量(暴露用于单测 / 高级用户)。
|
|
367
|
+
*/
|
|
368
|
+
declare function parseJsVars<T extends object>(text: string, varNames: (keyof T & string)[]): Partial<T>;
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* 浏览器全局名级互斥锁
|
|
372
|
+
*
|
|
373
|
+
* 用于"通过 `<script>` 注入读固定全局变量 / 固定 callback 名"这种本质上无法并发的
|
|
374
|
+
* 接口(典型:东方财富 pingzhongdata.js 的固定 `Data_netWorthTrend` 等变量,
|
|
375
|
+
* 天天基金 fundgz 的固定 `jsonpgz` callback)。
|
|
376
|
+
*
|
|
377
|
+
* 工作方式:每个 key 维护一个 promise 队列,同 key 的请求串行执行;不同 key
|
|
378
|
+
* 的请求互不阻塞。前一次任务无论成功失败都会释放队列,不阻断后续。
|
|
379
|
+
*
|
|
380
|
+
* 注意:这是浏览器端的并发安全兜底。Node 端不存在全局污染问题(用 fetch + 文本
|
|
381
|
+
* 解析),不需要 mutex。
|
|
382
|
+
*/
|
|
383
|
+
/**
|
|
384
|
+
* 在 `key` 对应的串行队列中执行 `fn`。
|
|
385
|
+
*
|
|
386
|
+
* @param key 互斥分组键(通常是固定全局变量名集合或 callback 名)
|
|
387
|
+
* @param fn 需要串行执行的异步任务
|
|
388
|
+
* @returns `fn` 的返回值(透传 resolve / reject)
|
|
389
|
+
*/
|
|
390
|
+
declare function withScriptMutex<T>(key: string, fn: () => Promise<T>): Promise<T>;
|
|
391
|
+
|
|
236
392
|
/**
|
|
237
393
|
* 时间元信息工具
|
|
238
394
|
*
|
|
@@ -258,6 +414,59 @@ declare const MARKET_TZ: {
|
|
|
258
414
|
readonly US: "America/New_York";
|
|
259
415
|
};
|
|
260
416
|
type MarketTz = (typeof MARKET_TZ)[keyof typeof MARKET_TZ];
|
|
417
|
+
/**
|
|
418
|
+
* 时间元信息:与原始 `time`/`date` 字符串配套使用。
|
|
419
|
+
*/
|
|
420
|
+
interface TimeMeta {
|
|
421
|
+
/** UTC unix 毫秒时间戳。原始字符串无法解析时为 `NaN`。 */
|
|
422
|
+
timestamp: number;
|
|
423
|
+
/** 原始字符串对应的市场时区 (IANA name)。 */
|
|
424
|
+
tz: MarketTz;
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* 解析"市场本地时间字符串"为 UTC unix ms。失败返回 `NaN`。
|
|
428
|
+
*
|
|
429
|
+
* 支持的格式:
|
|
430
|
+
* - `'YYYY-MM-DD HH:mm:ss'` / `'YYYY-MM-DDTHH:mm:ss'`
|
|
431
|
+
* - `'YYYY-MM-DD HH:mm'`
|
|
432
|
+
* - `'YYYY-MM-DD'` (按当日 00:00 计)
|
|
433
|
+
* - `'yyyyMMddHHmmss'` (腾讯接口 14 位无分隔)
|
|
434
|
+
* - `'yyyyMMdd'` (8 位日期)
|
|
435
|
+
*
|
|
436
|
+
* @param local 市场本地时间字符串
|
|
437
|
+
* @param tz 市场时区 (使用 `MARKET_TZ`)
|
|
438
|
+
*/
|
|
439
|
+
declare function parseMarketTime(local: string, tz: MarketTz): number;
|
|
440
|
+
/**
|
|
441
|
+
* 构造 `TimeMeta`。原始字符串无法解析时 `timestamp` 为 `NaN`。
|
|
442
|
+
*
|
|
443
|
+
* @param local 市场本地时间字符串
|
|
444
|
+
* @param tz 市场时区
|
|
445
|
+
*/
|
|
446
|
+
declare function buildTimeMeta(local: string, tz: MarketTz): TimeMeta;
|
|
447
|
+
/**
|
|
448
|
+
* 将"基础日期 (YYYY-MM-DD) + HH:mm 时间片"组合后构造 `TimeMeta`。
|
|
449
|
+
*
|
|
450
|
+
* 用于"当日分时"等只返回 `HH:mm` 的接口。
|
|
451
|
+
*
|
|
452
|
+
* @param baseDate 形如 `'2024-05-12'` 的日期字符串
|
|
453
|
+
* @param hhmm 形如 `'09:30'` 或 `'09:30:00'` 的时间片
|
|
454
|
+
* @param tz 市场时区
|
|
455
|
+
*/
|
|
456
|
+
declare function buildTimeMetaFromDateAndTime(baseDate: string, hhmm: string, tz: MarketTz): TimeMeta;
|
|
457
|
+
/**
|
|
458
|
+
* 把 UTC 毫秒时间戳格式化为指定时区的 `YYYY-MM-DD HH:mm` 本地壁钟字符串。
|
|
459
|
+
*
|
|
460
|
+
* 与 {@link parseMarketTime} 互逆:`formatInTz(parseMarketTime(s, tz), tz) === s`
|
|
461
|
+
* (只要 `s` 是 `YYYY-MM-DD HH:mm` 格式)。
|
|
462
|
+
*
|
|
463
|
+
* 用途:当上游接口返回的时间字符串使用 A 处时区表示,但业务需要在 B 处时区显示时
|
|
464
|
+
* (典型:东方财富的美股分时返回北京时间字符串,但用户需要美东时间),先用
|
|
465
|
+
* `parseMarketTime(s, MARKET_TZ.CN)` 拿到正确 epoch,再用本函数转成目标时区字符串。
|
|
466
|
+
*
|
|
467
|
+
* 使用 `Intl.DateTimeFormat` 处理夏令时;epoch 为 `NaN` 时返回空串。
|
|
468
|
+
*/
|
|
469
|
+
declare function formatInTz(epoch: number, tz: MarketTz): string;
|
|
261
470
|
|
|
262
471
|
/**
|
|
263
472
|
* A 股 / 指数 全量行情
|
|
@@ -711,6 +920,48 @@ interface USHistoryKline extends ForeignHistoryKlineBase {
|
|
|
711
920
|
* 老代码无需立即迁移;新代码请直接用具体类型以获得更好的类型推断。
|
|
712
921
|
*/
|
|
713
922
|
type HKUSHistoryKline = HKHistoryKline | USHistoryKline;
|
|
923
|
+
/**
|
|
924
|
+
* 港股分钟 K 线(5/15/30/60;v1.10.0+)
|
|
925
|
+
*
|
|
926
|
+
* 字段与 A 股 {@link MinuteKline} 同结构,额外携带 `currency` / `code`。
|
|
927
|
+
* `tz` 固定为 `'Asia/Hong_Kong'`。
|
|
928
|
+
*/
|
|
929
|
+
interface HKMinuteKline extends Omit<MinuteKline, 'tz'> {
|
|
930
|
+
tz: MarketTz;
|
|
931
|
+
currency: 'HKD';
|
|
932
|
+
code: string;
|
|
933
|
+
}
|
|
934
|
+
/**
|
|
935
|
+
* 港股当日分时(1 分钟;v1.10.0+)
|
|
936
|
+
*
|
|
937
|
+
* `tz` 固定为 `'Asia/Hong_Kong'`。
|
|
938
|
+
*/
|
|
939
|
+
interface HKMinuteTimeline extends Omit<MinuteTimeline, 'tz'> {
|
|
940
|
+
tz: MarketTz;
|
|
941
|
+
currency: 'HKD';
|
|
942
|
+
code: string;
|
|
943
|
+
}
|
|
944
|
+
/**
|
|
945
|
+
* 美股分钟 K 线(5/15/30/60;v1.10.0+)
|
|
946
|
+
*
|
|
947
|
+
* `tz` 固定为 `'America/New_York'`(含夏令时切换)。
|
|
948
|
+
* 不含盘前 / 盘后数据,仅常规交易时段。
|
|
949
|
+
*/
|
|
950
|
+
interface USMinuteKline extends Omit<MinuteKline, 'tz'> {
|
|
951
|
+
tz: MarketTz;
|
|
952
|
+
currency: 'USD';
|
|
953
|
+
code: string;
|
|
954
|
+
}
|
|
955
|
+
/**
|
|
956
|
+
* 美股当日分时(1 分钟;v1.10.0+)
|
|
957
|
+
*
|
|
958
|
+
* `tz` 固定为 `'America/New_York'`。
|
|
959
|
+
*/
|
|
960
|
+
interface USMinuteTimeline extends Omit<MinuteTimeline, 'tz'> {
|
|
961
|
+
tz: MarketTz;
|
|
962
|
+
currency: 'USD';
|
|
963
|
+
code: string;
|
|
964
|
+
}
|
|
714
965
|
|
|
715
966
|
/**
|
|
716
967
|
* 行业板块列表项
|
|
@@ -1777,6 +2028,145 @@ interface MarginTargetItem {
|
|
|
1777
2028
|
loanRepayVolume: number | null;
|
|
1778
2029
|
}
|
|
1779
2030
|
|
|
2031
|
+
/**
|
|
2032
|
+
* 公募基金扩展数据类型
|
|
2033
|
+
*
|
|
2034
|
+
* 对应数据源:天天基金 / 东方财富的基金数据频道
|
|
2035
|
+
* (https://fund.eastmoney.com/data/fundfenhong.html 等)。
|
|
2036
|
+
*/
|
|
2037
|
+
/** 分红查询排序字段(与东方财富接口 `rank` 参数一一对应) */
|
|
2038
|
+
type FundDividendRank = 'BZDM' | 'ABBNAME' | 'DJR' | 'FSRQ' | 'FHFCZ' | 'FFR';
|
|
2039
|
+
/** 通用排序方向(升序 / 降序) */
|
|
2040
|
+
type FundSortDirection = 'asc' | 'desc';
|
|
2041
|
+
/** 基金分红查询选项 */
|
|
2042
|
+
interface FundDividendListOptions {
|
|
2043
|
+
/** 查询年份;默认当前年(Asia/Shanghai) */
|
|
2044
|
+
year?: number | string;
|
|
2045
|
+
/**
|
|
2046
|
+
* 页码:从 1 开始;默认 `1`。
|
|
2047
|
+
* 设为 `'all'` 时自动翻完该年份所有页面并聚合结果。
|
|
2048
|
+
*/
|
|
2049
|
+
page?: number | 'all';
|
|
2050
|
+
/**
|
|
2051
|
+
* 基金类型筛选,空 / undefined 表示全部。
|
|
2052
|
+
* 例如 `'股票型'`、`'指数型-股票'`、`'混合型-偏股'`、`'REITs'` 等
|
|
2053
|
+
* (字符串与东方财富接口 `ftype` 参数原样对应)。
|
|
2054
|
+
*/
|
|
2055
|
+
fundType?: string;
|
|
2056
|
+
/** 排序字段,默认 `'FSRQ'`(除息日期) */
|
|
2057
|
+
rank?: FundDividendRank;
|
|
2058
|
+
/** 排序方向,默认 `'desc'` */
|
|
2059
|
+
sort?: FundSortDirection;
|
|
2060
|
+
/**
|
|
2061
|
+
* 按基金代码过滤(客户端过滤,因为接口本身不支持按代码精确查)。
|
|
2062
|
+
* 一般搭配 `page: 'all'` 使用,否则可能因目标记录不在当前页而无结果。
|
|
2063
|
+
*/
|
|
2064
|
+
code?: string;
|
|
2065
|
+
}
|
|
2066
|
+
/** 一条基金分红记录 */
|
|
2067
|
+
interface FundDividend {
|
|
2068
|
+
/** 基金代码 */
|
|
2069
|
+
code: string;
|
|
2070
|
+
/** 基金简称 */
|
|
2071
|
+
name: string;
|
|
2072
|
+
/** 权益登记日(`YYYY-MM-DD`),无则 `null` */
|
|
2073
|
+
equityRecordDate: string | null;
|
|
2074
|
+
/** 除息日期(`YYYY-MM-DD`),无则 `null` */
|
|
2075
|
+
exDividendDate: string | null;
|
|
2076
|
+
/** 分红金额(元/份),无则 `null` */
|
|
2077
|
+
dividendPerShare: number | null;
|
|
2078
|
+
/** 分红发放日(`YYYY-MM-DD`),无则 `null` */
|
|
2079
|
+
payDate: string | null;
|
|
2080
|
+
/**
|
|
2081
|
+
* 原始字段数组(含 7 项):
|
|
2082
|
+
* `[code, name, 权益登记日, 除息日, 分红元/份, 发放日, 类型代码]`
|
|
2083
|
+
*/
|
|
2084
|
+
raw: string[];
|
|
2085
|
+
}
|
|
2086
|
+
/** 基金分红查询结果 */
|
|
2087
|
+
interface FundDividendListResult {
|
|
2088
|
+
/** 当前页(或聚合后)的分红记录 */
|
|
2089
|
+
items: FundDividend[];
|
|
2090
|
+
/** 数据源汇报的总页数 */
|
|
2091
|
+
totalPages: number;
|
|
2092
|
+
/** 数据源汇报的每页条数 */
|
|
2093
|
+
pageSize: number;
|
|
2094
|
+
/** 当前页码;`page: 'all'` 模式下为 `-1` 表示已聚合 */
|
|
2095
|
+
currentPage: number;
|
|
2096
|
+
}
|
|
2097
|
+
/** 单条历史净值点 */
|
|
2098
|
+
interface FundNavPoint {
|
|
2099
|
+
/** 净值日期 `YYYY-MM-DD`(与时间戳的 UTC 日期一致,对应 A 股交易日) */
|
|
2100
|
+
date: string;
|
|
2101
|
+
/** 净值日期对应的毫秒时间戳(数据源原值,UTC 当日 00:00) */
|
|
2102
|
+
timestamp: number;
|
|
2103
|
+
/** 单位净值 */
|
|
2104
|
+
nav: number;
|
|
2105
|
+
/** 累计净值;与单位净值数组按 timestamp 对齐,无法对齐时为 `null` */
|
|
2106
|
+
accNav: number | null;
|
|
2107
|
+
/** 日增长率(%);无值时为 `null` */
|
|
2108
|
+
dailyReturn: number | null;
|
|
2109
|
+
/** 每万份收益(货币 / 短债基金有意义,其余通常为空串) */
|
|
2110
|
+
unitMoney: string;
|
|
2111
|
+
}
|
|
2112
|
+
/** 基金历史净值查询结果 */
|
|
2113
|
+
interface FundNavHistory {
|
|
2114
|
+
/** 基金代码(来自 pingzhongdata 的 `fS_code`,若缺失则回填入参) */
|
|
2115
|
+
code: string;
|
|
2116
|
+
/** 基金简称(来自 pingzhongdata 的 `fS_name`,无则 `null`) */
|
|
2117
|
+
name: string | null;
|
|
2118
|
+
/** 历史净值序列;按日期升序(与数据源一致) */
|
|
2119
|
+
items: FundNavPoint[];
|
|
2120
|
+
}
|
|
2121
|
+
/**
|
|
2122
|
+
* 基金当日实时估值(来自天天基金 fundgz 接口)。
|
|
2123
|
+
*
|
|
2124
|
+
* 含两类净值:
|
|
2125
|
+
* - `nav` / `navDate`:最新已结算的单位净值(T-1 或当日盘后)
|
|
2126
|
+
* - `estimatedNav` / `estimatedChangePercent` / `estimateTime`:盘中实时估值
|
|
2127
|
+
*/
|
|
2128
|
+
interface FundEstimate {
|
|
2129
|
+
/** 基金代码 */
|
|
2130
|
+
code: string;
|
|
2131
|
+
/** 基金简称 */
|
|
2132
|
+
name: string | null;
|
|
2133
|
+
/** 最新已结算单位净值的日期 `YYYY-MM-DD`,无则 `null` */
|
|
2134
|
+
navDate: string | null;
|
|
2135
|
+
/** 最新已结算单位净值,无则 `null` */
|
|
2136
|
+
nav: number | null;
|
|
2137
|
+
/** 当日实时估值(盘中刷新),无则 `null`(如非交易日、QDII 等) */
|
|
2138
|
+
estimatedNav: number | null;
|
|
2139
|
+
/** 估算涨跌幅 `%`,无则 `null` */
|
|
2140
|
+
estimatedChangePercent: number | null;
|
|
2141
|
+
/** 估算时间原始字符串(如 `"2026-05-26 15:00"`,A 股时区),无则 `null` */
|
|
2142
|
+
estimateTime: string | null;
|
|
2143
|
+
}
|
|
2144
|
+
/** 单条同类排名点(与 `Data_rateInSimilarType` 一一对应) */
|
|
2145
|
+
interface FundRankPoint {
|
|
2146
|
+
/** 报告日期 `YYYY-MM-DD` */
|
|
2147
|
+
date: string;
|
|
2148
|
+
/** 报告日期对应的毫秒时间戳(数据源原值) */
|
|
2149
|
+
timestamp: number;
|
|
2150
|
+
/** 同类近三月排名(数字越小越靠前),无值时为 `null` */
|
|
2151
|
+
rank: number | null;
|
|
2152
|
+
/** 同类基金总数,无值时为 `null` */
|
|
2153
|
+
total: number | null;
|
|
2154
|
+
/**
|
|
2155
|
+
* 同类近三月排名百分位(%,越小越好),按 timestamp 与 rank 对齐;
|
|
2156
|
+
* 无对应数据时为 `null`
|
|
2157
|
+
*/
|
|
2158
|
+
percentile: number | null;
|
|
2159
|
+
}
|
|
2160
|
+
/** 基金同类排名走势查询结果 */
|
|
2161
|
+
interface FundRankHistory {
|
|
2162
|
+
/** 基金代码(来自 pingzhongdata 的 `fS_code`,若缺失则回填入参) */
|
|
2163
|
+
code: string;
|
|
2164
|
+
/** 基金简称(来自 pingzhongdata 的 `fS_name`,无则 `null`) */
|
|
2165
|
+
name: string | null;
|
|
2166
|
+
/** 排名走势序列;按日期升序 */
|
|
2167
|
+
items: FundRankPoint[];
|
|
2168
|
+
}
|
|
2169
|
+
|
|
1780
2170
|
/**
|
|
1781
2171
|
* 腾讯财经 - 批量操作
|
|
1782
2172
|
*/
|
|
@@ -1935,6 +2325,24 @@ interface HistoryKlineRequestOptions {
|
|
|
1935
2325
|
|
|
1936
2326
|
interface HKKlineOptions extends HistoryKlineRequestOptions {
|
|
1937
2327
|
}
|
|
2328
|
+
interface HKMinuteKlineOptions {
|
|
2329
|
+
/** K 线周期 @default '1' */
|
|
2330
|
+
period?: '1' | '5' | '15' | '30' | '60';
|
|
2331
|
+
/**
|
|
2332
|
+
* 复权类型(仅 5/15/30/60 分钟有效;1 分钟分时不支持复权)
|
|
2333
|
+
* @default 'qfq'
|
|
2334
|
+
*/
|
|
2335
|
+
adjust?: '' | 'qfq' | 'hfq';
|
|
2336
|
+
/** 开始时间 `YYYY-MM-DD HH:mm`(港股本地时区 `Asia/Hong_Kong`) */
|
|
2337
|
+
startDate?: string;
|
|
2338
|
+
/** 结束时间 `YYYY-MM-DD HH:mm`(港股本地时区) */
|
|
2339
|
+
endDate?: string;
|
|
2340
|
+
/**
|
|
2341
|
+
* 仅 `period='1'` 生效:返回最近 N 个交易日的分时。
|
|
2342
|
+
* 默认 `1`(当日分时)。可设为 `5` 拿近 5 日分时。
|
|
2343
|
+
*/
|
|
2344
|
+
ndays?: number;
|
|
2345
|
+
}
|
|
1938
2346
|
|
|
1939
2347
|
/**
|
|
1940
2348
|
* 东方财富 - 美股 K 线
|
|
@@ -1942,6 +2350,24 @@ interface HKKlineOptions extends HistoryKlineRequestOptions {
|
|
|
1942
2350
|
|
|
1943
2351
|
interface USKlineOptions extends HistoryKlineRequestOptions {
|
|
1944
2352
|
}
|
|
2353
|
+
interface USMinuteKlineOptions {
|
|
2354
|
+
/** K 线周期 @default '1' */
|
|
2355
|
+
period?: '1' | '5' | '15' | '30' | '60';
|
|
2356
|
+
/**
|
|
2357
|
+
* 复权类型(仅 5/15/30/60 分钟有效;1 分钟分时不支持复权)
|
|
2358
|
+
* @default 'qfq'
|
|
2359
|
+
*/
|
|
2360
|
+
adjust?: '' | 'qfq' | 'hfq';
|
|
2361
|
+
/** 开始时间 `YYYY-MM-DD HH:mm`(美东时区 `America/New_York`,自动 DST) */
|
|
2362
|
+
startDate?: string;
|
|
2363
|
+
/** 结束时间 `YYYY-MM-DD HH:mm`(美东时区) */
|
|
2364
|
+
endDate?: string;
|
|
2365
|
+
/**
|
|
2366
|
+
* 仅 `period='1'` 生效:返回最近 N 个交易日的分时。
|
|
2367
|
+
* 默认 `1`(当日分时)。可设为 `5` 拿近 5 日分时。
|
|
2368
|
+
*/
|
|
2369
|
+
ndays?: number;
|
|
2370
|
+
}
|
|
1945
2371
|
|
|
1946
2372
|
/**
|
|
1947
2373
|
* 东方财富 - 板块通用逻辑
|
|
@@ -2719,6 +3145,38 @@ declare global {
|
|
|
2719
3145
|
}
|
|
2720
3146
|
}
|
|
2721
3147
|
|
|
3148
|
+
declare abstract class BaseService {
|
|
3149
|
+
protected readonly client: RequestClient;
|
|
3150
|
+
constructor(client: RequestClient);
|
|
3151
|
+
}
|
|
3152
|
+
|
|
3153
|
+
declare class QuoteService extends BaseService {
|
|
3154
|
+
constructor(client: RequestClient);
|
|
3155
|
+
getFullQuotes(codes: string[]): Promise<FullQuote[]>;
|
|
3156
|
+
getSimpleQuotes(codes: string[]): Promise<SimpleQuote[]>;
|
|
3157
|
+
getHKQuotes(codes: string[]): Promise<HKQuote[]>;
|
|
3158
|
+
getUSQuotes(codes: string[]): Promise<USQuote[]>;
|
|
3159
|
+
getFundQuotes(codes: string[]): Promise<FundQuote[]>;
|
|
3160
|
+
getFundFlow(codes: string[]): Promise<FundFlow[]>;
|
|
3161
|
+
getPanelLargeOrder(codes: string[]): Promise<PanelLargeOrder[]>;
|
|
3162
|
+
getTodayTimeline(code: string): Promise<TodayTimelineResponse>;
|
|
3163
|
+
search(keyword: string): Promise<SearchResult[]>;
|
|
3164
|
+
getAShareCodeList(options?: GetAShareCodeListOptions | boolean): Promise<string[]>;
|
|
3165
|
+
getUSCodeList(options?: GetUSCodeListOptions | boolean): Promise<string[]>;
|
|
3166
|
+
getHKCodeList(): Promise<string[]>;
|
|
3167
|
+
getFundCodeList(): Promise<string[]>;
|
|
3168
|
+
getAllAShareQuotes(options?: GetAllAShareQuotesOptions): Promise<FullQuote[]>;
|
|
3169
|
+
getAllHKShareQuotes(options?: GetAllAShareQuotesOptions): Promise<HKQuote[]>;
|
|
3170
|
+
getAllUSShareQuotes(options?: GetAllUSQuotesOptions): Promise<USQuote[]>;
|
|
3171
|
+
getAllQuotesByCodes(codes: string[], options?: GetAllAShareQuotesOptions): Promise<FullQuote[]>;
|
|
3172
|
+
batchRaw(params: string): Promise<{
|
|
3173
|
+
key: string;
|
|
3174
|
+
fields: string[];
|
|
3175
|
+
}[]>;
|
|
3176
|
+
getTradingCalendar(): Promise<string[]>;
|
|
3177
|
+
getDividendDetail(symbol: string): Promise<DividendDetail[]>;
|
|
3178
|
+
}
|
|
3179
|
+
|
|
2722
3180
|
type MarketType = 'A' | 'HK' | 'US';
|
|
2723
3181
|
/**
|
|
2724
3182
|
* `getKlineWithIndicators` 的请求参数
|
|
@@ -2773,6 +3231,65 @@ interface KlineWithIndicatorsOptions {
|
|
|
2773
3231
|
type MarketStatus = 'pre_market' | 'open' | 'lunch_break' | 'after_hours' | 'closed';
|
|
2774
3232
|
/** 支持的市场枚举,用于 `getMarketStatus`。 */
|
|
2775
3233
|
type SupportedMarket = 'A' | 'HK' | 'US';
|
|
3234
|
+
declare class TradingCalendarService {
|
|
3235
|
+
private readonly quoteService;
|
|
3236
|
+
constructor(quoteService: QuoteService);
|
|
3237
|
+
/**
|
|
3238
|
+
* 判断给定日期是否为 A 股交易日。
|
|
3239
|
+
*
|
|
3240
|
+
* 数据源:`getTradingCalendar()` (腾讯接口,带 12 小时缓存)。
|
|
3241
|
+
* 因此第一次调用会拉取全量交易日列表,后续命中缓存。
|
|
3242
|
+
*
|
|
3243
|
+
* @param date 不传则取"现在 `Asia/Shanghai` 的当日"。可传 `'YYYY-MM-DD'` /
|
|
3244
|
+
* `'YYYYMMDD'` / `Date` 对象。
|
|
3245
|
+
* @returns `true` 表示是交易日;`false` 表示节假日 / 周末。
|
|
3246
|
+
*/
|
|
3247
|
+
isTradingDay(date?: string | Date): Promise<boolean>;
|
|
3248
|
+
/**
|
|
3249
|
+
* 返回 A 股下一个交易日 (`'YYYY-MM-DD'`)。
|
|
3250
|
+
*
|
|
3251
|
+
* - 如果 `date` 本身是交易日,返回它**之后**的下一个交易日
|
|
3252
|
+
* - 如果 `date` 是节假日,返回大于它的第一个交易日
|
|
3253
|
+
* - 如果在已知日历范围之外,抛 `RangeError`
|
|
3254
|
+
*
|
|
3255
|
+
* @param date 不传则取"现在 `Asia/Shanghai` 的当日"
|
|
3256
|
+
*/
|
|
3257
|
+
nextTradingDay(date?: string | Date): Promise<string>;
|
|
3258
|
+
/**
|
|
3259
|
+
* 返回 A 股上一个交易日 (`'YYYY-MM-DD'`)。
|
|
3260
|
+
*
|
|
3261
|
+
* - 如果 `date` 本身是交易日,返回它**之前**的上一个交易日
|
|
3262
|
+
* - 如果 `date` 是节假日,返回小于它的最后一个交易日
|
|
3263
|
+
* - 如果在已知日历范围之外,抛 `RangeError`
|
|
3264
|
+
*
|
|
3265
|
+
* @param date 不传则取"现在 `Asia/Shanghai` 的当日"
|
|
3266
|
+
*/
|
|
3267
|
+
prevTradingDay(date?: string | Date): Promise<string>;
|
|
3268
|
+
/**
|
|
3269
|
+
* 返回当前市场状态 (同步,不发请求)。
|
|
3270
|
+
*
|
|
3271
|
+
* - **A 股**:仅按交易时段判断,**不识别法定假日**(SDK 不会为此发请求)。
|
|
3272
|
+
* 如需精确判断"今天是否真的是交易日",请用 `await isTradingDay()`。
|
|
3273
|
+
* 返回 `'closed'` 时表示"周末或非交易时段",可能是节假日 / 凌晨 / 深夜。
|
|
3274
|
+
* - **港股 / 美股**:同样按"周一-周五 + 已知时段"判断,不识别假日。
|
|
3275
|
+
*
|
|
3276
|
+
* @param market `'A'`(默认) / `'HK'` / `'US'`
|
|
3277
|
+
* @param now 用于测试注入"当前时间";生产代码不需要传
|
|
3278
|
+
*/
|
|
3279
|
+
getMarketStatus(market?: SupportedMarket, now?: Date): MarketStatus;
|
|
3280
|
+
}
|
|
3281
|
+
|
|
3282
|
+
declare class FundService extends BaseService {
|
|
3283
|
+
constructor(client: RequestClient);
|
|
3284
|
+
/** 获取基金分红明细(全市场,按年份分页) */
|
|
3285
|
+
getFundDividendList(options?: FundDividendListOptions): Promise<FundDividendListResult>;
|
|
3286
|
+
/** 获取基金历史净值(单位 + 累计,全历史一次返回) */
|
|
3287
|
+
getFundNavHistory(code: string): Promise<FundNavHistory>;
|
|
3288
|
+
/** 获取基金当日实时估值(含 T-1 单位净值 + 盘中估算) */
|
|
3289
|
+
getFundEstimate(code: string): Promise<FundEstimate>;
|
|
3290
|
+
/** 获取基金同类排名走势(每日近三月排名 + 百分位) */
|
|
3291
|
+
getFundRankHistory(code: string): Promise<FundRankHistory>;
|
|
3292
|
+
}
|
|
2776
3293
|
|
|
2777
3294
|
declare class StockSDK {
|
|
2778
3295
|
private readonly client;
|
|
@@ -2788,6 +3305,7 @@ declare class StockSDK {
|
|
|
2788
3305
|
private readonly dragonTigerService;
|
|
2789
3306
|
private readonly dataService;
|
|
2790
3307
|
private readonly tradingCalendarService;
|
|
3308
|
+
private readonly fundService;
|
|
2791
3309
|
/**
|
|
2792
3310
|
* 创建 Stock SDK 实例。
|
|
2793
3311
|
* 旧的全局 `timeout` / `retry` / `rateLimit` / `circuitBreaker` 配置继续有效,
|
|
@@ -2806,12 +3324,12 @@ declare class StockSDK {
|
|
|
2806
3324
|
getSimpleQuotes(codes: string[]): Promise<SimpleQuote[]>;
|
|
2807
3325
|
/**
|
|
2808
3326
|
* 获取港股行情
|
|
2809
|
-
* @param codes
|
|
3327
|
+
* @param codes 港股代码数组(5 位数字,无需 `hk` 前缀,如 `['00700', '09988']`)
|
|
2810
3328
|
*/
|
|
2811
3329
|
getHKQuotes(codes: string[]): Promise<HKQuote[]>;
|
|
2812
3330
|
/**
|
|
2813
3331
|
* 获取美股行情
|
|
2814
|
-
* @param codes
|
|
3332
|
+
* @param codes 美股代码数组(无需 `us` 前缀,如 `['AAPL', 'BABA']`)
|
|
2815
3333
|
*/
|
|
2816
3334
|
getUSQuotes(codes: string[]): Promise<USQuote[]>;
|
|
2817
3335
|
/**
|
|
@@ -2921,6 +3439,17 @@ declare class StockSDK {
|
|
|
2921
3439
|
* @param options K 线参数
|
|
2922
3440
|
*/
|
|
2923
3441
|
getHKHistoryKline(symbol: string, options?: HKKlineOptions): Promise<HKHistoryKline[]>;
|
|
3442
|
+
/**
|
|
3443
|
+
* 获取港股分钟 K 线(5/15/30/60 分钟)或当日分时(1 分钟)。
|
|
3444
|
+
*
|
|
3445
|
+
* `options.period='1'` 时走 `trends2/get`,返回 `HKMinuteTimeline[]`;
|
|
3446
|
+
* `options.period='5'|'15'|'30'|'60'` 时走 `kline/get`,返回 `HKMinuteKline[]`。
|
|
3447
|
+
*
|
|
3448
|
+
* @param symbol 港股代码,纯数字或带 `hk` 前缀均可(如 `'00700'`、`'hk00700'`)
|
|
3449
|
+
* @param options 周期 / 复权 / 起止时间
|
|
3450
|
+
* @since v1.10.0
|
|
3451
|
+
*/
|
|
3452
|
+
getHKMinuteKline(symbol: string, options?: HKMinuteKlineOptions): Promise<HKMinuteTimeline[] | HKMinuteKline[]>;
|
|
2924
3453
|
/**
|
|
2925
3454
|
* 获取美股历史 K 线。
|
|
2926
3455
|
*
|
|
@@ -2931,6 +3460,16 @@ declare class StockSDK {
|
|
|
2931
3460
|
* @param options K 线参数
|
|
2932
3461
|
*/
|
|
2933
3462
|
getUSHistoryKline(symbol: string, options?: USKlineOptions): Promise<USHistoryKline[]>;
|
|
3463
|
+
/**
|
|
3464
|
+
* 获取美股分钟 K 线(5/15/30/60 分钟)或当日分时(1 分钟)。
|
|
3465
|
+
*
|
|
3466
|
+
* 不含盘前 / 盘后数据,仅常规交易时段。
|
|
3467
|
+
*
|
|
3468
|
+
* @param symbol 美股代码,格式 `{market}.{ticker}`(如 `'105.AAPL'`、`'106.BABA'`)
|
|
3469
|
+
* @param options 周期 / 复权 / 起止时间
|
|
3470
|
+
* @since v1.10.0
|
|
3471
|
+
*/
|
|
3472
|
+
getUSMinuteKline(symbol: string, options?: USMinuteKlineOptions): Promise<USMinuteTimeline[] | USMinuteKline[]>;
|
|
2934
3473
|
/**
|
|
2935
3474
|
* 模糊搜索股票/指数/基金等
|
|
2936
3475
|
* @param keyword 关键词(代码 / 名称 / 拼音)
|
|
@@ -3244,6 +3783,48 @@ declare class StockSDK {
|
|
|
3244
3783
|
* @param date 指定交易日 YYYY-MM-DD(默认服务端最新交易日)
|
|
3245
3784
|
*/
|
|
3246
3785
|
getMarginTargetList(date?: string): Promise<MarginTargetItem[]>;
|
|
3786
|
+
/**
|
|
3787
|
+
* 获取基金分红明细列表(来自东方财富 / 天天基金分红送配频道)。
|
|
3788
|
+
*
|
|
3789
|
+
* 接口本身只支持「年份 + 全市场 + 翻页」查询,不支持服务端按代码精确查;
|
|
3790
|
+
* 要拿单只基金完整分红记录,请同时设置 `page: 'all'` 与 `code`。
|
|
3791
|
+
*
|
|
3792
|
+
* @param options 查询选项;默认拉当前年第 1 页、按除息日倒序
|
|
3793
|
+
*/
|
|
3794
|
+
getFundDividendList(options?: FundDividendListOptions): Promise<FundDividendListResult>;
|
|
3795
|
+
/**
|
|
3796
|
+
* 获取基金历史净值(单位净值 + 累计净值,全历史一次返回)。
|
|
3797
|
+
*
|
|
3798
|
+
* 数据源:`fund.eastmoney.com/pingzhongdata/{code}.js`
|
|
3799
|
+
* 一次请求即可拿到该基金从成立日到最新交易日的全部净值(数千条)。
|
|
3800
|
+
* 开放式 / ETF / LOF / 货币 / QDII 均通用。
|
|
3801
|
+
*
|
|
3802
|
+
* 注意:响应体较大(约 600KB / gzip 后约 120KB),建议在应用层做缓存。
|
|
3803
|
+
*
|
|
3804
|
+
* @param code 基金代码,如 `'110011'`
|
|
3805
|
+
*/
|
|
3806
|
+
getFundNavHistory(code: string): Promise<FundNavHistory>;
|
|
3807
|
+
/**
|
|
3808
|
+
* 获取基金当日实时估值(来自天天基金 fundgz 接口)。
|
|
3809
|
+
*
|
|
3810
|
+
* 同时返回最新已结算的单位净值(`nav` / `navDate`)和盘中估算
|
|
3811
|
+
* (`estimatedNav` / `estimatedChangePercent` / `estimateTime`),
|
|
3812
|
+
* 方便前端做"当日实时表现 vs 上一收盘"对比。
|
|
3813
|
+
*
|
|
3814
|
+
* QDII / 非交易日 / 部分小众基金的盘中估算字段可能为空,将返回 `null`。
|
|
3815
|
+
*
|
|
3816
|
+
* @param code 基金代码(纯数字,如 `'005827'`)
|
|
3817
|
+
*/
|
|
3818
|
+
getFundEstimate(code: string): Promise<FundEstimate>;
|
|
3819
|
+
/**
|
|
3820
|
+
* 获取基金同类排名走势(每日近三月排名 + 百分位)。
|
|
3821
|
+
*
|
|
3822
|
+
* 数据源与 `getFundNavHistory` 相同(`pingzhongdata/{code}.js`),
|
|
3823
|
+
* 适合做"该基金在同类基金里的相对表现"折线图。
|
|
3824
|
+
*
|
|
3825
|
+
* @param code 基金代码
|
|
3826
|
+
*/
|
|
3827
|
+
getFundRankHistory(code: string): Promise<FundRankHistory>;
|
|
3247
3828
|
}
|
|
3248
3829
|
|
|
3249
3830
|
/**
|
|
@@ -3253,4 +3834,4 @@ declare class StockSDK {
|
|
|
3253
3834
|
*/
|
|
3254
3835
|
declare function generateSearchExternalLinks(result: SearchResult): ExternalLink[];
|
|
3255
3836
|
|
|
3256
|
-
export { type AShareMarket, type ATROptions, type BIASOptions, type BOLLOptions, type BlockTradeDailyStatItem, type BlockTradeDateOptions, type BlockTradeDetailItem, type BlockTradeMarketStatItem, type BoardChangeItem, type CCIOptions, type CFFEXOptionQuote, type CFFEXOptionQuotesOptions, type ComexInventory, type ComexInventoryOptions, type ConceptBoard, type ConceptBoardConstituent, type ConceptBoardKline, type ConceptBoardKlineOptions, type ConceptBoardMinuteKline, type ConceptBoardMinuteKlineOptions, type ConceptBoardMinuteTimeline, type ConceptBoardSpot, type DMIOptions$1 as DMIOptions, type DMIResult$1 as DMIResult, type DatacenterQuery, type DatacenterResult, type DividendDetail, type DragonTigerBranchItem, type DragonTigerDateOptions, type DragonTigerDetailItem, type DragonTigerInstitutionItem, type DragonTigerPeriod, type DragonTigerSeatItem, type DragonTigerStockStatItem, type ETFOptionCate, type ETFOptionExpireDay, type ETFOptionMonth, type ExternalLink, type FullQuote, type FundFlow, type FundFlowOptions, type FundFlowRankItem, type FundFlowRankOptions, type FundQuote, type FuturesExchange, type FuturesInventory, type FuturesInventoryOptions, type FuturesInventorySymbol, type FuturesKline, type FuturesKlineOptions, type GetAShareCodeListOptions, type GetAllAShareQuotesOptions, type GlobalFuturesKlineOptions, type GlobalFuturesQuote, type GlobalFuturesSpotOptions, type HKHistoryKline, type HKQuote, type HKUSHistoryKline, type HistoryKline, HttpError, INDICATOR_REGISTRY, type IndexOptionProduct, type IndicatorKey, type IndicatorOptions, type IndustryBoard, type IndustryBoardConstituent, type IndustryBoardKline, type IndustryBoardKlineOptions, type IndustryBoardMinuteKline, type IndustryBoardMinuteKlineOptions, type IndustryBoardMinuteTimeline, type IndustryBoardSpot, type JsonpOptions, type KCOptions$1 as KCOptions, type KCResult$1 as KCResult, type KDJOptions, type KlineWithIndicators, type MACDOptions, type MAOptions, type MarginAccountItem, type MarginTargetItem, type MarketFundFlow, type MarketType, type MinuteKline, type MinuteTimeline, type NorthboundDirection, type NorthboundFlowSummary, type NorthboundHistoryItem, type NorthboundHistoryOptions, type NorthboundHoldingRankItem, type NorthboundHoldingRankOptions, type NorthboundIndividualItem, type NorthboundMarket, type NorthboundMinuteItem, type NorthboundRankPeriod, type OBVOptions$1 as OBVOptions, type OBVResult$1 as OBVResult, type OptionKline, type OptionLHBItem, type OptionMinute, type OptionTQuote, type OptionTQuoteResult, type PanelLargeOrder, type ProviderName, type ProviderRequestPolicy, type ROCOptions$1 as ROCOptions, type ROCResult$1 as ROCResult, type RSIOptions, type RequestClientOptions, type RequestError, type RetryOptions, type SAROptions$1 as SAROptions, type SARResult$1 as SARResult, SdkError, type SearchResult, type SearchResultType, type SectorFundFlowItem, type SimpleQuote, type StockChangeItem, type StockChangeType, type StockFundFlowDaily, StockSDK, type TodayTimeline, type TodayTimelineResponse, type USHistoryKline, type USQuote, type WROptions, type ZTPoolItem, type ZTPoolType, addIndicators, asyncPool, buildIndicatorContext, calcATR, calcBIAS, calcBOLL, calcCCI, calcDMI, calcEMA, calcKC, calcKDJ, calcMA, calcMACD, calcOBV, calcROC, calcRSI, calcSAR, calcSMA, calcWMA, calcWR, chunkArray, decodeGBK, StockSDK as default, estimateIndicatorLookback, extractJsonFromJsonp, generateSearchExternalLinks, getEnabledIndicatorKeys, getSdkErrorCode, jsonpRequest, parseResponse, safeNumber, safeNumberOrNull };
|
|
3837
|
+
export { type AShareMarket, type ATROptions, type BIASOptions, type BOLLOptions, BROWSER_JSVARS_MUTEX_KEY, type BlockTradeDailyStatItem, type BlockTradeDateOptions, type BlockTradeDetailItem, type BlockTradeMarketStatItem, type BoardChangeItem, type CCIOptions, type CFFEXOptionQuote, type CFFEXOptionQuotesOptions, type ComexInventory, type ComexInventoryOptions, type ConceptBoard, type ConceptBoardConstituent, type ConceptBoardKline, type ConceptBoardKlineOptions, type ConceptBoardMinuteKline, type ConceptBoardMinuteKlineOptions, type ConceptBoardMinuteTimeline, type ConceptBoardSpot, type DMIOptions$1 as DMIOptions, type DMIResult$1 as DMIResult, type DatacenterQuery, type DatacenterResult, type DividendDetail, type DragonTigerBranchItem, type DragonTigerDateOptions, type DragonTigerDetailItem, type DragonTigerInstitutionItem, type DragonTigerPeriod, type DragonTigerSeatItem, type DragonTigerStockStatItem, type ETFOptionCate, type ETFOptionExpireDay, type ETFOptionMonth, type ExternalLink, type FetchJsVarsOptions, type FullQuote, type FundDividend, type FundDividendListOptions, type FundDividendListResult, type FundDividendRank, type FundEstimate, type FundFlow, type FundFlowOptions, type FundFlowRankItem, type FundFlowRankOptions, type FundNavHistory, type FundNavPoint, type FundQuote, type FundRankHistory, type FundRankPoint, FundService, type FundSortDirection, type FuturesExchange, type FuturesInventory, type FuturesInventoryOptions, type FuturesInventorySymbol, type FuturesKline, type FuturesKlineOptions, type GetAShareCodeListOptions, type GetAllAShareQuotesOptions, type GetAllUSQuotesOptions, type GetUSCodeListOptions, type GlobalFuturesKlineOptions, type GlobalFuturesQuote, type GlobalFuturesSpotOptions, type HKHistoryKline, type HKKlineOptions, type HKMinuteKline, type HKMinuteKlineOptions, type HKMinuteTimeline, type HKQuote, type HKUSHistoryKline, type HistoryKline, type HistoryKlineOptions, HttpError, INDICATOR_REGISTRY, type IndexOptionProduct, type IndicatorKey, type IndicatorOptions, type IndustryBoard, type IndustryBoardConstituent, type IndustryBoardKline, type IndustryBoardKlineOptions, type IndustryBoardMinuteKline, type IndustryBoardMinuteKlineOptions, type IndustryBoardMinuteTimeline, type IndustryBoardSpot, type JsonpOptions, type KCOptions$1 as KCOptions, type KCResult$1 as KCResult, type KDJOptions, type KlineWithIndicators, type MACDOptions, type MAOptions, MARKET_TZ, type MarginAccountItem, type MarginTargetItem, type MarketFundFlow, type MarketStatus, type MarketType, type MarketTz, type MinuteKline, type MinuteKlineOptions, type MinuteTimeline, type NorthboundDirection, type NorthboundFlowSummary, type NorthboundHistoryItem, type NorthboundHistoryOptions, type NorthboundHoldingRankItem, type NorthboundHoldingRankOptions, type NorthboundIndividualItem, type NorthboundMarket, type NorthboundMinuteItem, type NorthboundRankPeriod, type OBVOptions$1 as OBVOptions, type OBVResult$1 as OBVResult, type OptionKline, type OptionLHBItem, type OptionMinute, type OptionTQuote, type OptionTQuoteResult, type PanelLargeOrder, type ProviderName, type ProviderRequestPolicy, type ROCOptions$1 as ROCOptions, type ROCResult$1 as ROCResult, type RSIOptions, type RequestClientOptions, type RequestError, type RetryOptions, type SAROptions$1 as SAROptions, type SARResult$1 as SARResult, SdkError, type SearchResult, type SearchResultType, type SectorFundFlowItem, type SimpleQuote, type StockChangeItem, type StockChangeType, type StockFundFlowDaily, StockSDK, type SupportedMarket, type TimeMeta, type TodayTimeline, type TodayTimelineResponse, TradingCalendarService, type USHistoryKline, type USKlineOptions, type USMarket, type USMinuteKline, type USMinuteKlineOptions, type USMinuteTimeline, type USQuote, type WROptions, type ZTPoolItem, type ZTPoolType, addIndicators, asyncPool, buildIndicatorContext, buildTimeMeta, buildTimeMetaFromDateAndTime, calcATR, calcBIAS, calcBOLL, calcCCI, calcDMI, calcEMA, calcKC, calcKDJ, calcMA, calcMACD, calcOBV, calcROC, calcRSI, calcSAR, calcSMA, calcWMA, calcWR, chunkArray, decodeGBK, StockSDK as default, estimateIndicatorLookback, extractJsonFromJsonp, fetchJsVars, formatInTz, generateSearchExternalLinks, getEnabledIndicatorKeys, getSdkErrorCode, jsonpRequest, parseJsVars, parseMarketTime, parseResponse, safeNumber, safeNumberOrNull, withScriptMutex };
|