HiThink-Tech/Financial-API is an official Tonghuashun service that provides A-share market data, including prices, financial statements, indices, sectors, funds and trading activity through APIs and developer tools. It serves AI agents, quantitative researchers and application developers. The catalogue add-ons help coding agents access and use this financial data.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add HiThink-Tech/Financial-API --skill hithink-financegit clone --depth 1 https://github.com/HiThink-Tech/Financial-APIWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/hithink-tech/financial-api/hithink-finance)<a href="https://agentmods.dev/skills/hithink-tech/financial-api/hithink-finance"><img src="https://agentmods.dev/badge/skills/hithink-tech/financial-api/hithink-finance/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/hithink-tech/financial-api/hithink-finance"><img src="https://agentmods.dev/badge/skills/hithink-tech/financial-api/hithink-finance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk pass
- NVIDIA SkillSpector warn
SkillSpector: 2 findings, up to high
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- high Privilege Escalation · line 42 Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
- high Privilege Escalation · line 70 Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00087 | $0.03876 |
| Opus 5 | $0.00044 | $0.01938 |
| Sonnet 5 | $0.00017 | $0.00775 |
| Haiku 4.5 | $0.00009 | $0.00388 |
Grade A, and why
hithink-finance scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- 是否只有 HTTP/curl 环境,或用户明确要求自行集成。 How it starts
The opening of the file, as written. The whole thing — 156 lines — stays where its author put it; the contents beside it link to each section on GitHub.
hithink finance
这是“同花顺金融数据服务”的统一 Agent 入口和主路由。它负责识别需求、探测当前能力、处理配置边界并选择接入方式;选定方式后只读取对应的一级入口,由该入口继续按需披露详细契约。
直接描述需求
允许用户使用自然语言开始,不要求用户先理解命令、接口、thscode 或复权参数。例如:
- “查一下贵州茅台今天的价格。”
- “比较茅台和平安银行最近一年的走势。”
- “查沪深 300 当前成分股。”
- “看看今天有哪些涨停股。”
- “把全市场历史行情导出到文件。”
- “检查我的本地行情库是否需要更新。”
先把自然语言转换为明确的数据任务,再按当前环境选择接入方式。不要把命令选择、代码后缀或参数枚举转嫁给用户。
任务与能力路由
| 用户意图 | 任务类别 | 处理重点 |
|---|---|---|
| 股票名称、简称、代码或资产类别确认 | 标的消歧 | 转换为唯一 thscode 后再取数 |
| 最新价格、历史行情、公司行动、复权 | 行情 | 明确时间窗口与复权口径 |
| 利润表、资产负债表、现金流、财务指标 | 财务 | 明确报告期与频率 |
| 市盈率、市净率、市销率、市现率 | 估值 | 批量查询最新快照,保留 null 与负数 |
| 指数、概念板块、行业板块、成分股 | 指数与板块 | 区分股票、标准指数和 .TI 板块 |
| 集合竞价快照、竞价短期基准 | 集合竞价 | 明确标的、实时/终态阶段或查询日期 |
| 基金资料、基金公司、基金经理、净值、收益、财务、持仓、持有人、基金资讯、ETF/LOF 行情 | 公募基金 | 先区分 fund-otc/fund-etf/fund-lof/fund-reits 与能力边界 |
| 涨停、跌停、炸板、连板、异动、热榜、龙虎榜 | 特色数据 | 先确认是否为 today-only 能力 |
| 全市场数据、本地库、SQL、同步、导出 | 数据管理 | 检查数据新鲜度并让大结果落盘 |
路由流程
- 从用户原始表达识别任务类别,明确数据、资产类别、时间范围、新鲜度、复权口径、结果规模和输出形式;只在缺失信息会显著改变结果时做一次简短确认。
- 处理名称、代码和口径等用户输入,不要求用户先提供技术参数。
- 只做无副作用的当前环境探测,不要求用户重复安装:
- 是否已配置统一凭据:先检查
HITHINK_FINANCE_API_KEY,再检查用户级credentials.env,只报告来源和存在状态,不显示值。 - 当前会话是否已连接
hithink-finance-a-share、hithink-finance-a-share-index或hithink-finance-metaMCP。 - PATH 中是否存在
hithink-finance;存在时读取hithink-finance --version,不要先升级。 - 用户是否正在 Python/Notebook 项目、是否已有
marketdb,或是否明确要求 Python。 - 是否只有 HTTP/curl 环境,或用户明确要求自行集成。
- 是否已配置统一凭据:先检查
- 根据任务和能力边界选择一种主路径;不要为了“完整”而同时安装或探测全部工具。
- 只读取下表对应的一个一级 reference,再由该入口路由到其子目录契约。
- 执行后报告数据源、时间范围、口径、行数、输出路径与线上验证边界。
接入方式决策
| 场景 | 首选 | 一级入口 |
|---|---|---|
| 人类终端、Agent 执行、自动化、远端与本地数据一体化 | CLI | cli.md |
| Chat/IDE 会话已连接托管服务 | MCP | mcp.md |
| 零依赖 HTTP、自定义脚本、服务端集成 | REST API | api.md |
| Python、Notebook、研究流程或已有 marketdb | Python SDK | python-sdk.md |
CLI 高度封装远端取数、本地 DuckDB、结构化输出和大结果落盘,对人类与 Agent 都友好。MCP 最适合 Chat 场景。REST API 可塑性最高。Python SDK 适合二次开发和研究。
统一 API Key
所有远端方式共用在 https://fuyao.aicubes.cn/admin 获取的 API Key。
What ships with it
25 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- agents/openai.yaml 264 B
- references/api.md 4.3 KB
- references/api/capability-map.md 12 KB
- references/api/endpoints-auction.md 3.4 KB
- references/api/endpoints-calendar.md 1.3 KB
- references/api/endpoints-financials.md 9.0 KB
- references/api/endpoints-fund.md 22 KB
- references/api/endpoints-index.md 5.5 KB
- references/api/endpoints-market-dumps.md 5.5 KB
- references/api/endpoints-meta.md 3.5 KB
- references/api/endpoints-prices.md 7.1 KB
- references/api/endpoints-special-data.md 17 KB
- references/api/endpoints-valuations.md 2.5 KB
- references/cli.md 3.0 KB
- references/cli/builtin-skills.md 2.0 KB
- references/cli/setup.md 7.7 KB
- references/mcp.md 5.3 KB
- references/mcp/capability-map.md 4.9 KB
- references/mcp/hithink-finance-a-share-index.md 1.9 KB
- references/mcp/hithink-finance-a-share.md 6.6 KB
- references/mcp/hithink-finance-fund.md 6.3 KB
- references/mcp/hithink-finance-meta.md 1.9 KB
- references/python-sdk.md 780 B
- references/python-sdk/marketdb.md 866 B
- references/python-sdk/remote-toolkit.md 2.1 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 9d ago First seen · 156 lines · 87 tokens per session scan A 7541734ea045
hithink-finance is a skill published in the GitHub repository HiThink-Tech/Financial-API (2,890 stars, last pushed 12d ago), licensed MIT. It adds 87 tokens to every session and 3,876 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
通达信TQ
A connection between Python strategy files and TdxQuant, TongdaXin's platform for securities data analysis and quantitative investment research. It uses the platform's tqcenter.py module to interact with the TongdaXin client.
机构持仓股东分析
A research workflow for examining an A-share company’s major shareholders and institutional holdings. It compares ownership structure, changes in holdings, concentration, and possible investor behavior.
问小达选A股
A Chinese-language stock screener for A-shares, the shares traded on mainland Chinese stock exchanges. It turns natural-language requests into filters for prices, trends, company finances, industries, concepts, and money flows.
政策解读与受益分析
A research assistant for interpreting Chinese policies and tracing how they may affect industries and companies. It is designed for policy research, thematic investing, event-driven analysis, and mapping policy changes to potential beneficiaries.
仓位决策
A Chinese-language decision aid for managing how much money is invested in A-share trades. It considers market conditions, current holdings, risk tolerance, and investment timeframe.
生成交易计划
A trading-plan workflow for an already selected A-share stock. It covers possible entry, adding or reducing a position, profit-taking, stop-losses, and exit conditions.