$npx -y skills add kansoku-trade/kansoku --skill hithink-a-shareA 股官方数据,来自同花顺(HiThink)官方 API——涨停股票池、连板天梯、龙虎榜、个股异动原因、热榜、A 股官方口径财报(利润表/资产负债表/现金流量表/财务指标)、行情快照与日 K。
| 1 | # hithink-a-share |
| 2 | |
| 3 | > 对话回复语言:中文白话(本仓库规则,见根 CLAUDE.md)。 |
| 4 | |
| 5 | ## 何时用 |
| 6 | |
| 7 | Longbridge 不覆盖 A 股的短线情绪与官方口径财报数据,这个 skill 补这块盲区。触发词: |
| 8 | |
| 9 | - 涨停 / 涨停股票池 / 连板 / 连板天梯 / 几天几板 |
| 10 | - 龙虎榜 / 机构榜 / 游资榜 |
| 11 | - 个股异动 / 异动原因 / 大涨大跌解读 |
| 12 | - 同花顺热榜 / 飙升榜 / 热股榜单 / 热度排名 |
| 13 | - A 股财报 / 利润表 / 资产负债表 / 现金流量表 / 财务指标 / ROE / 毛利率 |
| 14 | - A 股行情快照 / A 股日 K / thscode(如 `600519.SH`) |
| 15 | |
| 16 | **不要用这个 skill 做什么**: |
| 17 | |
| 18 | - 分钟级 K 线、实时盯盘 —— 这些属于 Longbridge(本仓库不做港股 A 股实时看盘,Longbridge 只覆盖美股账户)。历史 K 线接口仅支持日线(`interval=1d`),不支持分钟级。 |
| 19 | - 港股 / 美股 —— 这个 skill 只覆盖 A 股(`thscode` 形如 `600519.SH` / `000001.SZ` / `430047.BJ`)。 |
| 20 | - **TD-LANG-03 全市场级工作不查 A 股**:只有明确要看 A 股个股/板块时才用这个 skill,不要在美股大盘扫描里顺带拉 A 股。 |
| 21 | |
| 22 | ## 认证 |
| 23 | |
| 24 | 需要 `HITHINK_FINANCE_API_KEY`(已在仓库根 `.env` 里配置,脚本通过 `_shared/env.py` 自动加载,无需手动 `source`)。缺失时脚本报 `exit_code=2`,提示去 `.env` 里加。 |
| 25 | |
| 26 | ## 脚本一览 |
| 27 | |
| 28 | | 脚本 | 用途 | 关键参数 | |
| 29 | | --------------- | -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | |
| 30 | | `snapshot.py` | 行情快照(多 thscode 批量,或全市场分页) | `thscodes...`、`--limit`/`--offset`(全市场模式) | |
| 31 | | `kline.py` | 日 K 线 | `thscode`、`--days`(便捷窗口)或 `--start`/`--end`(毫秒)、`--adjust` | |
| 32 | | `special.py` | 涨停/连板/龙虎榜/异动/热榜,用 `--kind` 切换 | `--kind limit-up-pool\|limit-up-ladder\|dragon-tiger\|skyrocket\|hot\|hot-history\|hot-rank-trend\|anomaly\|anomaly-stock` | |
| 33 | | `financials.py` | 官方口径财报 + 财务指标 | `thscode`、`--kind income\|balance\|cashflow\|indicators`、`--period annual\|quarterly`、`--limit` 或 `--start`/`--end`;indicators 用 `--report yyyy-N` | |
| 34 | | `calendar.py` | A 股近一年交易日序列 | 无参数 | |
| 35 | | `search.py` | 标的检索 / 批量代码表 | `query`(thscode/代码/中英文名),`--list` 切到批量代码表 | |
| 36 | |
| 37 | 所有脚本都支持 `--help` / `--smoke` / `--verbose` / `--json`(占位,输出恒为 JSON)/ `--fresh`(绕过缓存)。缓存在 `~/.cache/market-intel/hithink/`,节流默认 ≥0.5 秒/请求(`_shared/client.py` 的节流机制)。 |
| 38 | |
| 39 | ## CLI 示例 |
| 40 | |
| 41 | ```bash |
| 42 | # 行情快照:单只/多只 |
| 43 | python3 .claude/skills/hithink-a-share/scripts/snapshot.py 600519.SH |
| 44 | python3 .claude/skills/hithink-a-share/scripts/snapshot.py 600519.SH 000001.SZ |
| 45 | |
| 46 | # 日 K:默认近 120 个自然日,前复权 |
| 47 | python3 .claude/skills/hithink-a-share/scripts/kline.py 600519.SH --days 90 |
| 48 | python3 .claude/skills/hithink-a-share/scripts/kline.py 000001.SZ --adjust backward |
| 49 | |
| 50 | # 涨停股票池 / 连板天梯 |
| 51 | python3 .claude/skills/hithink-a-share/scripts/special.py --kind limit-up-pool --sort-field limit_up_time --sort-dir desc |
| 52 | python3 .claude/skills/hithink-a-share/scripts/special.py --kind limit-up-ladder |
| 53 | |
| 54 | # 龙虎榜(默认最近交易日,全部榜;可选机构/游资榜 + 指定日期) |
| 55 | python3 .claude/skills/hithink-a-share/scripts/special.py --kind dragon-tiger |
| 56 | python3 .claude/skills/hithink-a-share/scripts/special.py --kind dragon-tiger --board-type hot_money --date 2026-07-14 |
| 57 | |
| 58 | # 个股异动原因:当日全部,或按标的批量查 |
| 59 | python3 .claude/skills/hithink-a-share/scripts/special.py --kind anomaly --tag-codes LIMIT_UP,SHARP_FALL |
| 60 | python3 .claude/skills/hithink-a-share/scripts/special.py --kind anomaly-stock --thscodes 600519.SH,000001.SZ |
| 61 | |
| 62 | # 热榜:飙升榜 / 热股榜 / 历史热股 / 个股排名走势 |
| 63 | python3 .claude/skills/hithink-a-share/scripts/special.py --kind skyrocket --period hour |
| 64 | python3 .claude/skills/hithink-a-share/scripts/special.py --kind hot |
| 65 | python3 .claude/skills/hithink-a-share/scripts/special.py --kind hot-history --date 2026-07-14 |
| 66 | python3 .claude/skills/hithink-a-share/scripts/special.py --kind hot-rank-trend --thscode 300034.SZ --start-date 2026-06-21 --end-date 2026-07-14 |
| 67 | |
| 68 | # 财报:最近 N 期 / 时间区间二选一 |
| 69 | python3 .claude/skills/hithink-a-share/scripts/financials.py 600519.SH --kind income --period annual --limit 3 |
| 70 | python3 .claude/skills/hithink-a-share/scripts/financials.py 600519.SH --kind cashflow --period annual --start 1577808000000 --end 1735574400000 |
| 71 | python3 .claude/skills/hithink-a-share/scripts/financials.py 300033.SZ --kind indicators --report 2025-1 |
| 72 | |
| 73 | # 交易日历 |
| 74 | python3 .claude/skills/hithink-a-share/scripts/calendar.py |
| 75 | |
| 76 | # 标的检索 / 批量代码表 |
| 77 | python3 .claude/skills/hithink-a-share/scripts/search.py 贵州茅台 |
| 78 | python3 .claude/skills/hithink-a-share/scripts/search.py 600519.SH |
| 79 | python3 .claude/skills/hithink-a-share/scripts/search.py --list --asset-type a-share-index --limit 500 |
| 80 | |
| 81 | # 绕过缓存 |
| 82 | python3 .claude/skills/hithink-a-share/scripts/snapshot.py 600519.SH --fresh |
| 83 | ``` |
| 84 | |
| 85 | ## 输出格式 |
| 86 | |
| 87 | 统一走 |