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.
Borrowing it
Nothing to install: this file belongs to HiThink-Tech/Financial-API. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/HiThink-Tech/Financial-API/main/AGENTS.mdgit 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/instructions/hithink-tech/financial-api/agents-md)<a href="https://agentmods.dev/instructions/hithink-tech/financial-api/agents-md"><img src="https://agentmods.dev/badge/instructions/hithink-tech/financial-api/agents-md/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/instructions/hithink-tech/financial-api/agents-md"><img src="https://agentmods.dev/badge/instructions/hithink-tech/financial-api/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.01787 | $0.01787 |
| Opus 5.5 | $0.00715 | $0.00715 |
| Sonnet 5.5 | $0.00357 | $0.00357 |
| Haiku 4.5 | $0.00179 | $0.00179 |
Grade A, and why
Financial-API AGENTS.md scanned grade A with 0 findings 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 18d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
任何 AI coding/data Agent 进入本仓库后的公开入口。项目品牌为“同花顺金融数据服务(hithink finance)”。
必读顺序
- 旧 checkout、旧 Prompt 或旧根级 Python 路径:先读
docs/monorepo-migration.md。 - CLI 业务任务直接读取命中的 CLI 内置领域 Skill,安装前准备读取 CLI 首次接入;REST 文档和接口选路读取
hithink-finance,MCP 配置和工具调用读取hithink-finance-mcp。 - 只加载 Skill 选择的接入入口、业务域首页和目标接口小节或工具文档,不要递归读取全部契约。
Monorepo 边界
hithink-finance-cli/:Node.js CLI 子项目,面向人类、Agent 和自动化;运行时不依赖 Python。python/:唯一 Python 项目根,包含远端取数 toolkit、本地marketdb、示例和测试。docs/:公共文档中心;docs/api/按前端单接口页与多接口模块页组织 REST 契约,docs/mcp/提供原子工具文档。skills/hithink-finance/:独立的 REST API Wiki 与 API Router;契约从docs/api/镜像,附带 CLI 简介。skills/hithink-finance-mcp/:独立的 MCP 配置、业务域选路与 tool 契约;按业务分类合并工具文档,每个 tool 保留包含参数与返回字段的独立小节。examples/:monorepo 级示例导航与静态灵感。
选择接入方式
| 场景 | 优先入口 |
|---|---|
| 人类终端、Agent 执行、自动化、远端+本地一体化 | hithink-finance CLI |
| 已连接 MCP 的 Chat 场景 | 托管 MCP |
| 零依赖 HTTP、自定义语言或服务端 | REST API |
| Python/Notebook/研究或已有 marketdb | Python toolkit/SDK |
CLI 业务域优先按内置 Skill 的 description 选择,选定后读取目标 reference,并按需运行 schema <id>;未知命令再查询 capabilities;MCP 以实时 tools/list 为准;REST 响应字段以 docs/api/ 及远端 https://fuyao.aicubes.cn/llms-full.txt 为准;Python 适配层参数以当前函数签名和 --help 为准。
认证凭据
CLI 默认推荐 OAuth,先复用当前有效凭据;同一系统用户、同一服务环境下共享认证状态,可分别保存 OAuth 和 API Key,由 auth use 选择当前方式。首次登录或 OAuth 失效时使用 auth login --method oauth;用户明确选择 API Key 时使用对应流程。OAuth 默认连接生产认证服务。命令和存储边界见 hithink-finance-cli/README.md。
REST/Python/MCP 使用在 https://fuyao.aicubes.cn/admin/ 获取的 API Key,统一来源为用户级 HITHINK_FINANCE_API_KEY,其次是 hithink-finance/credentials.env 用户级凭据文件。
- 准备 CLI 远端取数时先用只读
auth status检查已启用凭据,按当前方式调用;OAuth 失效时提示重新认证。仅查询接口文档时直接读取本地契约。 - REST/Python/MCP 取数或认证诊断复用统一 Key 来源,不得因切换接入方式再次索要。
- 不得强制用户把 Key 粘贴到对话;用户可以为了便利主动提供给 Agent 上下文。接收后不得复述,应提示聊天平台可能保留消息记录,并安全写入用户级统一凭据来源。
- 不得把 Key 写入代码、日志、公开配置、产物或 Git。
- CLI 首次初始化且没有旧 Key 候选时,仅导入一次进程环境 Key;后续通过
auth login --method api-key --api-key-stdin更新,兼容--replace。业务命令的显式--api-key-stdin只覆盖本次请求。 - REST/Python 读取统一环境变量或用户级凭据文件;旧变量仅兼容。
- MCP 优先使用
${HITHINK_FINANCE_API_KEY},不继承环境时由 Agent 从统一来源配置客户端 Secret。
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.
- 18d ago Changed · +5 lines · +331 tokens per session 2c3f79b4f423
- 2mo ago Changed · +46 tokens per session 31ba9e24f1fb
- 2mo ago Changed · +91 tokens per session cbae328a4526
- 3mo ago First seen · 89 lines · 1,319 tokens per session scan A 608dcf7fe7b1
Financial-API AGENTS.md is an instructions file published in the GitHub repository HiThink-Tech/Financial-API (4,715 stars, last pushed 3d ago), licensed MIT. It adds 1,787 tokens to every session, about $0.0071 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Financial-API AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| Financial-API AGENTS.mdHiThink-Tech/Financial-API | Instructions file | 4.7k | 3d ago | MIT | A | 1,787 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 196k | today | MIT | A | 9,887 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 144k | today | MIT | A | 7,230 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 196k | today | MIT | A | 5,685 | GitHub Copilot |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 150k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 196k | today | MIT | A | 3,303 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 289k | 2d ago | MIT | A | 4,393 | Codex, OpenCode |