hithink-finance

hithink-finance is a skill for Codex from HiThink-Tech/Financial-API. It costs 87 tokens per session (3,876 once invoked), scanned A, original, MIT.

A routing guide for accessing Chinese A-share financial data, including prices, company reports, valuations, funds, indices, sectors, and local data storage.

In plain words
What is it for?
Use it to query or export market data, financial statements, valuations, fund information, index constituents, market events, or synchronized local datasets.
Why use it?
It translates ordinary finance questions into the right data request and handles distinctions such as asset type, date range, and adjusted prices.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to query or export market data, financial statements, valuations, fund information, index constituents, market events, or synchronized local datasets.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hithink-tech/financial-api/hithink-finance
About the project

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.

HiThink-Tech/Financial-API · 2,890 stars · on GitHub · fuyao.aicubes.cn

Install

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.

Any agent
npx skills add HiThink-Tech/Financial-API --skill hithink-finance
Clone the repo
git clone --depth 1 https://github.com/HiThink-Tech/Financial-API

Made for: Codex.

Wrote 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.

agentmods badge for hithink-finance

README.md
[![agentmods](https://agentmods.dev/badge/skills/hithink-tech/financial-api/hithink-finance/github.svg)](https://agentmods.dev/skills/hithink-tech/financial-api/hithink-finance)
Your own site
<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.

agentmods 80×15 button for hithink-finance

Your own site · 80×15
<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>
Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,876 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 28 Aug 2026
  • Snyk pass 28 Aug 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
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.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 9d ago against content hash 7541734ea045, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

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 环境,或用户明确要求自行集成。
skills/hithink-finance/SKILL.md · 156 lines

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、同步、导出 数据管理 检查数据新鲜度并让大结果落盘

路由流程

  1. 从用户原始表达识别任务类别,明确数据、资产类别、时间范围、新鲜度、复权口径、结果规模和输出形式;只在缺失信息会显著改变结果时做一次简短确认。
  2. 处理名称、代码和口径等用户输入,不要求用户先提供技术参数。
  3. 只做无副作用的当前环境探测,不要求用户重复安装:
    • 是否已配置统一凭据:先检查 HITHINK_FINANCE_API_KEY,再检查用户级 credentials.env,只报告来源和存在状态,不显示值。
    • 当前会话是否已连接 hithink-finance-a-sharehithink-finance-a-share-indexhithink-finance-meta MCP。
    • PATH 中是否存在 hithink-finance;存在时读取 hithink-finance --version,不要先升级。
    • 用户是否正在 Python/Notebook 项目、是否已有 marketdb,或是否明确要求 Python。
    • 是否只有 HTTP/curl 环境,或用户明确要求自行集成。
  4. 根据任务和能力边界选择一种主路径;不要为了“完整”而同时安装或探测全部工具。
  5. 只读取下表对应的一个一级 reference,再由该入口路由到其子目录契约。
  6. 执行后报告数据源、时间范围、口径、行数、输出路径与线上验证边界。

接入方式决策

场景 首选 一级入口
人类终端、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。

Read the full file on GitHub · 156 lines

Changes

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.

  1. 9d ago First seen · 156 lines · 87 tokens per session scan A 7541734ea045

Subscribe to this mod's changes

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.

Related

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.

adambbhe/TDX-finance-mcp-plugin-v3 · 56 tokens

机构持仓股东分析

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.

adambbhe/TDX-finance-mcp-plugin-v3 · 229 tokens

问小达选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.

adambbhe/TDX-finance-mcp-plugin-v3 · 82 tokens

政策解读与受益分析

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.

adambbhe/TDX-finance-mcp-plugin-v3 · 248 tokens

仓位决策

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.

adambbhe/TDX-finance-mcp-plugin-v3 · 109 tokens

生成交易计划

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.

adambbhe/TDX-finance-mcp-plugin-v3 · 64 tokens