@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,37 @@
|
|
|
1
|
+
# `hithink-finance special dragon-tiger`
|
|
2
|
+
|
|
3
|
+
## 前置条件
|
|
4
|
+
|
|
5
|
+
- 先读取本 skill 的 `SKILL.md` 和 `../hithink-finance-shared/SKILL.md`。
|
|
6
|
+
- 执行前用 `hithink-finance schema special.dragon-tiger --format json` 确认当前参数契约。
|
|
7
|
+
- 远端命令需要 API Key;认证失败时回到 shared skill。
|
|
8
|
+
|
|
9
|
+
## 命令
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
hithink-finance schema special.dragon-tiger --format json
|
|
13
|
+
hithink-finance special dragon-tiger --format json
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## 参数选择策略
|
|
17
|
+
|
|
18
|
+
| 参数 | 必填 | 说明 |
|
|
19
|
+
| --------------------- | ---- | -------------------------------------------------------------------------- |
|
|
20
|
+
| `--board-type <type>` | 否 | board category;可选: all, org, hot_money;默认: all;上游参数: board_type |
|
|
21
|
+
| `--date <date>` | 否 | optional trade date YYYY-MM-DD |
|
|
22
|
+
| `--output <path>` | 否 | write the full JSON response envelope to a file |
|
|
23
|
+
|
|
24
|
+
## 窗口与分页
|
|
25
|
+
|
|
26
|
+
- 单次请求窗口最多 1 年;超过时拆分或缩小范围。
|
|
27
|
+
- 无分页参数;仍检查返回中的 count/数组长度。
|
|
28
|
+
|
|
29
|
+
## 常见错误
|
|
30
|
+
|
|
31
|
+
- 参数校验失败时按 `error.hint` 修正,不要猜字段名。
|
|
32
|
+
- 认证失败时不要重试刷屏;先处理 API Key。
|
|
33
|
+
|
|
34
|
+
## 批量操作说明
|
|
35
|
+
|
|
36
|
+
- 批量或全量请求必须落盘,最终只报告路径、行数和窗口。
|
|
37
|
+
- 如果需要多标的循环,逐批执行并记录每批参数;不要把完整结果塞进上下文。
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# `hithink-finance special hot-stock-history`
|
|
2
|
+
|
|
3
|
+
## 前置条件
|
|
4
|
+
|
|
5
|
+
- 先读取本 skill 的 `SKILL.md` 和 `../hithink-finance-shared/SKILL.md`。
|
|
6
|
+
- 执行前用 `hithink-finance schema special.hot-stock-history --format json` 确认当前参数契约。
|
|
7
|
+
- 远端命令需要 API Key;认证失败时回到 shared skill。
|
|
8
|
+
|
|
9
|
+
## 命令
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
hithink-finance schema special.hot-stock-history --format json
|
|
13
|
+
hithink-finance special hot-stock-history --date <date> --format json
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## 参数选择策略
|
|
17
|
+
|
|
18
|
+
| 参数 | 必填 | 说明 |
|
|
19
|
+
| ----------------- | ---- | ----------------------------------------------- |
|
|
20
|
+
| `--date <date>` | 是 | trade date YYYY-MM-DD |
|
|
21
|
+
| `--output <path>` | 否 | write the full JSON response envelope to a file |
|
|
22
|
+
|
|
23
|
+
## 窗口与分页
|
|
24
|
+
|
|
25
|
+
- 单次请求窗口最多 1 年;超过时拆分或缩小范围。
|
|
26
|
+
- 无分页参数;仍检查返回中的 count/数组长度。
|
|
27
|
+
|
|
28
|
+
## 常见错误
|
|
29
|
+
|
|
30
|
+
- 参数校验失败时按 `error.hint` 修正,不要猜字段名。
|
|
31
|
+
- 认证失败时不要重试刷屏;先处理 API Key。
|
|
32
|
+
|
|
33
|
+
## 批量操作说明
|
|
34
|
+
|
|
35
|
+
- 批量或全量请求必须落盘,最终只报告路径、行数和窗口。
|
|
36
|
+
- 如果需要多标的循环,逐批执行并记录每批参数;不要把完整结果塞进上下文。
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# `hithink-finance special hot-stock-trend`
|
|
2
|
+
|
|
3
|
+
## 前置条件
|
|
4
|
+
|
|
5
|
+
- 先读取本 skill 的 `SKILL.md` 和 `../hithink-finance-shared/SKILL.md`。
|
|
6
|
+
- 执行前用 `hithink-finance schema special.hot-stock-trend --format json` 确认当前参数契约。
|
|
7
|
+
- 远端命令需要 API Key;认证失败时回到 shared skill。
|
|
8
|
+
|
|
9
|
+
## 命令
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
hithink-finance schema special.hot-stock-trend --format json
|
|
13
|
+
hithink-finance special hot-stock-trend --thscode <code> --start-date <date> --end-date <date> --format json
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## 参数选择策略
|
|
17
|
+
|
|
18
|
+
| 参数 | 必填 | 说明 |
|
|
19
|
+
| --------------------- | ---- | ----------------------------------------------- |
|
|
20
|
+
| `--thscode <code>` | 是 | single A-share thscode |
|
|
21
|
+
| `--start-date <date>` | 是 | start date YYYY-MM-DD;上游参数: start_date |
|
|
22
|
+
| `--end-date <date>` | 是 | end date YYYY-MM-DD;上游参数: end_date |
|
|
23
|
+
| `--output <path>` | 否 | write the full JSON response envelope to a file |
|
|
24
|
+
|
|
25
|
+
## 窗口与分页
|
|
26
|
+
|
|
27
|
+
- 单次请求窗口最多 1 年;超过时拆分或缩小范围。
|
|
28
|
+
- 无分页参数;仍检查返回中的 count/数组长度。
|
|
29
|
+
|
|
30
|
+
## 常见错误
|
|
31
|
+
|
|
32
|
+
- 参数校验失败时按 `error.hint` 修正,不要猜字段名。
|
|
33
|
+
- 认证失败时不要重试刷屏;先处理 API Key。
|
|
34
|
+
|
|
35
|
+
## 批量操作说明
|
|
36
|
+
|
|
37
|
+
- 批量或全量请求必须落盘,最终只报告路径、行数和窗口。
|
|
38
|
+
- 如果需要多标的循环,逐批执行并记录每批参数;不要把完整结果塞进上下文。
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# `hithink-finance special hot-stock`
|
|
2
|
+
|
|
3
|
+
## 前置条件
|
|
4
|
+
|
|
5
|
+
- 先读取本 skill 的 `SKILL.md` 和 `../hithink-finance-shared/SKILL.md`。
|
|
6
|
+
- 执行前用 `hithink-finance schema special.hot-stock --format json` 确认当前参数契约。
|
|
7
|
+
- 远端命令需要 API Key;认证失败时回到 shared skill。
|
|
8
|
+
|
|
9
|
+
## 命令
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
hithink-finance schema special.hot-stock --format json
|
|
13
|
+
hithink-finance special hot-stock --format json
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## 参数选择策略
|
|
17
|
+
|
|
18
|
+
| 参数 | 必填 | 说明 |
|
|
19
|
+
| ------------------- | ---- | ----------------------------------------------- |
|
|
20
|
+
| `--period <period>` | 否 | ranking period;可选: day, hour;默认: day |
|
|
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,35 @@
|
|
|
1
|
+
# `hithink-finance special limit-up-ladder`
|
|
2
|
+
|
|
3
|
+
## 前置条件
|
|
4
|
+
|
|
5
|
+
- 先读取本 skill 的 `SKILL.md` 和 `../hithink-finance-shared/SKILL.md`。
|
|
6
|
+
- 执行前用 `hithink-finance schema special.limit-up-ladder --format json` 确认当前参数契约。
|
|
7
|
+
- 远端命令需要 API Key;认证失败时回到 shared skill。
|
|
8
|
+
|
|
9
|
+
## 命令
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
hithink-finance schema special.limit-up-ladder --format json
|
|
13
|
+
hithink-finance special limit-up-ladder --format json
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## 参数选择策略
|
|
17
|
+
|
|
18
|
+
| 参数 | 必填 | 说明 |
|
|
19
|
+
| ----------------- | ---- | ----------------------------------------------- |
|
|
20
|
+
| `--output <path>` | 否 | write the full JSON response envelope to a file |
|
|
21
|
+
|
|
22
|
+
## 窗口与分页
|
|
23
|
+
|
|
24
|
+
- 无额外时间窗口限制,仍按命令参数和上游返回为准。
|
|
25
|
+
- 无分页参数;仍检查返回中的 count/数组长度。
|
|
26
|
+
|
|
27
|
+
## 常见错误
|
|
28
|
+
|
|
29
|
+
- 参数校验失败时按 `error.hint` 修正,不要猜字段名。
|
|
30
|
+
- 认证失败时不要重试刷屏;先处理 API Key。
|
|
31
|
+
|
|
32
|
+
## 批量操作说明
|
|
33
|
+
|
|
34
|
+
- 批量或全量请求必须落盘,最终只报告路径、行数和窗口。
|
|
35
|
+
- 如果需要多标的循环,逐批执行并记录每批参数;不要把完整结果塞进上下文。
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# `hithink-finance special limit-up-pool`
|
|
2
|
+
|
|
3
|
+
## 前置条件
|
|
4
|
+
|
|
5
|
+
- 先读取本 skill 的 `SKILL.md` 和 `../hithink-finance-shared/SKILL.md`。
|
|
6
|
+
- 执行前用 `hithink-finance schema special.limit-up-pool --format json` 确认当前参数契约。
|
|
7
|
+
- 远端命令需要 API Key;认证失败时回到 shared skill。
|
|
8
|
+
|
|
9
|
+
## 命令
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
hithink-finance schema special.limit-up-pool --format json
|
|
13
|
+
hithink-finance special limit-up-pool --format json
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## 参数选择策略
|
|
17
|
+
|
|
18
|
+
| 参数 | 必填 | 说明 |
|
|
19
|
+
| -------------------------- | ---- | ----------------------------------------------------------------------------------------------------------------- |
|
|
20
|
+
| `--date-ms <milliseconds>` | 否 | trade date at Asia/Shanghai midnight;上游参数: date_ms |
|
|
21
|
+
| `--page <number>` | 否 | page number;默认: 1 |
|
|
22
|
+
| `--size <number>` | 否 | page size (1-200);默认: 50 |
|
|
23
|
+
| `--sort-field <field>` | 否 | sort field;可选: last_price, continue_day_cnt, seal_money, limit_up_time;默认: last_price;上游参数: sort_field |
|
|
24
|
+
| `--sort-dir <direction>` | 否 | sort direction;可选: asc, desc;默认: desc;上游参数: sort_dir |
|
|
25
|
+
| `--output <path>` | 否 | write the full JSON response envelope to a file |
|
|
26
|
+
|
|
27
|
+
## 窗口与分页
|
|
28
|
+
|
|
29
|
+
- 无额外时间窗口限制,仍按命令参数和上游返回为准。
|
|
30
|
+
- 使用 `--page` + `--size` 翻页;全量抓取时逐页推进。
|
|
31
|
+
|
|
32
|
+
## 常见错误
|
|
33
|
+
|
|
34
|
+
- 参数校验失败时按 `error.hint` 修正,不要猜字段名。
|
|
35
|
+
- 认证失败时不要重试刷屏;先处理 API Key。
|
|
36
|
+
|
|
37
|
+
## 批量操作说明
|
|
38
|
+
|
|
39
|
+
- 批量或全量请求必须落盘,最终只报告路径、行数和窗口。
|
|
40
|
+
- 如果需要多标的循环,逐批执行并记录每批参数;不要把完整结果塞进上下文。
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# `hithink-finance special skyrocket`
|
|
2
|
+
|
|
3
|
+
## 前置条件
|
|
4
|
+
|
|
5
|
+
- 先读取本 skill 的 `SKILL.md` 和 `../hithink-finance-shared/SKILL.md`。
|
|
6
|
+
- 执行前用 `hithink-finance schema special.skyrocket --format json` 确认当前参数契约。
|
|
7
|
+
- 远端命令需要 API Key;认证失败时回到 shared skill。
|
|
8
|
+
|
|
9
|
+
## 命令
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
hithink-finance schema special.skyrocket --format json
|
|
13
|
+
hithink-finance special skyrocket --format json
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## 参数选择策略
|
|
17
|
+
|
|
18
|
+
| 参数 | 必填 | 说明 |
|
|
19
|
+
| ------------------- | ---- | ----------------------------------------------- |
|
|
20
|
+
| `--period <period>` | 否 | ranking period;可选: day, hour;默认: day |
|
|
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,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hithink-finance-symbol
|
|
3
|
+
description: '用于 Agent 通过 hithink-finance CLI 处理标的目录、股票/指数代码搜索、名称或 ticker 到 thscode 的消歧、A 股或指数代码表分页导出;行情价格转 hithink-finance-market,指数成分转 hithink-finance-index。'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# hithink-finance-symbol
|
|
7
|
+
|
|
8
|
+
标的识别和代码表路由。目标是把自然语言名称、ticker、thscode 或代码表需求变成后续可执行的证券标识。
|
|
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
|
+
| 用户给出名称/简称/ticker,需要消歧 | `symbol search` |
|
|
24
|
+
| 用户要股票或指数代码表/全量目录 | `symbol list`,大结果必须将 JSON stdout 重定向落盘 |
|
|
25
|
+
| 用户要价格、K 线、快照 | 切到 `hithink-finance-market` |
|
|
26
|
+
| 用户要指数成分或指数行情 | 切到 `hithink-finance-index` |
|
|
27
|
+
|
|
28
|
+
## Shortcuts
|
|
29
|
+
|
|
30
|
+
| 命令 | 何时使用 |
|
|
31
|
+
| -------------------------------------------- | ------------------------------------ |
|
|
32
|
+
| [symbol list](references/symbol-list.md) | List symbols with bounded pagination |
|
|
33
|
+
| [symbol search](references/symbol-search.md) | Resolve a name or code to thscode |
|
|
34
|
+
|
|
35
|
+
## 原生命令与 schema
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
hithink-finance capabilities --format json
|
|
39
|
+
hithink-finance schema <capability-id> --format json
|
|
40
|
+
hithink-finance symbol <command> --help
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
使用原生命令前必须先看 schema;schema 是当前 CLI 参数契约,reference 是决策和边界补充。
|
|
44
|
+
|
|
45
|
+
## 权限表
|
|
46
|
+
|
|
47
|
+
| 命令类型 | 要求 |
|
|
48
|
+
| ------------------------------ | ---------------------------------------------------------------------- |
|
|
49
|
+
| 远端服务查询 | API Key 来自系统凭据库、`HITHINK_FINANCE_API_KEY` 或 `--api-key-stdin` |
|
|
50
|
+
| 本地 DuckDB 查询/导出 | 本地库存在且 schema 兼容;可用全局 `--db <path>` 指定 |
|
|
51
|
+
| 删除、迁移、修复等有副作用操作 | 先预览或说明影响;需要用户明确确认时才加 `--yes` |
|
|
52
|
+
|
|
53
|
+
## 边界声明
|
|
54
|
+
|
|
55
|
+
- 只解决“标的是什么”。不要在本 skill 内回答价格、涨跌幅、财报或策略结论。
|
|
56
|
+
- 名称搜索可能返回多个候选;用于后续精确查询前必须让用户意图或字段证据完成消歧。
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# `hithink-finance symbol list`
|
|
2
|
+
|
|
3
|
+
## 前置条件
|
|
4
|
+
|
|
5
|
+
- 先读取本 skill 的 `SKILL.md` 和 `../hithink-finance-shared/SKILL.md`。
|
|
6
|
+
- 执行前用 `hithink-finance schema symbol.list --format json` 确认当前参数契约。
|
|
7
|
+
- 远端命令需要 API Key;认证失败时回到 shared skill。
|
|
8
|
+
|
|
9
|
+
## 命令
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
hithink-finance schema symbol.list --format json
|
|
13
|
+
hithink-finance symbol list --format json
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## 参数选择策略
|
|
17
|
+
|
|
18
|
+
| 参数 | 必填 | 说明 |
|
|
19
|
+
| ------------------------ | ---- | ----------------------------------------------------------------------------- |
|
|
20
|
+
| `--exchange <exchanges>` | 否 | comma-separated exchanges;默认: SH,SZ |
|
|
21
|
+
| `--asset-type <type>` | 否 | asset type;可选: a-share, a-share-index;默认: a-share;上游参数: asset_type |
|
|
22
|
+
| `--limit <number>` | 否 | page size (1-10000);默认: 1000 |
|
|
23
|
+
| `--offset <number>` | 否 | row offset;默认: 0 |
|
|
24
|
+
| `--output <path>` | 否 | write the full JSON response envelope to a file |
|
|
25
|
+
|
|
26
|
+
## 窗口与分页
|
|
27
|
+
|
|
28
|
+
- 无额外时间窗口限制,仍按命令参数和上游返回为准。
|
|
29
|
+
- 使用 `--limit` + `--offset` 翻页;全量抓取时循环到返回条数小于 limit。
|
|
30
|
+
|
|
31
|
+
## 常见错误
|
|
32
|
+
|
|
33
|
+
- 参数校验失败时按 `error.hint` 修正,不要猜字段名。
|
|
34
|
+
- 认证失败时不要重试刷屏;先处理 API Key。
|
|
35
|
+
|
|
36
|
+
## 批量操作说明
|
|
37
|
+
|
|
38
|
+
- 批量或全量请求必须落盘,最终只报告路径、行数和窗口。
|
|
39
|
+
- 如果需要多标的循环,逐批执行并记录每批参数;不要把完整结果塞进上下文。
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# `hithink-finance symbol search`
|
|
2
|
+
|
|
3
|
+
## 前置条件
|
|
4
|
+
|
|
5
|
+
- 先读取本 skill 的 `SKILL.md` 和 `../hithink-finance-shared/SKILL.md`。
|
|
6
|
+
- 执行前用 `hithink-finance schema symbol.search --format json` 确认当前参数契约。
|
|
7
|
+
- 远端命令需要 API Key;认证失败时回到 shared skill。
|
|
8
|
+
|
|
9
|
+
## 命令
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
hithink-finance schema symbol.search --format json
|
|
13
|
+
hithink-finance symbol search --q <query> --format json
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## 参数选择策略
|
|
17
|
+
|
|
18
|
+
| 参数 | 必填 | 说明 |
|
|
19
|
+
| ----------------------- | ---- | -------------------------------------------------------------- |
|
|
20
|
+
| `--q <query>` | 是 | name, ticker, or thscode |
|
|
21
|
+
| `--exchange <exchange>` | 否 | exchange filter;可选: SH, SZ, BJ |
|
|
22
|
+
| `--asset-type <type>` | 否 | asset type;可选: a-share, a-share-index;上游参数: asset_type |
|
|
23
|
+
| `--limit <number>` | 否 | maximum matches (1-50);默认: 10 |
|
|
24
|
+
| `--output <path>` | 否 | write the full JSON response envelope to a file |
|
|
25
|
+
|
|
26
|
+
## 窗口与分页
|
|
27
|
+
|
|
28
|
+
- 无额外时间窗口限制,仍按命令参数和上游返回为准。
|
|
29
|
+
- 无分页参数;仍检查返回中的 count/数组长度。
|
|
30
|
+
|
|
31
|
+
## 常见错误
|
|
32
|
+
|
|
33
|
+
- 参数校验失败时按 `error.hint` 修正,不要猜字段名。
|
|
34
|
+
- 认证失败时不要重试刷屏;先处理 API Key。
|
|
35
|
+
|
|
36
|
+
## 批量操作说明
|
|
37
|
+
|
|
38
|
+
- 批量或全量请求必须落盘,最终只报告路径、行数和窗口。
|
|
39
|
+
- 如果需要多标的循环,逐批执行并记录每批参数;不要把完整结果塞进上下文。
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"protocolVersion": "1",
|
|
3
|
+
"cliVersion": "0.1.0",
|
|
4
|
+
"files": {
|
|
5
|
+
"hithink-finance-data/SKILL.md": "98d36ee1de8adb94149a747f77d3d10c29f41e8f77b04b30d10bdd4df7ce7955",
|
|
6
|
+
"hithink-finance-data/references/data-clean.md": "49422a4a8f1ea0ced02da7b1130f91ec273286205ead881b6beb5e93ba93b55b",
|
|
7
|
+
"hithink-finance-data/references/data-init.md": "2a716e085eeaa659ca3ec36c34894a3db774ed32d82ed63fc25867f03c153168",
|
|
8
|
+
"hithink-finance-data/references/data-migrate.md": "94ac04722a698924d7c8af1e50251418741a51322324885523d1ba233abfbc12",
|
|
9
|
+
"hithink-finance-data/references/data-remove.md": "7b47086abcee1a795230a7b0ae1e485fca438773c3061ec229ae896a00bae62c",
|
|
10
|
+
"hithink-finance-data/references/data-repair.md": "da4f349277f2d493d7c3759a1cba1fc1f058fe5141c2275834a3a81781dc3ff5",
|
|
11
|
+
"hithink-finance-data/references/data-status.md": "9164de943845e46f9c2b1931a2efe6355681c04afb73bfa42a2458336f250140",
|
|
12
|
+
"hithink-finance-data/references/data-sync.md": "c55715dcb4fcd0d593be6781315bd88d945af2583ee50d81df74d57520986a75",
|
|
13
|
+
"hithink-finance-data/references/data-validate.md": "68ec67acdcbf053ecd217990bdd7d1ca8f5a960bc8b4ea65fa29b68b3d1cb074",
|
|
14
|
+
"hithink-finance-data/references/db-describe.md": "29d228103bf4b1b8d27b005c764e44d198fd9d64fba73114d99960dd969a3b9d",
|
|
15
|
+
"hithink-finance-data/references/db-export.md": "b3d330bf654be98bdb725de56db0a0e5d1b33f20a72e135396356a83783a7000",
|
|
16
|
+
"hithink-finance-data/references/db-query.md": "df13d4e6da21d8e55cc218f76309c10a30f4952da46ad7f89ec3c7741cfaddc6",
|
|
17
|
+
"hithink-finance-financials/SKILL.md": "ba6592c8646d4d8610d8bfcf6c91159d5611f92bed746f1a9e52af894a336006",
|
|
18
|
+
"hithink-finance-financials/references/financials-balance-sheet.md": "df0773e4ed871d477331c1cca51db7e3d529bb1f738acfcff17fbd6a2be561da",
|
|
19
|
+
"hithink-finance-financials/references/financials-cash-flow.md": "722d0d2d08e2feb65ff9548fade70bc5cc4da6fb41fe84e63f438e59838eb130",
|
|
20
|
+
"hithink-finance-financials/references/financials-income.md": "2450abcf2f419792bd7c89dade763a4067e758984e96dc7d9f27ed6fd2dd1d2d",
|
|
21
|
+
"hithink-finance-financials/references/financials-indicators.md": "eb6413001a852d77d4d393b36ba21f903fa1f69fd0cd0948da7da59c0fa9db3b",
|
|
22
|
+
"hithink-finance-index/SKILL.md": "861e15cba2713368864b57a5d7193d531d1adf21796f43c180bc660590f56213",
|
|
23
|
+
"hithink-finance-index/references/index-catalog.md": "319f6255e3a6d55c552332c6c2dc747a23ac3a63fd0da778c9b451fd33d2e245",
|
|
24
|
+
"hithink-finance-index/references/index-constituents.md": "82bb54f90b458aceab5c7725f52c30e5197aaa87d7969c2abcb37c204c4cee6b",
|
|
25
|
+
"hithink-finance-index/references/index-history.md": "6eedc0f7d3e5ac056321f32ad03d09807c73ec80da5659dcae31fa0c08d5d6c8",
|
|
26
|
+
"hithink-finance-index/references/index-snapshot.md": "7f824c87cb29564909d30d6e98509f255e5d59e4f8ca94901e60f87a87d569b1",
|
|
27
|
+
"hithink-finance-market/SKILL.md": "bf61ec3a2e69a7f8fae2f8f56a72fa498c5efac589fd599ff6b85f9198a2c3b2",
|
|
28
|
+
"hithink-finance-market/references/market-adjustment-factors.md": "f74cc5e93c3b1a8dba8afdd1500c36a7a63fb012c3dedb86e12043a0c452f3ed",
|
|
29
|
+
"hithink-finance-market/references/market-calendar.md": "5c0822b11ba2bd5a7546c96e52165e10e479209e222476b9f6ad40e3f311a070",
|
|
30
|
+
"hithink-finance-market/references/market-corporate-actions.md": "4bd5f2508b0022203c85086602bd328a77a6fd824a60fab02ab9945825d0a1c5",
|
|
31
|
+
"hithink-finance-market/references/market-history.md": "d68640f4fded712b47defeeea26528237be6ba11d4b0313ddbba98d33f187cf0",
|
|
32
|
+
"hithink-finance-market/references/market-panel.md": "c21c02a2ac23f69311e18aa6853968634a89875a1936d3736c2fb72195b3efb8",
|
|
33
|
+
"hithink-finance-market/references/market-snapshot.md": "a7c08d2ea387ec85781f159a3d92404e31f47159564d39ed639565299b517af4",
|
|
34
|
+
"hithink-finance-research/SKILL.md": "7f4ded9d172a2bb2578ac81266ef869521c7d753f2a021c7aa79fc6d0f92541c",
|
|
35
|
+
"hithink-finance-research/references/research-workflow.md": "3f73f179339b21403e7f8f6bfd7fcb2649f06ffc6b6bccb428b18cb19929dad5",
|
|
36
|
+
"hithink-finance-shared/SKILL.md": "9f04c427f09b0a8115c98c5e873bca81ea491b448cbab53b11386db96d354db1",
|
|
37
|
+
"hithink-finance-shared/references/auth-and-config.md": "8bd9afad8f9f717b0358e606d019d36acd3ede63d46fb15f07253131f3d396ac",
|
|
38
|
+
"hithink-finance-shared/references/global-rules.md": "21b6ef14ffd656240d5f31349bb6e430fdff6ffd790268a3ae115ffdc16e6102",
|
|
39
|
+
"hithink-finance-shared/references/lifecycle.md": "087b3aaa8e8299cc3f6b733a0de07f8dbd43b9a6ebf25addf5b3e77ded21f8fe",
|
|
40
|
+
"hithink-finance-shared/references/skills-management.md": "bb508bd6592d81c5eaad9f6bec575cc93cd7c42d8ecdbe955e12942b55956c02",
|
|
41
|
+
"hithink-finance-special-data/SKILL.md": "d824662f6bc12912f8b89f52a1b7f938dca36c2342174732380606e609ebc30b",
|
|
42
|
+
"hithink-finance-special-data/references/special-anomaly-list.md": "98f7bac44eb040ff80fd06185bd9ac811fdd7d46fa6c7695a32e808eda3bd2fd",
|
|
43
|
+
"hithink-finance-special-data/references/special-anomaly-stock.md": "5bb7878964e76c6b37b46ffe6eb1f43c2df709b34a3f3be24bc0729ccf31188d",
|
|
44
|
+
"hithink-finance-special-data/references/special-dragon-tiger.md": "2d329580cd332ec9e61d6ea02150f18e65d3ac9b3b82957cd1c63790e78bef85",
|
|
45
|
+
"hithink-finance-special-data/references/special-hot-stock-history.md": "287849c8769242f2592968ff5d83d4503913dd8e5a8c8bbfdfbe323163f95f98",
|
|
46
|
+
"hithink-finance-special-data/references/special-hot-stock-trend.md": "9c00a04cefa38ef265b5b8548f4e6e6a8bec0b8be72f224cd2eab11f0772e50a",
|
|
47
|
+
"hithink-finance-special-data/references/special-hot-stock.md": "450d7efb4a3def31946602aadacb0f9b412ac1935cc7990aa6b1a3b1ea9b387e",
|
|
48
|
+
"hithink-finance-special-data/references/special-limit-up-ladder.md": "ce7bccbee93a99fa7906f69abce1896481c2679679cf6978e3a618644450eb70",
|
|
49
|
+
"hithink-finance-special-data/references/special-limit-up-pool.md": "caf9e8266b15b39ef869787cf1bcbbaea950d15939acc460fa5d60d8b3236276",
|
|
50
|
+
"hithink-finance-special-data/references/special-skyrocket.md": "8b8791551cb044902bc70301f34614f7cc358f96111b4208e286d114f24d7e86",
|
|
51
|
+
"hithink-finance-symbol/SKILL.md": "398867892e734766aa3efbf7d57d92e7ae895eb3485164673e4b48252daef659",
|
|
52
|
+
"hithink-finance-symbol/references/symbol-list.md": "bdedd2e8898acd18937352d2bffd5706988119a0ec8c526b5bdbcb2a21c93eee",
|
|
53
|
+
"hithink-finance-symbol/references/symbol-search.md": "27c627658985c9d33bc8e62e53e732812cac3210bd014e4edb10a79fbac0e616"
|
|
54
|
+
}
|
|
55
|
+
}
|