@hithink-tech/hithink-finance-cli 0.1.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/CHANGELOG.md +5 -0
- package/LICENSE +21 -0
- package/README.md +161 -0
- package/SECURITY.md +3 -0
- package/dist/application/config.d.ts +44 -0
- package/dist/application/config.js +111 -0
- package/dist/application/ports/auth-provider.d.ts +23 -0
- package/dist/application/ports/auth-provider.js +2 -0
- package/dist/application/source-policy.d.ts +13 -0
- package/dist/application/source-policy.js +31 -0
- package/dist/application/use-cases/data-clean.d.ts +2 -0
- package/dist/application/use-cases/data-clean.js +18 -0
- package/dist/application/use-cases/data-init.d.ts +4 -0
- package/dist/application/use-cases/data-init.js +9 -0
- package/dist/application/use-cases/data-remove.d.ts +2 -0
- package/dist/application/use-cases/data-remove.js +27 -0
- package/dist/application/use-cases/data-repair.d.ts +5 -0
- package/dist/application/use-cases/data-repair.js +5 -0
- package/dist/application/use-cases/data-sync.d.ts +25 -0
- package/dist/application/use-cases/data-sync.js +55 -0
- package/dist/application/use-cases/local-query.d.ts +4 -0
- package/dist/application/use-cases/local-query.js +88 -0
- package/dist/application/use-cases/market-history.d.ts +8 -0
- package/dist/application/use-cases/market-history.js +16 -0
- package/dist/application/use-cases/market-panel.d.ts +3 -0
- package/dist/application/use-cases/market-panel.js +5 -0
- package/dist/application/use-cases/remote-query.d.ts +4 -0
- package/dist/application/use-cases/remote-query.js +66 -0
- package/dist/cli/context.d.ts +17 -0
- package/dist/cli/context.js +52 -0
- package/dist/cli/i18n.d.ts +23 -0
- package/dist/cli/i18n.js +150 -0
- package/dist/cli/main.d.ts +3 -0
- package/dist/cli/main.js +80 -0
- package/dist/cli/program.d.ts +20 -0
- package/dist/cli/program.js +111 -0
- package/dist/commands/auth/index.d.ts +10 -0
- package/dist/commands/auth/index.js +131 -0
- package/dist/commands/config/index.d.ts +13 -0
- package/dist/commands/config/index.js +26 -0
- package/dist/commands/data/index.d.ts +10 -0
- package/dist/commands/data/index.js +185 -0
- package/dist/commands/db/index.d.ts +4 -0
- package/dist/commands/db/index.js +72 -0
- package/dist/commands/financials/index.d.ts +5 -0
- package/dist/commands/financials/index.js +6 -0
- package/dist/commands/index/index.d.ts +5 -0
- package/dist/commands/index/index.js +6 -0
- package/dist/commands/market/index.d.ts +5 -0
- package/dist/commands/market/index.js +6 -0
- package/dist/commands/market/local.d.ts +4 -0
- package/dist/commands/market/local.js +97 -0
- package/dist/commands/remote.d.ts +11 -0
- package/dist/commands/remote.js +195 -0
- package/dist/commands/skills/index.d.ts +4 -0
- package/dist/commands/skills/index.js +43 -0
- package/dist/commands/special/index.d.ts +5 -0
- package/dist/commands/special/index.js +6 -0
- package/dist/commands/symbol/index.d.ts +5 -0
- package/dist/commands/symbol/index.js +6 -0
- package/dist/commands/system/capabilities.d.ts +4 -0
- package/dist/commands/system/capabilities.js +24 -0
- package/dist/commands/system/doctor.d.ts +4 -0
- package/dist/commands/system/doctor.js +15 -0
- package/dist/commands/system/schema.d.ts +4 -0
- package/dist/commands/system/schema.js +47 -0
- package/dist/commands/system/uninstall.d.ts +11 -0
- package/dist/commands/system/uninstall.js +68 -0
- package/dist/commands/system/update.d.ts +11 -0
- package/dist/commands/system/update.js +72 -0
- package/dist/contracts/envelope.d.ts +37 -0
- package/dist/contracts/envelope.js +36 -0
- package/dist/contracts/errors.d.ts +23 -0
- package/dist/contracts/errors.js +33 -0
- package/dist/contracts/local-capabilities.d.ts +13 -0
- package/dist/contracts/local-capabilities.js +37 -0
- package/dist/contracts/registry.d.ts +9 -0
- package/dist/contracts/registry.js +4 -0
- package/dist/contracts/remote-capabilities.d.ts +24 -0
- package/dist/contracts/remote-capabilities.js +667 -0
- package/dist/domains/financials/types.d.ts +6 -0
- package/dist/domains/financials/types.js +2 -0
- package/dist/domains/index/types.d.ts +6 -0
- package/dist/domains/index/types.js +2 -0
- package/dist/domains/market/types.d.ts +6 -0
- package/dist/domains/market/types.js +2 -0
- package/dist/domains/special/types.d.ts +5 -0
- package/dist/domains/special/types.js +2 -0
- package/dist/domains/symbol/types.d.ts +6 -0
- package/dist/domains/symbol/types.js +2 -0
- package/dist/infrastructure/credentials/api-key-provider.d.ts +14 -0
- package/dist/infrastructure/credentials/api-key-provider.js +102 -0
- package/dist/infrastructure/credentials/keyring.d.ts +15 -0
- package/dist/infrastructure/credentials/keyring.js +21 -0
- package/dist/infrastructure/credentials/redact.d.ts +3 -0
- package/dist/infrastructure/credentials/redact.js +26 -0
- package/dist/infrastructure/duckdb/connection.d.ts +8 -0
- package/dist/infrastructure/duckdb/connection.js +18 -0
- package/dist/infrastructure/duckdb/dump-client.d.ts +20 -0
- package/dist/infrastructure/duckdb/dump-client.js +66 -0
- package/dist/infrastructure/duckdb/factors.d.ts +3 -0
- package/dist/infrastructure/duckdb/factors.js +83 -0
- package/dist/infrastructure/duckdb/importer.d.ts +11 -0
- package/dist/infrastructure/duckdb/importer.js +105 -0
- package/dist/infrastructure/duckdb/migrations.d.ts +17 -0
- package/dist/infrastructure/duckdb/migrations.js +92 -0
- package/dist/infrastructure/duckdb/quality.d.ts +12 -0
- package/dist/infrastructure/duckdb/quality.js +56 -0
- package/dist/infrastructure/duckdb/schema.d.ts +4 -0
- package/dist/infrastructure/duckdb/schema.js +14 -0
- package/dist/infrastructure/filesystem/atomic-file.d.ts +2 -0
- package/dist/infrastructure/filesystem/atomic-file.js +38 -0
- package/dist/infrastructure/filesystem/platform-paths.d.ts +15 -0
- package/dist/infrastructure/filesystem/platform-paths.js +42 -0
- package/dist/infrastructure/filesystem/process-lock.d.ts +6 -0
- package/dist/infrastructure/filesystem/process-lock.js +56 -0
- package/dist/infrastructure/filesystem/stdin.d.ts +5 -0
- package/dist/infrastructure/filesystem/stdin.js +9 -0
- package/dist/infrastructure/fuyao/client.d.ts +31 -0
- package/dist/infrastructure/fuyao/client.js +145 -0
- package/dist/infrastructure/fuyao/envelope.d.ts +9 -0
- package/dist/infrastructure/fuyao/envelope.js +8 -0
- package/dist/infrastructure/fuyao/pagination.d.ts +16 -0
- package/dist/infrastructure/fuyao/pagination.js +44 -0
- package/dist/infrastructure/fuyao/retry.d.ts +5 -0
- package/dist/infrastructure/fuyao/retry.js +18 -0
- package/dist/infrastructure/fuyao/windowing.d.ts +8 -0
- package/dist/infrastructure/fuyao/windowing.js +25 -0
- package/dist/infrastructure/skills/drift.d.ts +3 -0
- package/dist/infrastructure/skills/drift.js +8 -0
- package/dist/infrastructure/skills/installer.d.ts +13 -0
- package/dist/infrastructure/skills/installer.js +48 -0
- package/dist/infrastructure/skills/manifest.d.ts +11 -0
- package/dist/infrastructure/skills/manifest.js +62 -0
- package/dist/infrastructure/updater/cache.d.ts +15 -0
- package/dist/infrastructure/updater/cache.js +76 -0
- package/dist/infrastructure/updater/check.d.ts +13 -0
- package/dist/infrastructure/updater/check.js +51 -0
- package/dist/infrastructure/updater/install.d.ts +4 -0
- package/dist/infrastructure/updater/install.js +39 -0
- package/dist/output/json.d.ts +3 -0
- package/dist/output/json.js +16 -0
- package/dist/output/renderer.d.ts +4 -0
- package/dist/output/renderer.js +47 -0
- package/dist/output/table.d.ts +2 -0
- package/dist/output/table.js +31 -0
- package/migrations/001-initial.sql +95 -0
- package/migrations/manifest.json +12 -0
- package/package.json +66 -0
- package/schemas/capabilities.json +290 -0
- package/schemas/command-envelope.schema.json +12 -0
- package/scripts/postinstall.mjs +27 -0
- package/scripts/update-check.mjs +23 -0
- package/skills/hithink-finance-data/SKILL.md +74 -0
- package/skills/hithink-finance-data/references/data-clean.md +33 -0
- package/skills/hithink-finance-data/references/data-init.md +35 -0
- package/skills/hithink-finance-data/references/data-migrate.md +33 -0
- package/skills/hithink-finance-data/references/data-remove.md +33 -0
- package/skills/hithink-finance-data/references/data-repair.md +33 -0
- package/skills/hithink-finance-data/references/data-status.md +33 -0
- package/skills/hithink-finance-data/references/data-sync.md +34 -0
- package/skills/hithink-finance-data/references/data-validate.md +33 -0
- package/skills/hithink-finance-data/references/db-describe.md +33 -0
- package/skills/hithink-finance-data/references/db-export.md +33 -0
- package/skills/hithink-finance-data/references/db-query.md +33 -0
- package/skills/hithink-finance-financials/SKILL.md +59 -0
- package/skills/hithink-finance-financials/references/financials-balance-sheet.md +40 -0
- package/skills/hithink-finance-financials/references/financials-cash-flow.md +40 -0
- package/skills/hithink-finance-financials/references/financials-income.md +40 -0
- package/skills/hithink-finance-financials/references/financials-indicators.md +37 -0
- package/skills/hithink-finance-index/SKILL.md +59 -0
- package/skills/hithink-finance-index/references/index-catalog.md +36 -0
- package/skills/hithink-finance-index/references/index-constituents.md +36 -0
- package/skills/hithink-finance-index/references/index-history.md +38 -0
- package/skills/hithink-finance-index/references/index-snapshot.md +37 -0
- package/skills/hithink-finance-market/SKILL.md +63 -0
- package/skills/hithink-finance-market/references/market-adjustment-factors.md +33 -0
- package/skills/hithink-finance-market/references/market-calendar.md +35 -0
- package/skills/hithink-finance-market/references/market-corporate-actions.md +38 -0
- package/skills/hithink-finance-market/references/market-history.md +39 -0
- package/skills/hithink-finance-market/references/market-panel.md +33 -0
- package/skills/hithink-finance-market/references/market-snapshot.md +39 -0
- package/skills/hithink-finance-research/SKILL.md +58 -0
- package/skills/hithink-finance-research/references/research-workflow.md +34 -0
- package/skills/hithink-finance-shared/SKILL.md +55 -0
- package/skills/hithink-finance-shared/references/auth-and-config.md +31 -0
- package/skills/hithink-finance-shared/references/global-rules.md +21 -0
- package/skills/hithink-finance-shared/references/lifecycle.md +23 -0
- package/skills/hithink-finance-shared/references/skills-management.md +22 -0
- package/skills/hithink-finance-special-data/SKILL.md +68 -0
- package/skills/hithink-finance-special-data/references/special-anomaly-list.md +36 -0
- package/skills/hithink-finance-special-data/references/special-anomaly-stock.md +37 -0
- package/skills/hithink-finance-special-data/references/special-dragon-tiger.md +37 -0
- package/skills/hithink-finance-special-data/references/special-hot-stock-history.md +36 -0
- package/skills/hithink-finance-special-data/references/special-hot-stock-trend.md +38 -0
- package/skills/hithink-finance-special-data/references/special-hot-stock.md +36 -0
- package/skills/hithink-finance-special-data/references/special-limit-up-ladder.md +35 -0
- package/skills/hithink-finance-special-data/references/special-limit-up-pool.md +40 -0
- package/skills/hithink-finance-special-data/references/special-skyrocket.md +36 -0
- package/skills/hithink-finance-symbol/SKILL.md +56 -0
- package/skills/hithink-finance-symbol/references/symbol-list.md +39 -0
- package/skills/hithink-finance-symbol/references/symbol-search.md +39 -0
- package/skills/manifest.json +55 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# `hithink-finance data validate`
|
|
2
|
+
|
|
3
|
+
## 前置条件
|
|
4
|
+
|
|
5
|
+
- 先读取本 skill 的 `SKILL.md` 和 `../hithink-finance-shared/SKILL.md`。
|
|
6
|
+
- 执行前用 `hithink-finance schema data.validate --format json` 确认当前参数契约。
|
|
7
|
+
- 本地命令通常需要可用 DuckDB 或本地数据目录。
|
|
8
|
+
- 用于同步、迁移、研究导出前的质量门禁。
|
|
9
|
+
|
|
10
|
+
## 命令
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
hithink-finance schema data.validate --format json
|
|
14
|
+
hithink-finance data validate --format json
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## 参数选择策略
|
|
18
|
+
|
|
19
|
+
- 可用全局 `--db <path>` 指定库。
|
|
20
|
+
|
|
21
|
+
## 窗口与分页
|
|
22
|
+
|
|
23
|
+
- 本地命令无远端分页;只有声明 `--output` 的命令可直接落盘;其他大结果改用导出命令。
|
|
24
|
+
|
|
25
|
+
## 常见错误
|
|
26
|
+
|
|
27
|
+
- 本地库不存在或 schema 不兼容时先运行 `data status` / `data migrate`。
|
|
28
|
+
- 报告数据质量问题时给出 check 名称和 count,不要展开全量行。
|
|
29
|
+
|
|
30
|
+
## 批量操作说明
|
|
31
|
+
|
|
32
|
+
- 批量或全量请求必须落盘,最终只报告路径、行数和窗口。
|
|
33
|
+
- 如果需要多标的循环,逐批执行并记录每批参数;不要把完整结果塞进上下文。
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# `hithink-finance db describe`
|
|
2
|
+
|
|
3
|
+
## 前置条件
|
|
4
|
+
|
|
5
|
+
- 先读取本 skill 的 `SKILL.md` 和 `../hithink-finance-shared/SKILL.md`。
|
|
6
|
+
- 执行前用 `hithink-finance schema db.describe --format json` 确认当前参数契约。
|
|
7
|
+
- 本地命令通常需要可用 DuckDB 或本地数据目录。
|
|
8
|
+
- 查询本地 DuckDB 表和视图清单。
|
|
9
|
+
|
|
10
|
+
## 命令
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
hithink-finance schema db.describe --format json
|
|
14
|
+
hithink-finance db describe --format json
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## 参数选择策略
|
|
18
|
+
|
|
19
|
+
- 可用全局 `--db <path>` 指定库。
|
|
20
|
+
|
|
21
|
+
## 窗口与分页
|
|
22
|
+
|
|
23
|
+
- 本地命令无远端分页;只有声明 `--output` 的命令可直接落盘;其他大结果改用导出命令。
|
|
24
|
+
|
|
25
|
+
## 常见错误
|
|
26
|
+
|
|
27
|
+
- 本地库不存在或 schema 不兼容时先运行 `data status` / `data migrate`。
|
|
28
|
+
- 如果库不存在或 schema 不兼容,先处理 `data status|migrate`。
|
|
29
|
+
|
|
30
|
+
## 批量操作说明
|
|
31
|
+
|
|
32
|
+
- 批量或全量请求必须落盘,最终只报告路径、行数和窗口。
|
|
33
|
+
- 如果需要多标的循环,逐批执行并记录每批参数;不要把完整结果塞进上下文。
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# `hithink-finance db export`
|
|
2
|
+
|
|
3
|
+
## 前置条件
|
|
4
|
+
|
|
5
|
+
- 先读取本 skill 的 `SKILL.md` 和 `../hithink-finance-shared/SKILL.md`。
|
|
6
|
+
- 执行前用 `hithink-finance schema db.export --format json` 确认当前参数契约。
|
|
7
|
+
- 本地命令通常需要可用 DuckDB 或本地数据目录。
|
|
8
|
+
- 用于大结果或下游 pandas/notebook 消费。
|
|
9
|
+
|
|
10
|
+
## 命令
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
hithink-finance schema db.export --format json
|
|
14
|
+
hithink-finance db export --sql <sql> --output <path> --format json
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## 参数选择策略
|
|
18
|
+
|
|
19
|
+
- 必填 `--sql <sql>` 和 `--output <path>`;`--file-format ndjson|csv|parquet`。
|
|
20
|
+
|
|
21
|
+
## 窗口与分页
|
|
22
|
+
|
|
23
|
+
- 本地命令无远端分页;只有声明 `--output` 的命令可直接落盘;其他大结果改用导出命令。
|
|
24
|
+
|
|
25
|
+
## 常见错误
|
|
26
|
+
|
|
27
|
+
- 本地库不存在或 schema 不兼容时先运行 `data status` / `data migrate`。
|
|
28
|
+
- 导出后只汇报路径、格式、行数,不回显文件内容。
|
|
29
|
+
|
|
30
|
+
## 批量操作说明
|
|
31
|
+
|
|
32
|
+
- 批量或全量请求必须落盘,最终只报告路径、行数和窗口。
|
|
33
|
+
- 如果需要多标的循环,逐批执行并记录每批参数;不要把完整结果塞进上下文。
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# `hithink-finance db query`
|
|
2
|
+
|
|
3
|
+
## 前置条件
|
|
4
|
+
|
|
5
|
+
- 先读取本 skill 的 `SKILL.md` 和 `../hithink-finance-shared/SKILL.md`。
|
|
6
|
+
- 执行前用 `hithink-finance schema db.query --format json` 确认当前参数契约。
|
|
7
|
+
- 本地命令通常需要可用 DuckDB 或本地数据目录。
|
|
8
|
+
- 只读 SQL;小结果才可直接读取 JSON。
|
|
9
|
+
|
|
10
|
+
## 命令
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
hithink-finance schema db.query --format json
|
|
14
|
+
hithink-finance db query --sql <sql> --format json
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## 参数选择策略
|
|
18
|
+
|
|
19
|
+
- 必填 `--sql <sql>`;大结果改用 `db export`。
|
|
20
|
+
|
|
21
|
+
## 窗口与分页
|
|
22
|
+
|
|
23
|
+
- 本地命令无远端分页;只有声明 `--output` 的命令可直接落盘;其他大结果改用导出命令。
|
|
24
|
+
|
|
25
|
+
## 常见错误
|
|
26
|
+
|
|
27
|
+
- 本地库不存在或 schema 不兼容时先运行 `data status` / `data migrate`。
|
|
28
|
+
- 不要执行写入、DDL、删除、外部函数或会改变状态的 SQL。
|
|
29
|
+
|
|
30
|
+
## 批量操作说明
|
|
31
|
+
|
|
32
|
+
- 批量或全量请求必须落盘,最终只报告路径、行数和窗口。
|
|
33
|
+
- 如果需要多标的循环,逐批执行并记录每批参数;不要把完整结果塞进上下文。
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hithink-finance-financials
|
|
3
|
+
description: '用于 Agent 通过 hithink-finance CLI 查询 A 股利润表、资产负债表、现金流量表、财务指标、年度/季度报告窗口;价格行情转 hithink-finance-market,指数财务不在本 skill 范围。'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# hithink-finance-financials
|
|
7
|
+
|
|
8
|
+
A 股财务报表和指标入口。把报告期、时间窗口和 limit 约束转成稳定命令。
|
|
9
|
+
|
|
10
|
+
## 前置条件表
|
|
11
|
+
|
|
12
|
+
| 条件 | 操作 |
|
|
13
|
+
| -------------------------------------- | ----------------------------------------------------------------------------------------------------- |
|
|
14
|
+
| 开始任何 CLI 调用 | 先读取并遵循 [hithink-finance-shared](../hithink-finance-shared/SKILL.md) |
|
|
15
|
+
| 不确定命令是否存在或参数是否变化 | 运行 `hithink-finance capabilities --format json`,再运行 `hithink-finance schema <id> --format json` |
|
|
16
|
+
| 需要执行下表某个命令 | 先读取对应 reference 文件,不要只凭命令名猜参数 |
|
|
17
|
+
| 结果可能是全市场、分页、多标的或长区间 | 使用命令声明的 `--output <path>` 落盘;远端 stdout 只返回摘要 |
|
|
18
|
+
|
|
19
|
+
## 快速决策
|
|
20
|
+
|
|
21
|
+
| 用户意图 | 首选命令 / 路由 |
|
|
22
|
+
| ----------------------- | ----------------------------- |
|
|
23
|
+
| 利润表/收入成本利润项目 | `financials income` |
|
|
24
|
+
| 资产负债结构 | `financials balance-sheet` |
|
|
25
|
+
| 现金流量项目 | `financials cash-flow` |
|
|
26
|
+
| 单个报告期的财务指标 | `financials indicators` |
|
|
27
|
+
| 用户问价格或涨跌 | 切到 `hithink-finance-market` |
|
|
28
|
+
|
|
29
|
+
## Shortcuts
|
|
30
|
+
|
|
31
|
+
| 命令 | 何时使用 |
|
|
32
|
+
| ------------------------------------------------------------------ | ---------------------------------------- |
|
|
33
|
+
| [financials balance-sheet](references/financials-balance-sheet.md) | Query balance-sheet financial statements |
|
|
34
|
+
| [financials cash-flow](references/financials-cash-flow.md) | Query cash-flow financial statements |
|
|
35
|
+
| [financials income](references/financials-income.md) | Query income financial statements |
|
|
36
|
+
| [financials indicators](references/financials-indicators.md) | Query financial indicators for a report |
|
|
37
|
+
|
|
38
|
+
## 原生命令与 schema
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
hithink-finance capabilities --format json
|
|
42
|
+
hithink-finance schema <capability-id> --format json
|
|
43
|
+
hithink-finance financials <command> --help
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
使用原生命令前必须先看 schema;schema 是当前 CLI 参数契约,reference 是决策和边界补充。
|
|
47
|
+
|
|
48
|
+
## 权限表
|
|
49
|
+
|
|
50
|
+
| 命令类型 | 要求 |
|
|
51
|
+
| ------------------------------ | ---------------------------------------------------------------------- |
|
|
52
|
+
| 远端服务查询 | API Key 来自系统凭据库、`HITHINK_FINANCE_API_KEY` 或 `--api-key-stdin` |
|
|
53
|
+
| 本地 DuckDB 查询/导出 | 本地库存在且 schema 兼容;可用全局 `--db <path>` 指定 |
|
|
54
|
+
| 删除、迁移、修复等有副作用操作 | 先预览或说明影响;需要用户明确确认时才加 `--yes` |
|
|
55
|
+
|
|
56
|
+
## 边界声明
|
|
57
|
+
|
|
58
|
+
- 财务报表窗口最多 10 年;超过时拆分不重叠窗口并合并去重。
|
|
59
|
+
- `--limit` 与 `--start-ms/--end-ms` 互斥;不要同时传。
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# `hithink-finance financials balance-sheet`
|
|
2
|
+
|
|
3
|
+
## 前置条件
|
|
4
|
+
|
|
5
|
+
- 先读取本 skill 的 `SKILL.md` 和 `../hithink-finance-shared/SKILL.md`。
|
|
6
|
+
- 执行前用 `hithink-finance schema financials.balance-sheet --format json` 确认当前参数契约。
|
|
7
|
+
- 远端命令需要 API Key;认证失败时回到 shared skill。
|
|
8
|
+
|
|
9
|
+
## 命令
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
hithink-finance schema financials.balance-sheet --format json
|
|
13
|
+
hithink-finance financials balance-sheet --thscode <code> --format json
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## 参数选择策略
|
|
17
|
+
|
|
18
|
+
| 参数 | 必填 | 说明 |
|
|
19
|
+
| --------------------------- | ---- | ------------------------------------------------------- |
|
|
20
|
+
| `--thscode <code>` | 是 | single A-share thscode |
|
|
21
|
+
| `--period <period>` | 否 | financial period;可选: annual, quarterly;默认: annual |
|
|
22
|
+
| `--limit <number>` | 否 | recent report count (1-20) |
|
|
23
|
+
| `--start-ms <milliseconds>` | 否 | range start in milliseconds;上游参数: start |
|
|
24
|
+
| `--end-ms <milliseconds>` | 否 | range end in milliseconds;上游参数: end |
|
|
25
|
+
| `--output <path>` | 否 | write the full JSON response envelope to a file |
|
|
26
|
+
|
|
27
|
+
## 窗口与分页
|
|
28
|
+
|
|
29
|
+
- 单次请求窗口最多 10 年;超过时拆分为不重叠窗口并合并去重。
|
|
30
|
+
- 无分页参数;仍检查返回中的 count/数组长度。
|
|
31
|
+
|
|
32
|
+
## 常见错误
|
|
33
|
+
|
|
34
|
+
- 参数校验失败时按 `error.hint` 修正,不要猜字段名。
|
|
35
|
+
- 认证失败时不要重试刷屏;先处理 API Key。
|
|
36
|
+
|
|
37
|
+
## 批量操作说明
|
|
38
|
+
|
|
39
|
+
- 批量或全量请求必须落盘,最终只报告路径、行数和窗口。
|
|
40
|
+
- 如果需要多标的循环,逐批执行并记录每批参数;不要把完整结果塞进上下文。
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# `hithink-finance financials cash-flow`
|
|
2
|
+
|
|
3
|
+
## 前置条件
|
|
4
|
+
|
|
5
|
+
- 先读取本 skill 的 `SKILL.md` 和 `../hithink-finance-shared/SKILL.md`。
|
|
6
|
+
- 执行前用 `hithink-finance schema financials.cash-flow --format json` 确认当前参数契约。
|
|
7
|
+
- 远端命令需要 API Key;认证失败时回到 shared skill。
|
|
8
|
+
|
|
9
|
+
## 命令
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
hithink-finance schema financials.cash-flow --format json
|
|
13
|
+
hithink-finance financials cash-flow --thscode <code> --format json
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## 参数选择策略
|
|
17
|
+
|
|
18
|
+
| 参数 | 必填 | 说明 |
|
|
19
|
+
| --------------------------- | ---- | ------------------------------------------------------- |
|
|
20
|
+
| `--thscode <code>` | 是 | single A-share thscode |
|
|
21
|
+
| `--period <period>` | 否 | financial period;可选: annual, quarterly;默认: annual |
|
|
22
|
+
| `--limit <number>` | 否 | recent report count (1-20) |
|
|
23
|
+
| `--start-ms <milliseconds>` | 否 | range start in milliseconds;上游参数: start |
|
|
24
|
+
| `--end-ms <milliseconds>` | 否 | range end in milliseconds;上游参数: end |
|
|
25
|
+
| `--output <path>` | 否 | write the full JSON response envelope to a file |
|
|
26
|
+
|
|
27
|
+
## 窗口与分页
|
|
28
|
+
|
|
29
|
+
- 单次请求窗口最多 10 年;超过时拆分为不重叠窗口并合并去重。
|
|
30
|
+
- 无分页参数;仍检查返回中的 count/数组长度。
|
|
31
|
+
|
|
32
|
+
## 常见错误
|
|
33
|
+
|
|
34
|
+
- 参数校验失败时按 `error.hint` 修正,不要猜字段名。
|
|
35
|
+
- 认证失败时不要重试刷屏;先处理 API Key。
|
|
36
|
+
|
|
37
|
+
## 批量操作说明
|
|
38
|
+
|
|
39
|
+
- 批量或全量请求必须落盘,最终只报告路径、行数和窗口。
|
|
40
|
+
- 如果需要多标的循环,逐批执行并记录每批参数;不要把完整结果塞进上下文。
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# `hithink-finance financials income`
|
|
2
|
+
|
|
3
|
+
## 前置条件
|
|
4
|
+
|
|
5
|
+
- 先读取本 skill 的 `SKILL.md` 和 `../hithink-finance-shared/SKILL.md`。
|
|
6
|
+
- 执行前用 `hithink-finance schema financials.income --format json` 确认当前参数契约。
|
|
7
|
+
- 远端命令需要 API Key;认证失败时回到 shared skill。
|
|
8
|
+
|
|
9
|
+
## 命令
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
hithink-finance schema financials.income --format json
|
|
13
|
+
hithink-finance financials income --thscode <code> --format json
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## 参数选择策略
|
|
17
|
+
|
|
18
|
+
| 参数 | 必填 | 说明 |
|
|
19
|
+
| --------------------------- | ---- | ------------------------------------------------------- |
|
|
20
|
+
| `--thscode <code>` | 是 | single A-share thscode |
|
|
21
|
+
| `--period <period>` | 否 | financial period;可选: annual, quarterly;默认: annual |
|
|
22
|
+
| `--limit <number>` | 否 | recent report count (1-20) |
|
|
23
|
+
| `--start-ms <milliseconds>` | 否 | range start in milliseconds;上游参数: start |
|
|
24
|
+
| `--end-ms <milliseconds>` | 否 | range end in milliseconds;上游参数: end |
|
|
25
|
+
| `--output <path>` | 否 | write the full JSON response envelope to a file |
|
|
26
|
+
|
|
27
|
+
## 窗口与分页
|
|
28
|
+
|
|
29
|
+
- 单次请求窗口最多 10 年;超过时拆分为不重叠窗口并合并去重。
|
|
30
|
+
- 无分页参数;仍检查返回中的 count/数组长度。
|
|
31
|
+
|
|
32
|
+
## 常见错误
|
|
33
|
+
|
|
34
|
+
- 参数校验失败时按 `error.hint` 修正,不要猜字段名。
|
|
35
|
+
- 认证失败时不要重试刷屏;先处理 API Key。
|
|
36
|
+
|
|
37
|
+
## 批量操作说明
|
|
38
|
+
|
|
39
|
+
- 批量或全量请求必须落盘,最终只报告路径、行数和窗口。
|
|
40
|
+
- 如果需要多标的循环,逐批执行并记录每批参数;不要把完整结果塞进上下文。
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# `hithink-finance financials indicators`
|
|
2
|
+
|
|
3
|
+
## 前置条件
|
|
4
|
+
|
|
5
|
+
- 先读取本 skill 的 `SKILL.md` 和 `../hithink-finance-shared/SKILL.md`。
|
|
6
|
+
- 执行前用 `hithink-finance schema financials.indicators --format json` 确认当前参数契约。
|
|
7
|
+
- 远端命令需要 API Key;认证失败时回到 shared skill。
|
|
8
|
+
|
|
9
|
+
## 命令
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
hithink-finance schema financials.indicators --format json
|
|
13
|
+
hithink-finance financials indicators --thscode <code> --report <period> --format json
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## 参数选择策略
|
|
17
|
+
|
|
18
|
+
| 参数 | 必填 | 说明 |
|
|
19
|
+
| ------------------- | ---- | ----------------------------------------------- |
|
|
20
|
+
| `--thscode <code>` | 是 | single A-share thscode |
|
|
21
|
+
| `--report <period>` | 是 | report quarter YYYY-[1-4] |
|
|
22
|
+
| `--output <path>` | 否 | write the full JSON response envelope to a file |
|
|
23
|
+
|
|
24
|
+
## 窗口与分页
|
|
25
|
+
|
|
26
|
+
- 无额外时间窗口限制,仍按命令参数和上游返回为准。
|
|
27
|
+
- 无分页参数;仍检查返回中的 count/数组长度。
|
|
28
|
+
|
|
29
|
+
## 常见错误
|
|
30
|
+
|
|
31
|
+
- 参数校验失败时按 `error.hint` 修正,不要猜字段名。
|
|
32
|
+
- 认证失败时不要重试刷屏;先处理 API Key。
|
|
33
|
+
|
|
34
|
+
## 批量操作说明
|
|
35
|
+
|
|
36
|
+
- 批量或全量请求必须落盘,最终只报告路径、行数和窗口。
|
|
37
|
+
- 如果需要多标的循环,逐批执行并记录每批参数;不要把完整结果塞进上下文。
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hithink-finance-index
|
|
3
|
+
description: '用于 Agent 通过 hithink-finance CLI 查询同花顺指数/概念/行业/地域/特色指数目录、指数成分股、指数快照和指数历史;个股行情转 hithink-finance-market,股票代码搜索转 hithink-finance-symbol。'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# hithink-finance-index
|
|
7
|
+
|
|
8
|
+
指数目录、指数成分和指数行情入口。只处理指数对象及其成分关系。
|
|
9
|
+
|
|
10
|
+
## 前置条件表
|
|
11
|
+
|
|
12
|
+
| 条件 | 操作 |
|
|
13
|
+
| -------------------------------------- | ----------------------------------------------------------------------------------------------------- |
|
|
14
|
+
| 开始任何 CLI 调用 | 先读取并遵循 [hithink-finance-shared](../hithink-finance-shared/SKILL.md) |
|
|
15
|
+
| 不确定命令是否存在或参数是否变化 | 运行 `hithink-finance capabilities --format json`,再运行 `hithink-finance schema <id> --format json` |
|
|
16
|
+
| 需要执行下表某个命令 | 先读取对应 reference 文件,不要只凭命令名猜参数 |
|
|
17
|
+
| 结果可能是全市场、分页、多标的或长区间 | 使用命令声明的 `--output <path>` 落盘;远端 stdout 只返回摘要 |
|
|
18
|
+
|
|
19
|
+
## 快速决策
|
|
20
|
+
|
|
21
|
+
| 用户意图 | 首选命令 / 路由 |
|
|
22
|
+
| ----------------------------- | ----------------------------- |
|
|
23
|
+
| 找概念/行业/地域/特色指数目录 | `index catalog` |
|
|
24
|
+
| 查某个指数成分股 | `index constituents` |
|
|
25
|
+
| 查指数实时快照 | `index snapshot` |
|
|
26
|
+
| 查指数历史日线 | `index history` |
|
|
27
|
+
| 查个股历史/快照 | 切到 `hithink-finance-market` |
|
|
28
|
+
|
|
29
|
+
## Shortcuts
|
|
30
|
+
|
|
31
|
+
| 命令 | 何时使用 |
|
|
32
|
+
| ------------------------------------------------------ | ---------------------------- |
|
|
33
|
+
| [index catalog](references/index-catalog.md) | List THS indices by category |
|
|
34
|
+
| [index constituents](references/index-constituents.md) | Query index constituents |
|
|
35
|
+
| [index history](references/index-history.md) | Query daily index history |
|
|
36
|
+
| [index snapshot](references/index-snapshot.md) | Query index price snapshots |
|
|
37
|
+
|
|
38
|
+
## 原生命令与 schema
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
hithink-finance capabilities --format json
|
|
42
|
+
hithink-finance schema <capability-id> --format json
|
|
43
|
+
hithink-finance index <command> --help
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
使用原生命令前必须先看 schema;schema 是当前 CLI 参数契约,reference 是决策和边界补充。
|
|
47
|
+
|
|
48
|
+
## 权限表
|
|
49
|
+
|
|
50
|
+
| 命令类型 | 要求 |
|
|
51
|
+
| ------------------------------ | ---------------------------------------------------------------------- |
|
|
52
|
+
| 远端服务查询 | API Key 来自系统凭据库、`HITHINK_FINANCE_API_KEY` 或 `--api-key-stdin` |
|
|
53
|
+
| 本地 DuckDB 查询/导出 | 本地库存在且 schema 兼容;可用全局 `--db <path>` 指定 |
|
|
54
|
+
| 删除、迁移、修复等有副作用操作 | 先预览或说明影响;需要用户明确确认时才加 `--yes` |
|
|
55
|
+
|
|
56
|
+
## 边界声明
|
|
57
|
+
|
|
58
|
+
- 指数代码通常是 `000000.SH/SZ/BJ/TI` 形式;不要把 A 股股票 thscode 当指数代码。
|
|
59
|
+
- 成分股结果是指数成员关系,不等于用户的投资组合或推荐清单。
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# `hithink-finance index catalog`
|
|
2
|
+
|
|
3
|
+
## 前置条件
|
|
4
|
+
|
|
5
|
+
- 先读取本 skill 的 `SKILL.md` 和 `../hithink-finance-shared/SKILL.md`。
|
|
6
|
+
- 执行前用 `hithink-finance schema index.catalog --format json` 确认当前参数契约。
|
|
7
|
+
- 远端命令需要 API Key;认证失败时回到 shared skill。
|
|
8
|
+
|
|
9
|
+
## 命令
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
hithink-finance schema index.catalog --format json
|
|
13
|
+
hithink-finance index catalog --format json
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## 参数选择策略
|
|
17
|
+
|
|
18
|
+
| 参数 | 必填 | 说明 |
|
|
19
|
+
| ----------------- | ---- | -------------------------------------------------------------------------- |
|
|
20
|
+
| `--tag <tag>` | 否 | index category;可选: cn_concept, region, tszs, industry;默认: cn_concept |
|
|
21
|
+
| `--output <path>` | 否 | write the full JSON response envelope to a file |
|
|
22
|
+
|
|
23
|
+
## 窗口与分页
|
|
24
|
+
|
|
25
|
+
- 无额外时间窗口限制,仍按命令参数和上游返回为准。
|
|
26
|
+
- 无分页参数;仍检查返回中的 count/数组长度。
|
|
27
|
+
|
|
28
|
+
## 常见错误
|
|
29
|
+
|
|
30
|
+
- 参数校验失败时按 `error.hint` 修正,不要猜字段名。
|
|
31
|
+
- 认证失败时不要重试刷屏;先处理 API Key。
|
|
32
|
+
|
|
33
|
+
## 批量操作说明
|
|
34
|
+
|
|
35
|
+
- 批量或全量请求必须落盘,最终只报告路径、行数和窗口。
|
|
36
|
+
- 如果需要多标的循环,逐批执行并记录每批参数;不要把完整结果塞进上下文。
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# `hithink-finance index constituents`
|
|
2
|
+
|
|
3
|
+
## 前置条件
|
|
4
|
+
|
|
5
|
+
- 先读取本 skill 的 `SKILL.md` 和 `../hithink-finance-shared/SKILL.md`。
|
|
6
|
+
- 执行前用 `hithink-finance schema index.constituents --format json` 确认当前参数契约。
|
|
7
|
+
- 远端命令需要 API Key;认证失败时回到 shared skill。
|
|
8
|
+
|
|
9
|
+
## 命令
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
hithink-finance schema index.constituents --format json
|
|
13
|
+
hithink-finance index constituents --thscode <code> --format json
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## 参数选择策略
|
|
17
|
+
|
|
18
|
+
| 参数 | 必填 | 说明 |
|
|
19
|
+
| ------------------ | ---- | ----------------------------------------------- |
|
|
20
|
+
| `--thscode <code>` | 是 | single index thscode |
|
|
21
|
+
| `--output <path>` | 否 | write the full JSON response envelope to a file |
|
|
22
|
+
|
|
23
|
+
## 窗口与分页
|
|
24
|
+
|
|
25
|
+
- 无额外时间窗口限制,仍按命令参数和上游返回为准。
|
|
26
|
+
- 无分页参数;仍检查返回中的 count/数组长度。
|
|
27
|
+
|
|
28
|
+
## 常见错误
|
|
29
|
+
|
|
30
|
+
- 参数校验失败时按 `error.hint` 修正,不要猜字段名。
|
|
31
|
+
- 认证失败时不要重试刷屏;先处理 API Key。
|
|
32
|
+
|
|
33
|
+
## 批量操作说明
|
|
34
|
+
|
|
35
|
+
- 批量或全量请求必须落盘,最终只报告路径、行数和窗口。
|
|
36
|
+
- 如果需要多标的循环,逐批执行并记录每批参数;不要把完整结果塞进上下文。
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# `hithink-finance index history`
|
|
2
|
+
|
|
3
|
+
## 前置条件
|
|
4
|
+
|
|
5
|
+
- 先读取本 skill 的 `SKILL.md` 和 `../hithink-finance-shared/SKILL.md`。
|
|
6
|
+
- 执行前用 `hithink-finance schema index.history --format json` 确认当前参数契约。
|
|
7
|
+
- 远端命令需要 API Key;认证失败时回到 shared skill。
|
|
8
|
+
|
|
9
|
+
## 命令
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
hithink-finance schema index.history --format json
|
|
13
|
+
hithink-finance index history --thscode <code> --start-ms <milliseconds> --end-ms <milliseconds> --format json
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## 参数选择策略
|
|
17
|
+
|
|
18
|
+
| 参数 | 必填 | 说明 |
|
|
19
|
+
| --------------------------- | ---- | ----------------------------------------------- |
|
|
20
|
+
| `--thscode <code>` | 是 | single index thscode |
|
|
21
|
+
| `--start-ms <milliseconds>` | 是 | start timestamp;上游参数: start |
|
|
22
|
+
| `--end-ms <milliseconds>` | 是 | end timestamp;上游参数: end |
|
|
23
|
+
| `--output <path>` | 否 | write the full JSON response envelope to a file |
|
|
24
|
+
|
|
25
|
+
## 窗口与分页
|
|
26
|
+
|
|
27
|
+
- 单次请求窗口最多 10 年;超过时拆分为不重叠窗口并合并去重。
|
|
28
|
+
- 无分页参数;仍检查返回中的 count/数组长度。
|
|
29
|
+
|
|
30
|
+
## 常见错误
|
|
31
|
+
|
|
32
|
+
- 参数校验失败时按 `error.hint` 修正,不要猜字段名。
|
|
33
|
+
- 认证失败时不要重试刷屏;先处理 API Key。
|
|
34
|
+
|
|
35
|
+
## 批量操作说明
|
|
36
|
+
|
|
37
|
+
- 批量或全量请求必须落盘,最终只报告路径、行数和窗口。
|
|
38
|
+
- 如果需要多标的循环,逐批执行并记录每批参数;不要把完整结果塞进上下文。
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# `hithink-finance index snapshot`
|
|
2
|
+
|
|
3
|
+
## 前置条件
|
|
4
|
+
|
|
5
|
+
- 先读取本 skill 的 `SKILL.md` 和 `../hithink-finance-shared/SKILL.md`。
|
|
6
|
+
- 执行前用 `hithink-finance schema index.snapshot --format json` 确认当前参数契约。
|
|
7
|
+
- 远端命令需要 API Key;认证失败时回到 shared skill。
|
|
8
|
+
|
|
9
|
+
## 命令
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
hithink-finance schema index.snapshot --format json
|
|
13
|
+
hithink-finance index snapshot --thscodes <codes> --format json
|
|
14
|
+
hithink-finance index snapshot --codes-file codes.txt --output result.json --format json
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## 参数选择策略
|
|
18
|
+
|
|
19
|
+
| 参数 | 必填 | 说明 |
|
|
20
|
+
| -------------------- | ---- | ----------------------------------------------- |
|
|
21
|
+
| `--thscodes <codes>` | 是 | comma-separated index thscodes |
|
|
22
|
+
| `--output <path>` | 否 | write the full JSON response envelope to a file |
|
|
23
|
+
|
|
24
|
+
## 窗口与分页
|
|
25
|
+
|
|
26
|
+
- 无额外时间窗口限制,仍按命令参数和上游返回为准。
|
|
27
|
+
- 无分页参数;仍检查返回中的 count/数组长度。
|
|
28
|
+
|
|
29
|
+
## 常见错误
|
|
30
|
+
|
|
31
|
+
- 参数校验失败时按 `error.hint` 修正,不要猜字段名。
|
|
32
|
+
- 认证失败时不要重试刷屏;先处理 API Key。
|
|
33
|
+
|
|
34
|
+
## 批量操作说明
|
|
35
|
+
|
|
36
|
+
- 批量或全量请求必须落盘,最终只报告路径、行数和窗口。
|
|
37
|
+
- 支持 `--codes-file` 或 `--codes-stdin` 读取多 thscode;不要同时用 `--api-key-stdin` 和 `--codes-stdin`。
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hithink-finance-market
|
|
3
|
+
description: '用于 Agent 通过 hithink-finance CLI 获取普通 A 股行情快照、历史 K 线、交易日历、复权因子、公司行动、本地全市场面板;涨停、热榜、龙虎榜、异动和游资机构榜转 hithink-finance-special-data。'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# hithink-finance-market
|
|
7
|
+
|
|
8
|
+
普通行情和本地行情派生能力。优先使用本地库覆盖的历史/面板能力,必要时走远端同花顺金融数据服务。
|
|
9
|
+
|
|
10
|
+
## 前置条件表
|
|
11
|
+
|
|
12
|
+
| 条件 | 操作 |
|
|
13
|
+
| -------------------------------------- | ----------------------------------------------------------------------------------------------------- |
|
|
14
|
+
| 开始任何 CLI 调用 | 先读取并遵循 [hithink-finance-shared](../hithink-finance-shared/SKILL.md) |
|
|
15
|
+
| 不确定命令是否存在或参数是否变化 | 运行 `hithink-finance capabilities --format json`,再运行 `hithink-finance schema <id> --format json` |
|
|
16
|
+
| 需要执行下表某个命令 | 先读取对应 reference 文件,不要只凭命令名猜参数 |
|
|
17
|
+
| 结果可能是全市场、分页、多标的或长区间 | 使用命令声明的 `--output <path>` 落盘;远端 stdout 只返回摘要 |
|
|
18
|
+
|
|
19
|
+
## 快速决策
|
|
20
|
+
|
|
21
|
+
| 用户意图 | 首选命令 / 路由 |
|
|
22
|
+
| -------------------------------- | ------------------------------------------------------ |
|
|
23
|
+
| 单票历史日线/K 线 | `market history`;`--source auto` 会在本地覆盖时走本地 |
|
|
24
|
+
| 实时或分页行情快照 | `market snapshot` |
|
|
25
|
+
| 交易日历 | `market calendar` |
|
|
26
|
+
| 复权因子 | `market adjustment-factors` |
|
|
27
|
+
| 公司行动/除权除息事件 | `market corporate-actions` |
|
|
28
|
+
| 全市场区间面板/批量研究输入 | `market panel --output <file>` |
|
|
29
|
+
| 涨停池、连板、热股、龙虎榜、异动 | 切到 `hithink-finance-special-data` |
|
|
30
|
+
|
|
31
|
+
## Shortcuts
|
|
32
|
+
|
|
33
|
+
| 命令 | 何时使用 |
|
|
34
|
+
| -------------------------------------------------------------------- | ---------------------------------------------- |
|
|
35
|
+
| [market adjustment-factors](references/market-adjustment-factors.md) | 查询本地日级复权因子;需要本地库。 |
|
|
36
|
+
| [market calendar](references/market-calendar.md) | Query the one-year A-share trading calendar |
|
|
37
|
+
| [market corporate-actions](references/market-corporate-actions.md) | Query adjustment events |
|
|
38
|
+
| [market history](references/market-history.md) | Query daily A-share history |
|
|
39
|
+
| [market panel](references/market-panel.md) | 需要本地库覆盖请求窗口;适合作为研究样本输入。 |
|
|
40
|
+
| [market snapshot](references/market-snapshot.md) | Query A-share price snapshots |
|
|
41
|
+
|
|
42
|
+
## 原生命令与 schema
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
hithink-finance capabilities --format json
|
|
46
|
+
hithink-finance schema <capability-id> --format json
|
|
47
|
+
hithink-finance market <command> --help
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
使用原生命令前必须先看 schema;schema 是当前 CLI 参数契约,reference 是决策和边界补充。
|
|
51
|
+
|
|
52
|
+
## 权限表
|
|
53
|
+
|
|
54
|
+
| 命令类型 | 要求 |
|
|
55
|
+
| ------------------------------ | ---------------------------------------------------------------------- |
|
|
56
|
+
| 远端服务查询 | API Key 来自系统凭据库、`HITHINK_FINANCE_API_KEY` 或 `--api-key-stdin` |
|
|
57
|
+
| 本地 DuckDB 查询/导出 | 本地库存在且 schema 兼容;可用全局 `--db <path>` 指定 |
|
|
58
|
+
| 删除、迁移、修复等有副作用操作 | 先预览或说明影响;需要用户明确确认时才加 `--yes` |
|
|
59
|
+
|
|
60
|
+
## 边界声明
|
|
61
|
+
|
|
62
|
+
- 不提供投资建议、买卖判断或收益承诺;只返回数据或中立统计。
|
|
63
|
+
- 全市场、长区间、多标的结果必须落盘,只汇报路径、行数和关键元信息。
|