HiThink-Tech/Financial-API
同花顺官方 A股金融数据服务,提供股票实时行情、历史行情、财务报表、指数、板块、涨停等数据,适用于 AI Agent、量化研究和应用开发,支持 API、MCP、CLI 和 Python。Official Tonghuashun (HiThink) A-share financial data service providing real-time and historical stock market data, financial statements, indices, sectors and limit-up data for AI agents, quantitative research and application development.
HiThink‑Tech / Financial‑API – 同花顺金融数据服务
What it is – A commercial‑grade data platform, maintained by the Chinese market‑data provider 同花顺 (10 Juqka). It offers a unified, API‑key‑protected service for A‑share (China‑main‑board) market data, aimed at AI agents, quantitative researchers and developers.
Core capabilities
- Real‑time snapshots, collection‑auction snapshots and daily K‑line (OHLCV) for any A‑share ticker.
- Full‑company financial statements (income, balance‑sheet, cash‑flow) and a suite of valuation ratios (PE, PB, PS, PCF).
- Metadata: ticker lookup, trading‑calendar, corporate actions, split/bonus factors and forward‑/backward‑adjusted prices.
- Market‑wide data: index/sector constituents, fund/manager information, public futures & options contracts, and specialty lists such as limit‑up/down pools, “炸板” (break‑through) pools, hot‑stock and龙虎榜 rankings.
- Bulk market‑dump download for back‑testing or factor research.
- Local DuckDB‑based marketdb that can incrementally sync the whole market and be queried with plain SQL.
How to access
| Method | Typical use‑case | Entry point |
|---|---|---|
| REST API | Embed in web services, apps, any language | https://fuyao.aicubes.cn/api/... (curl example in README) |
| MCP (Model‑Center‑Protocol) | Plug into LLM‑enabled tools like Claude Desktop, Cursor, Windsurf | Six hosted endpoints (a‑share, a‑share‑index, meta, fund, futures, options) |
CLI (@hithink-tech/hithink-finance-cli) |
Quick terminal queries, bulk download, data‑dump, local DuckDB init | hithink-finance … commands |
Python SDK (python/ package) |
Notebook exploration, custom scripts, integration with pandas/NumPy | python -m pip install -e ./python then use toolkit/fuyao scripts |
Agent Skill (skills/hithink-finance/) |
Let an AI agent automatically pick the best backend (API, MCP, CLI, SDK) | Installed via npx skills add … |
Typical workflow
- Obtain a single API key from the web portal and store it securely (
HITHINK_FINANCE_API_KEY). - Choose the most convenient entry point (Skill → Agent, CLI for ad‑hoc, SDK for notebooks, REST for services).
- Resolve a ticker to a unique
thscode(e.g.,600519.SH). - Call the desired endpoint (snapshot, K‑line, financials, etc.).
- For large results the system writes files locally (DuckDB or CSV) and returns only a path/summary to the caller.
Who should use it
- AI agents that need up‑to‑date market data (Claude, Cursor, etc.) – install the Skill so the agent can switch between API, MCP or CLI automatically.
- Quant researchers building back‑tests, factor models, or dashboards – use the CLI or marketdb to keep a local DuckDB copy and query with SQL.
- Developers building trading‑oriented web or mobile apps – call the REST API directly with any language.
- Data engineers needing bulk market dumps for data‑lake ingestion.
Safety & compliance notes
- The API key must never be hard‑coded or committed to source control.
- Large result sets must be written to disk; the service will not stream massive JSON payloads to avoid context overflow.
- The service provides no investment advice – callers must label any analysis as “non‑advisory”.
- Rate‑limit is soft (no hard quota) but users are asked to avoid bursty high‑concurrency traffic.
Project status
- Actively maintained monorepo (Python + Node.js CLI + Skill).
- Recent releases added collection‑auction data, expanded fund coverage, and introduced the unified Skill.
- Future roadmap mentions integration with the upcoming 同花顺 AI client for tighter LLM workflows.
License – MIT.
All information above is taken directly from the repository’s README; no additional features have been inferred.
Related
- Project
- Project
- Project
- Project
- Project