원클릭으로
hithink-a-share
A 股官方数据,来自同花顺(HiThink)官方 API——涨停股票池、连板天梯、龙虎榜、个股异动原因、热榜、A 股官方口径财报(利润表/资产负债表/现金流量表/财务指标)、行情快照与日 K。
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
A 股官方数据,来自同花顺(HiThink)官方 API——涨停股票池、连板天梯、龙虎榜、个股异动原因、热榜、A 股官方口径财报(利润表/资产负债表/现金流量表/财务指标)、行情快照与日 K。
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
本仓库所有交易分析共享的判读纪律——一手信源、GAAP 陷阱、反自动附和的独立核验协议、 情景而非点位、资金流单位歧义、强制平仓 ≠ 主动卖出、输出语言、账户与仓库记录约定。这是唯一的纪律源头: 根 CLAUDE.md 导入它,app 内的 analyst / deepDive / chat 由 promptPolicy 注入它。 领域 skill 只引用规则 ID(如 TD-SOURCE-01),不得复制规则正文——复制必然漂移。
Korean market quotes (KOSPI / KOSDAQ / SK Hynix / Samsung) with capitulation-reversal detection. Use whenever reading the US memory/storage complex (MU / DRAM / SNDK / WDC / STX / SMH) — Korea is the SOURCE market and leads the US tape; Longbridge does not cover KRX. Triggers: 韩国 / 韩股 / KOSPI / 海力士 / SK Hynix / 三星 / Samsung / 韩国爆仓 / 韩国追保 / 存储板块见底了吗 / 洗盘结束了吗 / capitulation / Korean margin calls / has the flush ended.
Use when reading today's US-market capital flow across multiple sectors to identify rotation direction — e.g. "今天资金流向", "板块强弱", "rotation map", "卖芯买云", "where is money moving today", "scan flows across sectors". Produces a cross-section snapshot of net inflows by cohort (indices / semis / software-cloud / mega-tech / AI applications), names the dominant narrative, and writes a dated journal file. Different from `market-session-tracker` (intraday live monitoring of a single watchlist) — this is a one-shot end-of-session rotation read.
交易决策关卡——任何买入/加仓/卖出/减仓动作发生前,先过一遍写死的检查关卡, 打分给出判定,判定与实际执行不一致的记为违规,落盘 JSON 供复盘统计。三个 入口:买入漏斗(六层打分,硬门+软分)、卖出触发器(复用用户既有的 6/27 持有计划触发线、周期见顶清单、爆仓潮反向保护)、巡检(对长桥全部持仓批量跑 卖出触发器)。不拦截下单(本仓库长桥只读),约束力来自违规账单而非技术拦截。 Triggers: 我想买 X、我想加仓 X、我想卖 X、我想减 X、要不要止盈、要不要止损、 巡检、跑一遍卖出检查、算一下违规账单、我该不该现在动这只票、trade decision gate, buy funnel, sell trigger, position patrol, violation ledger.
Short-term multi-timeframe (5m/15m/1h) technical read for a single symbol — pulls K-line across three timeframes, reads MACD + swing structure, writes a direction call (long/short/neutral) with an explicit anchor price, a 2–4 scenario forward read, a range-bound playbook (long tactic + short tactic; a neutral call carries a numeric low/high zone instead of an entry plan and is scored on whether the zone held), an entry/stop/target plan with dual-basis R/R (T1 + T2) for directional calls only, position sizing with a nominal cap from the live broker account, an event-risk gate (earnings / FOMC / CPI), and market/sector alignment + relvol volume checks — MACD divergence/背驰, candle patterns like Pin Bar, and 123 structures are auto-detected and drawn server-side — then renders it via the `chart` skill (type `intraday`, POST preview → PATCH prediction) and logs a journal entry. US-only, single-symbol, short horizon (intraday to a few sessions) — a companion to `market-session-tracker`, not a replacement. Triggers:
Render financial charts via the local chart web app (`app/` — Hono server + React front end, port 5199). Four chart types: intraday capital-flow line (`flow`) and cross-symbol signed-bar comparison (`cohort`) — both Recharts — plus SEPA strategy dashboard (`sepa`) and short-term multi-timeframe prediction dashboard (`intraday`) — both TradingView Lightweight Charts. Multi-timeframe K-line review lives inside `intraday` (the standalone kline chart type was removed). The server fetches Longbridge data itself (kline / capital flow) and computes all indicators (MA, MACD, RS, trend template, volume profile, divergence/beichi detection) in TypeScript; the caller only POSTs `{type, symbol, ...}` to `/api/charts` and gets back `{id, url, technicals?}`. Charts persist as data JSON under `journal/charts/data/`. `url` now points at where the chart actually lives: sepa/intraday land on the symbol page (`http://localhost:5199/symbol/<SYM>?analysis=<id>`), flow/cohort land on the home page for that date (`http://localhost:
| name | hithink-a-share |
| description | A 股官方数据,来自同花顺(HiThink)官方 API——涨停股票池、连板天梯、龙虎榜、个股异动原因、热榜、A 股官方口径财报(利润表/资产负债表/现金流量表/财务指标)、行情快照与日 K。 |
对话回复语言:中文白话(本仓库规则,见根 CLAUDE.md)。
Longbridge 不覆盖 A 股的短线情绪与官方口径财报数据,这个 skill 补这块盲区。触发词:
600519.SH)不要用这个 skill 做什么:
interval=1d),不支持分钟级。thscode 形如 600519.SH / 000001.SZ / 430047.BJ)。需要 HITHINK_FINANCE_API_KEY(已在仓库根 .env 里配置,脚本通过 _shared/env.py 自动加载,无需手动 source)。缺失时脚本报 exit_code=2,提示去 .env 里加。
| 脚本 | 用途 | 关键参数 |
|---|---|---|
snapshot.py | 行情快照(多 thscode 批量,或全市场分页) | thscodes...、--limit/--offset(全市场模式) |
kline.py | 日 K 线 | thscode、--days(便捷窗口)或 --start/--end(毫秒)、--adjust |
special.py | 涨停/连板/龙虎榜/异动/热榜,用 --kind 切换 | --kind limit-up-pool|limit-up-ladder|dragon-tiger|skyrocket|hot|hot-history|hot-rank-trend|anomaly|anomaly-stock |
financials.py | 官方口径财报 + 财务指标 | thscode、--kind income|balance|cashflow|indicators、--period annual|quarterly、--limit 或 --start/--end;indicators 用 --report yyyy-N |
calendar.py | A 股近一年交易日序列 | 无参数 |
search.py | 标的检索 / 批量代码表 | query(thscode/代码/中英文名),--list 切到批量代码表 |
所有脚本都支持 --help / --smoke / --verbose / --json(占位,输出恒为 JSON)/ --fresh(绕过缓存)。缓存在 ~/.cache/market-intel/hithink/,节流默认 ≥0.5 秒/请求(_shared/client.py 的节流机制)。
# 行情快照:单只/多只
python3 .claude/skills/hithink-a-share/scripts/snapshot.py 600519.SH
python3 .claude/skills/hithink-a-share/scripts/snapshot.py 600519.SH 000001.SZ
# 日 K:默认近 120 个自然日,前复权
python3 .claude/skills/hithink-a-share/scripts/kline.py 600519.SH --days 90
python3 .claude/skills/hithink-a-share/scripts/kline.py 000001.SZ --adjust backward
# 涨停股票池 / 连板天梯
python3 .claude/skills/hithink-a-share/scripts/special.py --kind limit-up-pool --sort-field limit_up_time --sort-dir desc
python3 .claude/skills/hithink-a-share/scripts/special.py --kind limit-up-ladder
# 龙虎榜(默认最近交易日,全部榜;可选机构/游资榜 + 指定日期)
python3 .claude/skills/hithink-a-share/scripts/special.py --kind dragon-tiger
python3 .claude/skills/hithink-a-share/scripts/special.py --kind dragon-tiger --board-type hot_money --date 2026-07-14
# 个股异动原因:当日全部,或按标的批量查
python3 .claude/skills/hithink-a-share/scripts/special.py --kind anomaly --tag-codes LIMIT_UP,SHARP_FALL
python3 .claude/skills/hithink-a-share/scripts/special.py --kind anomaly-stock --thscodes 600519.SH,000001.SZ
# 热榜:飙升榜 / 热股榜 / 历史热股 / 个股排名走势
python3 .claude/skills/hithink-a-share/scripts/special.py --kind skyrocket --period hour
python3 .claude/skills/hithink-a-share/scripts/special.py --kind hot
python3 .claude/skills/hithink-a-share/scripts/special.py --kind hot-history --date 2026-07-14
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
# 财报:最近 N 期 / 时间区间二选一
python3 .claude/skills/hithink-a-share/scripts/financials.py 600519.SH --kind income --period annual --limit 3
python3 .claude/skills/hithink-a-share/scripts/financials.py 600519.SH --kind cashflow --period annual --start 1577808000000 --end 1735574400000
python3 .claude/skills/hithink-a-share/scripts/financials.py 300033.SZ --kind indicators --report 2025-1
# 交易日历
python3 .claude/skills/hithink-a-share/scripts/calendar.py
# 标的检索 / 批量代码表
python3 .claude/skills/hithink-a-share/scripts/search.py 贵州茅台
python3 .claude/skills/hithink-a-share/scripts/search.py 600519.SH
python3 .claude/skills/hithink-a-share/scripts/search.py --list --asset-type a-share-index --limit 500
# 绕过缓存
python3 .claude/skills/hithink-a-share/scripts/snapshot.py 600519.SH --fresh
统一走 _shared/client.py 的信封:
{"ok": true, "data": [...], "meta": {...}}
失败时:
{"ok": false, "error": "hithink error 1003: ...", "hint": "request_id=..."}
financials.py 的 --limit 与 --start/--end 互斥,同传或半开区间(只传一个)都会报错——脚本已提前拦截,服务端也会返回 code=1004。indicators(财务指标)走完全不同的参数契约:只认 thscode + report(yyyy-N,N=1/2/3/4 对应一季报/中报/三季报/年报),不支持 period/limit。date 必须是真实交易日,传非交易日直接报错,不会自动回退;省略时服务端自动取最近可用交易日。收盘不久后当日龙虎榜可能还没发布,返回空列表是正常现象,不是接口坏了。[start, end] 跨度不超过 10 年;要多只标的必须分开请求。value 是字符串,不是 number——服务端故意保留原始精度,展示时按 index_id 名称判断单位(含"率""比率"的按百分比,"周转率"按次,"倍数"按倍)。anomaly-analysis-list / anomaly-analysis-stock 的解读文案是同花顺二手归纳,不能替代公司公告/交易所披露作为结论依据,只能当情绪信号参考。| exit code | 含义 | 处理 |
|---|---|---|
| 0 | 成功 | 解析 data |
| 1 | 参数校验失败(本地拦截,未发请求) | 按 hint 补齐参数 |
| 2 | 缺 HITHINK_FINANCE_API_KEY | 提示用户去 .env 补 key |
| 3 | HiThink 业务错误(code!=0)或 HTTP 4xx/非 JSON | 参考 error 里的 code 含义(1001 缺参/1002 格式错/1003 越界/1004 参数冲突/2003 无权限/4001 超频) |
| 4 | 网络错误 | 建议重试 |
| 5 | HTTP 401 | 检查 API Key 是否失效 |
longbridge-* —— 美股 / 港股实时行情、分钟级 K 线、账户持仓。stock-deep-dive —— 单只标的多维度首次尽调(美股)。trading-discipline —— 判读纪律共享源头,TD-LANG-03(只做美股,A 股是明确例外场景)、TD-SOURCE-01(一手信源)等规则见此。