gangtise-openapi-cli 0.10.7 → 0.10.9
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 +10 -1
- package/dist/src/cli.js +6 -2
- package/dist/src/core/endpoints.js +7 -0
- package/dist/src/version.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -118,6 +118,7 @@ cp -r gangtise-openapi ~/.hermes/skills/gangtise-openapi
|
|
|
118
118
|
| | `main-business` | 主营构成(按地区/产品拆分) |
|
|
119
119
|
| | `valuation-analysis` | 估值分析 |
|
|
120
120
|
| | `earning-forecast` | 盈利预测(一致预期) |
|
|
121
|
+
| | `top-holders` | 前十大股东/前十大流通股东 |
|
|
121
122
|
| **AI** | `knowledge-batch` | 知识库批量检索 |
|
|
122
123
|
| | `knowledge-resource-download` | 知识资源下载 |
|
|
123
124
|
| | `security-clue` | 个股线索 |
|
|
@@ -252,8 +253,12 @@ gangtise insight roadshow list --institution C100000017
|
|
|
252
253
|
gangtise quote day-kline --security 600519.SH --start-date 2026-03-01 --end-date 2026-03-31
|
|
253
254
|
# 不传 --security 默认返回全市场,不传 --start-date 默认往前一年,不传 --end-date 默认最新
|
|
254
255
|
gangtise quote day-kline --format json
|
|
256
|
+
# 全市场查询(--security all)
|
|
257
|
+
gangtise quote day-kline --security all --start-date 2026-04-01 --end-date 2026-04-01 --limit 100 --format json
|
|
255
258
|
# 港股日K线
|
|
256
259
|
gangtise quote day-kline-hk --security 00700.HK --start-date 2026-03-01 --end-date 2026-03-31
|
|
260
|
+
# 港股全市场
|
|
261
|
+
gangtise quote day-kline-hk --security all --start-date 2026-04-01 --end-date 2026-04-01 --limit 100 --format json
|
|
257
262
|
# A股分钟K线
|
|
258
263
|
gangtise quote minute-kline --security 600519.SH --start-time "2026-04-15 09:30:00" --end-time "2026-04-15 15:00:00" --field open --field close --field volume
|
|
259
264
|
```
|
|
@@ -282,6 +287,10 @@ gangtise fundamental earning-forecast --security-code 600519.SH --consensus netI
|
|
|
282
287
|
gangtise fundamental income-statement-quarterly --security-code 600519.SH --fiscal-year 2025 --period q2 --field netProfit
|
|
283
288
|
# 现金流量表(单季度)
|
|
284
289
|
gangtise fundamental cash-flow-quarterly --security-code 600519.SH --fiscal-year 2025 --period q2 --field netOpCashFlows
|
|
290
|
+
# 前十大股东
|
|
291
|
+
gangtise fundamental top-holders --security-code 600519.SH --holder-type top10 --fiscal-year 2025 --format json
|
|
292
|
+
# 前十大流通股东(按日期范围)
|
|
293
|
+
gangtise fundamental top-holders --security-code 600519.SH --holder-type top10Float --start-date 2025-01-01 --end-date 2025-12-31 --period q3 --format json
|
|
285
294
|
```
|
|
286
295
|
|
|
287
296
|
### AI
|
|
@@ -368,6 +377,6 @@ gangtise raw call insight.opinion.list --body '{"from":0,"size":120}'
|
|
|
368
377
|
| `999997` | 未开通接口权限 |
|
|
369
378
|
| `999999` | Gangtise 系统错误,请稍后重试 |
|
|
370
379
|
| `433007` | 不支持该数据源(`knowledge-resource-download` 需正确的 `resourceType + sourceId` 组合) |
|
|
371
|
-
| `430007` |
|
|
380
|
+
| `430007` | 行情查询超出限制(数据量过大,请缩短日期范围或减少 `--limit`) |
|
|
372
381
|
| `410110` | 异步任务生成中(非终态,需继续轮询) |
|
|
373
382
|
| `410111` | 异步任务生成失败(终态,不可重试) |
|
package/dist/src/cli.js
CHANGED
|
@@ -408,11 +408,11 @@ insight.addCommand(foreignReport);
|
|
|
408
408
|
insight.addCommand(announcement);
|
|
409
409
|
program.addCommand(insight);
|
|
410
410
|
const quote = new Command("quote").description("Quote APIs");
|
|
411
|
-
quote.command("day-kline").option("--security <code>", "Security code (A-share
|
|
411
|
+
quote.command("day-kline").option("--security <code>", "Security code (A-share: .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) => {
|
|
412
412
|
const client = await createClient();
|
|
413
413
|
await printData(await client.call("quote.day-kline", { securityList: maybeArray(options.security), startDate: options.startDate, endDate: options.endDate, limit: options.limit ? Number(options.limit) : undefined, fieldList: maybeArray(options.field) }), parseFormat(options.format), options.output);
|
|
414
414
|
});
|
|
415
|
-
quote.command("day-kline-hk").option("--security <code>", "Security code (HK stock
|
|
415
|
+
quote.command("day-kline-hk").option("--security <code>", "Security code (HK stock: .HK, 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) => {
|
|
416
416
|
const client = await createClient();
|
|
417
417
|
await printData(await client.call("quote.day-kline-hk", { securityList: maybeArray(options.security), startDate: options.startDate, endDate: options.endDate, limit: options.limit ? Number(options.limit) : undefined, fieldList: maybeArray(options.field) }), parseFormat(options.format), options.output);
|
|
418
418
|
});
|
|
@@ -466,6 +466,10 @@ fundamental.command("valuation-analysis").requiredOption("--security-code <code>
|
|
|
466
466
|
}
|
|
467
467
|
await printData(data, parseFormat(options.format), options.output);
|
|
468
468
|
});
|
|
469
|
+
fundamental.command("top-holders").requiredOption("--security-code <code>").addOption(new Option("--holder-type <type>", "Holder type: top10/top10Float").choices(["top10", "top10Float"]).makeOptionMandatory()).option("--start-date <date>").option("--end-date <date>").option("--fiscal-year <year>", "Fiscal year", collectList, []).option("--period <period>", "Period: q1/interim/q3/annual/latest", collectList, []).option("--format <format>", "Output format", "table").option("--output <path>").action(async (options) => {
|
|
470
|
+
const client = await createClient();
|
|
471
|
+
await printData(await client.call("fundamental.top-holders", { securityCode: options.securityCode, holderType: options.holderType, startDate: options.startDate, endDate: options.endDate, fiscalYear: maybeArray(options.fiscalYear), period: options.period.length ? options.period : undefined }), parseFormat(options.format), options.output);
|
|
472
|
+
});
|
|
469
473
|
fundamental.command("earning-forecast").requiredOption("--security-code <code>").option("--start-date <date>", "Start date (default: 1 year before end-date)").option("--end-date <date>", "End date (default: today)").option("--consensus <name>", "Consensus indicator: netIncome/netIncomeYoy/eps/pe/bps/pb/peg/roe/ps", collectList, []).option("--format <format>", "Output format", "table").option("--output <path>").action(async (options) => {
|
|
470
474
|
const client = await createClient();
|
|
471
475
|
const endDate = options.endDate ?? new Date().toISOString().slice(0, 10);
|
|
@@ -218,6 +218,13 @@ export const ENDPOINTS = {
|
|
|
218
218
|
kind: "json",
|
|
219
219
|
description: "Query valuation analysis",
|
|
220
220
|
},
|
|
221
|
+
fundamentalTopHolders: {
|
|
222
|
+
key: "fundamental.top-holders",
|
|
223
|
+
method: "POST",
|
|
224
|
+
path: "/application/open-fundamental/capital-structure/top-holders",
|
|
225
|
+
kind: "json",
|
|
226
|
+
description: "Query top holders (top10 / top10 float)",
|
|
227
|
+
},
|
|
221
228
|
aiKnowledgeBatch: {
|
|
222
229
|
key: "ai.knowledge-batch",
|
|
223
230
|
method: "POST",
|
package/dist/src/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Auto-generated — DO NOT EDIT
|
|
2
|
-
export const CLI_VERSION = "0.10.
|
|
2
|
+
export const CLI_VERSION = "0.10.9";
|