a-stock-data
A full-stack A-share data toolkit integrating 15 ready-to-use data sources.
Install & Use
Copy this prompt and send it to your AI assistant (Claude / Cursor / TRAE / Codex / WorkBuddy etc.) to auto-install:
Help me install this AI Skill: a-stock-data. It is used for: A full-stack A-share data toolkit integrating 15 ready-to-use data sources. Full Skill content: https://321skill.com/skills/a-stock-data/raw/index.md Read that page and install it.
The prompt includes a link to the full Skill content. You can also view the full content.
This Skill addresses the fragmentation of A-share data acquisition, unstable APIs, and the risk of being blocked. In practical development, quantitative traders or data analysts often need to pull market data, research reports, capital flows, announcements, and other information from multiple data sources. However, each source has its own API, rate-limiting policies, and failure risks, making manual switching very time-consuming.
Usage is straightforward: simply place the SKILL.md file into the ~/.claude/skills/a-stock-data/ directory, and Claude Code will automatically recognize it. After that, you can use natural language instructions to fetch various A-share data, such as "Get the K-line data for Kweichow Moutai over the last 30 days" or "Query the top 10 stocks by northbound capital inflow today." It will automatically select the optimal data source (prioritizing Tongdaxin/Tencent, with built-in rate-limiting and anti-blocking for East Money interfaces) and return structured results.
It is ideal for quantitative traders, data analysts, and backend developers who require real-time or historical A-share data. Particularly for teams or individuals already using Claude Code as an AI programming assistant, they can directly call 43 endpoints covering ten layers of data architecture—including market data, research reports, capital flows, announcements, the Dragon & Tiger List, ETF options, and more—with zero configuration.
It is recommended to use this tool uniformly when actual A-share data fetching is needed, to avoid manually stitching together multiple APIs. Note that it primarily focuses on data acquisition scenarios and does not include strategy backtesting or visualization features. Some data sources (e.g., East Money) may intermittently trigger risk controls under residential IPs in mainland China; in such cases, you can refer to the built-in backup source quick-reference table for fallback options.
Key Features
Unlike akshare, a-stock-data completely removes third-party data dependencies. All data sources connect directly via HTTP APIs (only mootdx retains TCP connections). It features built-in rate-limiting and anti-blocking mechanisms for East Money interfaces, along with 15 independent backup and fallback strategies for data sources. In contrast, akshare relies on multiple third-party libraries and lacks automatic fallback options when interfaces fail.
Limitations
Requires Python 3.8+ environment and depends on the mootdx library (for TCP connections to Tongdaxin). Some data sources (e.g., East Money) may intermittently trigger risk controls for residential IPs in mainland China, requiring retries or network changes.
FAQ
What should I do if the East Money interface gets blocked?
The built-in rate-limiting and anti-blocking mechanism (em_get throttling entry) is in place. If it still gets blocked, refer to the "Backup Source Quick Reference" section in the README. Use the independent fallback functions to downgrade, such as dragon_tiger_backup(), which routes through the official Shanghai and Shenzhen Stock Exchange interfaces.
Does this Skill require akshare?
No. Starting from V3.0, akshare dependency has been completely removed. All data sources connect directly via HTTP APIs, with only mootdx retained for Tongdaxin TCP connections.
Installation guide for AI assistants
If your AI coding assistant (Claude Code, Cursor, TRAE etc.) can see this page, send it this message to auto-install:
Visit https://321skill.com/skills/a-stock-data/raw/index.md to read the original Skill definition (Markdown format) for a-stock-data, and install it according to the instructions.
Raw Markdown URL for AI: /skills/a-stock-data/raw/index.md