What is a-stock-data?
a-stock-data is a self-contained Skill file — structured Markdown with embedded Python — that gathers raw China A-share and related market data from 34 sources into a toolkit an AI coding assistant can use directly. It sits in the Finance & Market Agents category of the Agents & Automation tools and is open-source, written in Python and licensed Apache-2.0.
Overview
a-stock-data is a self-contained Skill file — structured Markdown with embedded Python — that gathers raw China A-share and related market data from 34 sources into a toolkit an AI coding assistant can use directly. The project describes its scope as 15 layers, 87 capability endpoints (82 primary plus 5 backups) and 34 data sources, and every source except iwencai's natural-language research search works without a user account or API key.
The layers cover quotes and K-lines, broker research reports and PDFs, market signals such as northbound flow and the dragon-tiger board, margin and capital-flow data with locally computed chip distribution, news feeds, fundamentals and financial statements, exchange filings, limit-up pools, ETF options with Greeks and implied volatility, investor Q&A sentiment, macro and interest-rate series, index constituents and the trading calendar, futures and commodities, event-driven data (earnings previews, buybacks, share pledges, IPO calendar) and convertible bonds. The point is that the assistant no longer has to know Tencent's K-line paging parameters, the binary layout of TDX end-of-day packages or Eastmoney's PDF Referer header — the skill wraps them.
It is built around source reliability. Sources are ranked by IP-ban risk — Tencent and official exchange data first, Eastmoney only for data nobody else has, routed through a throttled `em_get()` helper — and a backup-source reference lists independent fallbacks for when a primary source blocks you. The skill only fetches data: it has no backtesting engine and gives no investment advice. Keeping it as one file is a deliberate product decision, so the author suggests token-sensitive users load it on demand and use its endpoint routing table to read only the layer they need.
What it does
- 15 data layers and 87 endpoints spanning quotes, K-lines, tick trades, research, fund flow, news, financials, filings, options, macro, futures, events and convertible bonds
- Keyless by design: every integrated source except iwencai's natural-language search needs no registration or API key
- Source priority by IP-ban risk, with Eastmoney calls serialised through a rate-limited `em_get()` helper
- Backup-source quick reference with independent fallbacks for the dragon-tiger board, fund flow, filings, margin data and Beijing Stock Exchange quotes
- Works in Claude Code as an auto-triggered skill, or in Codex, OpenClaw and other assistants by pasting it into context
- Offline unit tests extracted from SKILL.md itself, plus opt-in live network tests per release
Getting started
Installation is three steps: create a skill directory, download SKILL.md into it, and install the Python dependencies. Only iwencai's research search needs an API key.
Create the skill directory
mkdir -p ~/.claude/skills/a-stock-dataDownload SKILL.md
curl -o ~/.claude/skills/a-stock-data/SKILL.md \
https://raw.githubusercontent.com/simonlin1212/a-stock-data/main/SKILL.mdInstall the dependencies
pip install mootdx requests pandas stockstats numpy baostock xlrd openpyxlAsk for data
Start Claude Code and ask something like "look at the valuation of 688017" and the skill activates. For Codex, OpenClaw or other assistants, paste SKILL.md into the system prompt or a project context file; the embedded Python runs as-is.
Commands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Let a coding assistant value an A-share stock from live price, consensus EPS and forward PE without writing scrapers
- Pull limit-up pools, dragon-tiger seats and sector fund flow into an agent's daily market recap
- Feed research reports, filings and investor Q&A into an agent that investigates a new ticker
- Collect adjusted K-lines, valuation history and industry history as input for your own backtesting framework
How a-stock-data compares
a-stock-data alongside other open-source finance & market agents tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| TradingAgents | ★ 120k | LangGraph framework that mirrors a trading firm: LLM analyst, bull/bear researcher, trader and risk-management agents debate before a decision. For research, not advice. |
| Daily Stock Analysis | ★ 67.5k | LLM research pipeline for A-share, Hong Kong, US, Japanese, Korean and Taiwanese tickers: pulls quotes, indicators and news, writes a decision dashboard and pushes it to chat or email. |
| Vibe-Trading | ★ 37.5k | An open-source trading research workspace from HKUDS: natural-language market research, multi-agent analyst teams, cross-market backtests, and an MCP server for Claude, Cursor and other clients. |
| AI Berkshire | ★ 17k | Value-investing research skills for Claude Code and Codex that turn the methods of Buffett, Munger, Duan Yongping and Li Lu into structured, multi-agent research workflows. |
| QuantDinger | ★ 13.4k | A self-hosted trading stack that carries an idea from AI market research to a Python strategy, a server-side backtest and paper or live execution on crypto exchanges and brokers, driven from the web, an API or MCP. |
| a-stock-data | ★ 11.4k | A single-file agent skill that gives AI coding assistants China A-share market data from 34 sources |
| ValueCell | ★ 11k | A multi-agent platform for financial work, pairing deep-research, news and strategy agents over US, Hong Kong, China and crypto market data, with credentials kept on the local device. |
| FinRobot | ★ 8.4k | Multi-agent equity-research platform where DCF, WACC and Monte Carlo figures are computed by deterministic Python operators and the LLM only writes the narrative. |
