Hithink A Share logo

Hithink A Share

Organization
kansoku-trade
hithink-a-share

A 股官方数据,来自同花顺(HiThink)官方 API——涨停股票池、连板天梯、龙虎榜、个股异动原因、热榜、A 股官方口径财报(利润表/资产负债表/现金流量表/财务指标)、行情快照与日 K。

Overview

Publisherkansoku-trade
Repositorykansoku
Skill namehithink-a-share
Stars
329
Forks
40
Bundled files
7
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 7 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by kansoku-trade on GitHub. Read the source before you install it.

Installation

Install the Hithink A Share AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/kansoku-trade/kansoku/tree/main/.claude/skills/hithink-a-share
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/kansoku-trade/kansoku.git /tmp/kansoku
mkdir -p .claude/skills
cp -r /tmp/kansoku/.claude/skills/hithink-a-share .claude/skills/hithink-a-share
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Hithink A Share in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Hithink A Share on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Hithink A Share is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

hithink-a-share

对话回复语言:中文白话(本仓库规则,见根 CLAUDE.md)。

何时用

Longbridge 不覆盖 A 股的短线情绪与官方口径财报数据,这个 skill 补这块盲区。触发词:

  • 涨停 / 涨停股票池 / 连板 / 连板天梯 / 几天几板
  • 龙虎榜 / 机构榜 / 游资榜
  • 个股异动 / 异动原因 / 大涨大跌解读
  • 同花顺热榜 / 飙升榜 / 热股榜单 / 热度排名
  • A 股财报 / 利润表 / 资产负债表 / 现金流量表 / 财务指标 / ROE / 毛利率
  • A 股行情快照 / A 股日 K / thscode(如 600519.SH)

不要用这个 skill 做什么:

  • 分钟级 K 线、实时盯盘 —— 这些属于 Longbridge(本仓库不做港股 A 股实时看盘,Longbridge 只覆盖美股账户)。历史 K 线接口仅支持日线(interval=1d),不支持分钟级。
  • 港股 / 美股 —— 这个 skill 只覆盖 A 股(thscode 形如 600519.SH / 000001.SZ / 430047.BJ)。
  • TD-LANG-03 全市场级工作不查 A 股:只有明确要看 A 股个股/板块时才用这个 skill,不要在美股大盘扫描里顺带拉 A 股。

认证

需要 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.pyA 股近一年交易日序列无参数
search.py标的检索 / 批量代码表query(thscode/代码/中英文名),--list 切到批量代码表

所有脚本都支持 --help / --smoke / --verbose / --json(占位,输出恒为 JSON)/ --fresh(绕过缓存)。缓存在 ~/.cache/market-intel/hithink/,节流默认 ≥0.5 秒/请求(_shared/client.py 的节流机制)。

CLI 示例

bash
# 行情快照:单只/多只
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 的信封:

json
{"ok": true, "data": [...], "meta": {...}}

失败时:

json
{ "error": "hithink error 1003: ...", "hint": "request_id=...", "ok": false }

数据陷阱(读这些数字前必看)

  • 金额单位恒为原币元,A 股币种恒为 CNY,不做单位换算(呼应 TD-UNIT-01 的精神:不确定单位就别自己算)。
  • financials.py 的 --limit 与 --start/--end 互斥,同传或半开区间(只传一个)都会报错——脚本已提前拦截,服务端也会返回 code=1004。
  • indicators(财务指标)走完全不同的参数契约:只认 thscode + report(yyyy-N,N=1/2/3/4 对应一季报/中报/三季报/年报),不支持 period/limit。
  • 龙虎榜 date 必须是真实交易日,传非交易日直接报错,不会自动回退;省略时服务端自动取最近可用交易日。收盘不久后当日龙虎榜可能还没发布,返回空列表是正常现象,不是接口坏了。
  • 历史 K 线单次仅一个 thscode,且 [start, end] 跨度不超过 10 年;要多只标的必须分开请求。
  • 财务指标 value 是字符串,不是 number——服务端故意保留原始精度,展示时按 index_id 名称判断单位(含"率""比率"的按百分比,"周转率"按次,"倍数"按倍)。
  • 一手信源优先(TD-SOURCE-01):anomaly-analysis-list / anomaly-analysis-stock 的解读文案是同花顺二手归纳,不能替代公司公告/交易所披露作为结论依据,只能当情绪信号参考。

错误处理

exit code含义处理
0成功解析 data
1参数校验失败(本地拦截,未发请求)按 hint 补齐参数
2缺 HITHINK_FINANCE_API_KEY提示用户去 .env 补 key
3HiThink 业务错误(code!=0)或 HTTP 4xx/非 JSON参考 error 里的 code 含义(1001 缺参/1002 格式错/1003 越界/1004 参数冲突/2003 无权限/4001 超频)
4网络错误建议重试
5HTTP 401检查 API Key 是否失效

相关 skill

  • longbridge-* —— 美股 / 港股实时行情、分钟级 K 线、账户持仓。
  • stock-deep-dive —— 单只标的多维度首次尽调(美股)。
  • trading-discipline —— 判读纪律共享源头,TD-LANG-03(只做美股,A 股是明确例外场景)、TD-SOURCE-01(一手信源)等规则见此。

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Hithink A Share AI skill do?

A 股官方数据,来自同花顺(HiThink)官方 API——涨停股票池、连板天梯、龙虎榜、个股异动原因、热榜、A 股官方口径财报(利润表/资产负债表/现金流量表/财务指标)、行情快照与日 K。

Why use Hithink A Share on TypingMind?

Because you install it once and use it with any model. Hithink A Share is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Hithink A Share in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/kansoku-trade/kansoku/tree/main/.claude/skills/hithink-a-share. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Hithink A Share?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Hithink A Share?

As many as you like. As long as a model supports skills, you can use Hithink A Share with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Hithink A Share AI skill free?

It is published on GitHub by kansoku-trade. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇