1. Project Overview
Financial-API is HiThink's official A-share (China mainland stock market) financial data service, giving AI agents, quantitative researchers, and application developers a single, unified way to query real-time and historical market data, financial statements, valuations, indices, sectors, and mutual fund information without having to piece together multiple data vendors.
2. Background & Positioning
HiThink (ๅ่ฑ้กบ), a major Chinese financial data and trading-software provider, built this project to expose its internal market-data infrastructure through developer-friendly, standardized interfaces. The core mission is to let one API key drive every access pattern โ REST calls, an MCP server for AI chat tools, a CLI for scripting, a Python SDK for research notebooks, and a ready-made Agent Skill โ so teams don't have to write and maintain separate integrations for each use case.
What sets it apart from typical open financial-data wrappers is its AI-agent-first design: it ships an installable Agent Skill and native MCP support out of the box, is explicit about avoiding mock data and context-overflow in LLM workflows, and focuses specifically and deeply on the China A-share market rather than trying to cover global exchanges generically.
3. Feature Categories
๐ Market Data โ real-time quotes, K-line (candlestick) history, trading volume, and auction snapshots. Examples: latest price lookup, intraday tick data, historical daily/minute bars, pre-market auction snapshots.
๐ Financial Statements & Valuation โ company fundamentals for analysis and screening. Examples: income statements, balance sheets, cash-flow statements, valuation ratios (P/E, P/B, P/S, P/CF).
๐ฅ Specialized Market Indicators โ data unique to the A-share market's trading mechanics. Examples: limit-up/limit-down pools, board-break tracking, market anomalies, trending-stock lists, dragon-tiger (top trader) rankings.
๐ฆ Indices & Sectors โ grouped market views for macro and thematic analysis. Examples: index constituents, sector performance, sector rotation data.
๐ฐ Mutual Funds & ETFs โ fund-side data alongside equities. Examples: fund holdings, historical fund performance, ETF/LOF market quotes.
๐๏ธ Local Data Infrastructure โ tools for offline, large-scale analysis. Examples: full-market dataset downloads, local DuckDB database construction via marketdb, SQL querying of locally stored market data.
4. Key Highlights
- Seven access methods, one API key โ Skill, MCP, REST API, CLI, Python SDK, marketdb, and direct JSON API all authenticate with the same unified
HITHINK_FINANCE_API_KEY. - Native MCP support โ connects directly to Claude Desktop, Cursor, and Windsurf, letting AI assistants query financial data conversationally.
- Installable Agent Skill โ a one-command
npx skills addinstall gives coding agents a unified interface that automatically picks the right backend for a given request. - Local DuckDB integration (
marketdb) โ supports building and querying a persistent local database, useful for repeated backtesting without hammering the remote API. - No mock data policy โ the service explicitly reports when data is unavailable rather than fabricating values, which matters for research and trading-adjacent workflows.
- Deep A-share specialization โ indicators like limit-up pools and dragon-tiger rankings reflect deep familiarity with China's market microstructure, not a generic global-equities wrapper.
5. Use Cases by Role
General Developers โ integrate stock quotes, financials, or fund data into web/mobile apps via the REST API without building a data pipeline from scratch.
Data & Research Scientists / Quants โ use the Python SDK and marketdb to pull historical data, build local DuckDB datasets, and run backtests or factor research directly in notebooks.
AI/Agent Builders โ install the Agent Skill or configure the MCP server so LLM-based agents can answer financial questions or automate research tasks with live data.
6. Getting Started
Find what you need โ browse the REST API contracts and guides in the documentation hub:
https://fuyao.aicubes.cn/docs/
Install and integrate โ pick the access method that fits your workflow:
# AI agent / coding assistant integration
npx skills add HiThink-Tech/Financial-API --skill hithink-finance -g --yes
# Command-line tool
npm install -g @hithink-tech/hithink-finance-cli
hithink-finance auth login
# Python SDK
python -m pip install -e ./python
Register for a unified API key first at https://fuyao.aicubes.cn/admin/ and set it as the HITHINK_FINANCE_API_KEY environment variable.
Contribute โ the repository is organized as a monorepo; review the docs and package-specific READMEs (hithink-finance-cli/README.md, python/README.md, skills/hithink-finance/SKILL.md) before opening a pull request on GitHub.
7. Project Structure
docs/ API contracts and central documentation hub
api/ REST API contract source
skills/
hithink-finance/ Installable Agent Skill (unified contracts)
hithink-finance-cli/ Node.js CLI, independent of the Python SDK
python/
marketdb/ Local DuckDB interface for offline querying
toolkit/fuyao/ Remote data client and helper scripts
examples/ Executable usage examples
tests/ Test suite
examples/ Additional inspiration gallery and static samples
scripts/ Repository maintenance utilities
8. Related Ecosystem
Financial-API integrates with the Model Context Protocol (MCP), making it usable directly from Claude Desktop, Cursor, and Windsurf. It builds on DuckDB for local data storage via the marketdb module. The underlying data platform is hosted at fuyao.aicubes.cn, which also provides the API key management console and full documentation site.
9. License
โ
Free to use, copy, modify, merge, publish, and distribute under the MIT License, including for commercial products.
โ
Can be embedded in proprietary or closed-source applications.
โ Comes with no warranty; the authors are not liable for damages from its use.
โน๏ธ Access to the underlying financial data still requires a HiThink API key and is subject to HiThink's own API terms of service, separate from the MIT license on the code itself.
โน๏ธ The service is explicitly non-investment-advisory โ outputs should not be treated as financial advice.
10. FAQ
Q: Do I need one API key per integration method (REST, CLI, MCP, etc.)?
A: No โ a single HITHINK_FINANCE_API_KEY, obtained at https://fuyao.aicubes.cn/admin/, works across all seven access methods.
Q: Which access method should I use for building an AI agent?
A: Use the Agent Skill (npx skills add HiThink-Tech/Financial-API --skill hithink-finance -g --yes) for a unified interface, or the MCP server if you're working directly in Claude Desktop, Cursor, or Windsurf.
Q: Can I store data locally instead of calling the API every time?
A: Yes โ use the marketdb module in the Python SDK to build a local DuckDB database and run SQL queries against it.
Q: Is this limited to Chinese A-shares, or does it cover global markets?
A: The service is focused specifically on the China A-share market, including market-specific indicators like limit-up/down pools and dragon-tiger rankings.
Q: What happens if requested data isn't available?
A: The service explicitly reports the data as unavailable rather than returning mock or fabricated values.
11. Quick Links
- Repository: https://github.com/HiThink-Tech/Financial-API
- Documentation Hub: https://fuyao.aicubes.cn/docs/
- API Key Management: https://fuyao.aicubes.cn/admin/
- Website: https://fuyao.aicubes.cn/
12. Summary
Financial-API packages HiThink's A-share market data infrastructure into a single, consistently authenticated service that developers, quants, and AI agents can each consume in the format that suits them โ REST, CLI, Python, MCP, or a plug-and-play Agent Skill. It's most valuable to teams building China-market financial applications or AI research agents that need reliable, well-structured data without stitching together multiple vendors.