Model or dataset
simonlin1212/a-stock-data avatar
simonlin1212/a-stock-data

a-stock-data: A Zero-Auth A-Share Data Skill for AI Coding Agents

A股全栈数据工具包 · 十二层架构 · 60端点 · 22数据源 · 零鉴权 | Full-stack China A-share data toolkit for AI agents — 12 layers, 60 endpoints, 22 sources, zero-auth

9,851 stars1,795 forksPythonApache-2.0

At a glance

What is it?
The project packages 22 China A-share data sources into a single SKILL.md file that Claude Code, Codex or OpenClaw can execute. Its value is breadth under zero authentication; its risk is that every endpoint depends on an undocumented upstream that can change without notice.
Who is it for?
Adopt it if you drive A-share research from an AI coding assistant and want breadth without managing API keys, and if you can tolerate upstream breakage as a normal operating condition. Do not adopt it if you need point-in-time correctness, a supported SLA, or North Exchange coverage in the valuation endpoint.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 11 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

The Problem: A-Share Data Is Scattered Behind Incompatible Access Rules

Anyone pulling China A-share data programmatically runs into the same wall. The data exists, but it sits behind a dozen unrelated interfaces with unrelated conventions. The README lists the friction directly: mootdx K-line parameters, the Eastmoney PDF Referer header, and the iwencai X-Claw authentication. Each source has its own request shape, its own field names, and its own way of failing. a-stock-data is a packaging project. It does not collect data itself. It wraps 22 sources behind a documented set of 60 endpoints and ships the result as a single SKILL.md file, which the README describes as structured Markdown with embedded Python. The intended user is an engineer or analyst who drives research through an AI coding assistant and does not want to hand-write a client per source. The secondary audience is the agent itself: the skill format means the assistant can read the endpoint catalogue and call the right function without the user specifying a library.

Twelve Layers, and Why the Priority Order Matters

The architecture is a twelve-layer stack, with the README stating an explicit priority rule: mootdx and Tencent are used first because they do not block IPs, while Eastmoney is reserved for data only it carries and is rate-limited internally. That ordering is the design. The layers run from quotes (mootdx, Tencent, Baidu K-line, Sina adjustment factors) through research reports, signals, capital and chips, news, fundamentals, announcements, limit-up tracking, ETF options, sentiment, macro, and index calendars. Version 3.8.0 added index data and exchange official backups. The endpoint count deserves scrutiny rather than repetition. The README explains that 61 listed rows map to 60 endpoints: the Eastmoney industry report and the Eastmoney reportapi are one endpoint differing only by a qType parameter, the Tonghuashun northbound history row is a local cache rather than an independent endpoint, and the intraday anomaly row contains two endpoints. That accounting is unusually candid, and it tells you the headline number is a capability count, not a function count. Read the catalogue as a map of what is reachable, not as a guarantee that 60 independent integrations exist.

Installation: Three Commands and a Dependency List

Setup is short. The README gives three steps. First, create the skill directory with mkdir -p ~/.claude/skills/a-stock-data. Second, fetch the skill file with curl -o ~/.claude/skills/a-stock-data/SKILL.md https://raw.githubusercontent.com/simonlin1212/a-stock-data/main/SKILL.md. Third, install dependencies with pip install mootdx requests pandas stockstats numpy baostock xlrd openpyxl. The README notes that akshare is no longer required as of V3.0. Python 3.9 or later is the stated floor. Activation is implicit: the README says that starting Claude Code and asking about a specific ticker's valuation will trigger the skill. For Codex and OpenClaw users there is no skill directory convention; the README instructs you to paste the SKILL.md contents into your system prompt or project context file, since the embedded Python is meant to run directly. There is no package to install from PyPI and no CLI. The distribution unit is one Markdown file plus your own Python environment, which means version pinning is manual: the curl command always pulls main unless you change the URL.

Where the Design Breaks: Upstream Dependence and Known Gaps

The honest limitation is structural. Every endpoint is a wrapper around an interface the project does not control, and the README treats breakage as expected rather than exceptional. It documents a backup source lookup and degradation strategy for limit-up lists, capital flows and announcements, plus exchange-official fallbacks for margin trading and North Exchange quotes. A project that ships a fallback table is telling you the primary path fails sometimes. Several documented gaps are worth naming. The valuation history endpoint, added in V3.7, goes back to 2016 but the README states it does not support the North Exchange. The Shenwan industry history endpoint returns codes without Chinese names. The index constituent and weight endpoints preserve the source-side date and explicitly do not offer historical point-in-time backfill, which makes them unsuitable for backtests that need to know what the index contained on a past date. The northbound real-time endpoint carries a warning that Shenzhen Connect disclosure has been tightened upstream and that HKEX is the authoritative fallback. None of this is hidden, but it means the toolkit is a research accelerator, not a data warehouse.

Choosing Between This and a Direct akshare or mootdx Integration

The obvious alternative is calling akshare or mootdx directly, which is what this project does underneath. The difference is in what you own. With a direct integration you write and maintain the request code, the field mapping and the retry logic, and you get exactly the sources you chose. With a-stock-data you inherit 22 sources and 60 endpoints already mapped, plus the priority rules and the backup table, at the cost of a layer of indirection you did not write and cannot easily patch without forking. There is a second axis: this project is built for agent consumption. The F10 endpoint is described as truncated by about 70 percent to save tokens, and the skill format exists so an assistant can select endpoints from a catalogue. If your consumer is a Python script rather than an LLM, that token optimization buys you nothing and the single-file distribution is a mild inconvenience. If your consumer is Claude Code or Codex, the packaging is the entire product.

Licence and the Cost of Keeping Up

The licence is Apache-2.0, which permits commercial use, modification and redistribution provided you keep the notices and state changes. That covers the wrapper code and the SKILL.md file. It does not cover the underlying data. The 22 upstream sources have their own terms, and nothing in the repository grants you rights to redistribute their content. If you plan to serve this data to third parties, the licence question is about the sources, not about this project. Maintenance cost is the real recurring expense. The release history shows a steady cadence: v3.7.1 fixed get_prefix() suffix routing, v3.7.2 aligned North Exchange code-range detection, and v3.8.0 added index data and exchange backups. Those are small, frequent fixes to routing and source quirks, which is what you would expect from a wrapper layer. Pinning to a release tag rather than main is the only version control the install method offers, and there is no changelog-driven migration guide beyond the CHANGELOG.md link in the README.

Who Should Take It, and What to Check First

The fit is narrow and clear. If you run A-share research through an AI coding assistant, want breadth across quotes, reports, capital flows, limit-up tracking and macro without managing credentials, and accept that upstream interfaces change, this is a reasonable starting point. The zero-auth design removes a real operational burden. If you need point-in-time index membership for backtesting, North Exchange coverage in valuation history, or any form of support commitment, it is the wrong tool, and the README says so in its own notes. The verification step is specific: open SKILL.md and read the sections that state the actual data date ranges, then exercise one endpoint in each layer you plan to depend on, because the degradation strategy means the primary path is not always the one that answers. The project is maintained, Apache-2.0, and documented with unusual candour about its own gaps. Those gaps are the thing to test, not the endpoint count.

Editorial conclusion

Adopt it if you drive A-share research from an AI coding assistant and want breadth without managing API keys, and if you can tolerate upstream breakage as a normal operating condition. Do not adopt it if you need point-in-time correctness, a supported SLA, or North Exchange coverage in the valuation endpoint. Before committing, read the SKILL.md sections that state the real data dates, and test one endpoint per layer you actually depend on, since the README itself describes degradation and backup sources rather than uptime guarantees.

Official sources

  1. Issues
  2. License: Apache-2.0
  3. README
  4. Releases
  5. simonlin1212/a-stock-data on GitHub
Community notes

Community notes