gangtise-openapi-cli 0.14.0 → 0.14.1

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 CHANGED
@@ -4,11 +4,16 @@
4
4
 
5
5
  ## Changelog
6
6
 
7
+ ### v0.14.1 — 2026-05-22
8
+
9
+ **Bug fix**
10
+ - `quote day-kline-us --security all` 分片由 2 天/片改为 **1 天/片**。美股全市场单日约 5800 行,原 2 天/片会在第一个 shard 命中默认 `--limit 6000` 上限,导致 shard 内第二日数据被截断到几百行。改 1 天/片后每个 shard 数据完整。
11
+
7
12
  ### v0.14.0 — 2026-05-22
8
13
 
9
14
  **新增接口**
10
15
  - `quote realtime` — 个股实时行情快照,单接口同时覆盖 A 股 / 港股 / 美股;支持代码混合传入或市场关键字(`aShares` / `hkStocks` / `usStocks`)批量查询全市场
11
- - `quote day-kline-us` — 美股历史日 K 线,数据范围 NYSE / NASDAQ / AMEX;支持 `--security all` 全市场(CLI 自动按 2 天/片切分并发拉取)
16
+ - `quote day-kline-us` — 美股历史日 K 线,数据范围 NYSE / NASDAQ / AMEX;支持 `--security all` 全市场(CLI 自动按 1 天/片切分并发拉取,美股全市场单日约 5800 行)
12
17
 
13
18
  **接口变更**
14
19
  - `quote day-kline` / `quote day-kline-hk` 明确仅返回**历史**日 K 线,不包含盘中实时数据;当日数据入库时间:A 股 ~15:30 / 港股 ~16:30(北京时间)。盘中实时请走 `quote realtime`
@@ -274,7 +279,7 @@ gangtise ai knowledge-batch --query 比亚迪 --query 最近热门概念
274
279
  - **流式输出**:`jsonl`/`csv` 格式且 `--output` 指定时,超过 1000 行自动切换为逐行写盘,避免一次性构建百 MB 字符串。
275
280
  - **自动重试**:5xx / `ECONNRESET` / `ETIMEDOUT` / `999999` 系统错误自动指数退避重试 2 次。
276
281
  - **Token 自愈**:调用返回 8000014/8000015 时自动强制刷新 Token 并重试一次。
277
- - **K线自动分片**:`quote day-kline --security all` 等全市场查询自动按日期切分(A股 / 美股 2 天/片、HK 3 天/片、指数 30 天/片),并发执行后合并结果。
282
+ - **K线自动分片**:`quote day-kline --security all` 等全市场查询自动按日期切分(A股 2 天/片、美股 1 天/片、HK 3 天/片、指数 30 天/片),并发执行后合并结果。
278
283
  - **Token 内存缓存**:Token 在进程内存中缓存,避免每次请求读盘。
279
284
  - **`--verbose`**:打印每个请求的方法、路径、状态码、耗时和响应大小到 stderr,方便定位慢查询。
280
285
 
package/dist/src/cli.js CHANGED
@@ -286,7 +286,7 @@ quote.command("day-kline-hk").option("--security <code>", "Security code (HK sto
286
286
  });
287
287
  quote.command("day-kline-us").option("--security <code>", "Security code (US stock: e.g. AAPL.O, or 'all' for full market)", collectList, []).option("--start-date <date>", "Start date (default: 1 year before end-date)").option("--end-date <date>", "End date (default: latest)").option("--limit <number>", "Max rows per request (default: 6000, max: 10000)").option("--field <field>", "Field", collectList, []).option("--format <format>", "Output format", "table").option("--output <path>").action(async (options) => {
288
288
  const client = await createClient();
289
- await printData(await callKlineWithSharding(client, "quote.day-kline-us", buildQuoteKlineBody(options), { shardDays: 2 }), parseOutputFormat(options.format), options.output);
289
+ await printData(await callKlineWithSharding(client, "quote.day-kline-us", buildQuoteKlineBody(options), { shardDays: 1 }), parseOutputFormat(options.format), options.output);
290
290
  });
291
291
  quote.command("index-day-kline").option("--security <code>", "Index code (.SH/.SZ/.BJ, or 'all' for full market)", collectList, []).option("--start-date <date>", "Start date (default: 1 year before end-date)").option("--end-date <date>", "End date (default: latest)").option("--limit <number>", "Max rows per request (default: 6000, max: 10000)").option("--field <field>", "Field", collectList, []).option("--format <format>", "Output format", "table").option("--output <path>").action(async (options) => {
292
292
  const client = await createClient();
@@ -1,2 +1,2 @@
1
1
  // Auto-generated — DO NOT EDIT
2
- export const CLI_VERSION = "0.14.0";
2
+ export const CLI_VERSION = "0.14.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gangtise-openapi-cli",
3
- "version": "0.14.0",
3
+ "version": "0.14.1",
4
4
  "description": "CLI for Gangtise OpenAPI",
5
5
  "license": "MIT",
6
6
  "repository": {