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

a-stock-data packs 87 China market endpoints into a single SKILL.md

Full-stack China A-share data toolkit for AI agents — 12 layers, 60 endpoints, 22 sources, zero-auth.

11,793 stars2,140 forksPythonApache-2.0

At a glance

What is it?
a-stock-data is a self-contained Skill file, structured Markdown with embedded Python, that gives an AI coding assistant direct access to China A-share quotes, research, filings and macro series without API keys. The layering is deliberate, and so is the list of places where coverage stops.
Who is it for?
a-stock-data earns a place in a research workflow that already trusts scraped Chinese market endpoints, because the source order, the fallback list and the known gaps are written down instead of discovered. It does not suit anyone who needs a feed with an uptime commitment, a rate limit agreement, or uniform coverage across Shanghai, Shenzhen and Beijing exchanges, and it cannot answer questions about the US market it never covered.
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 November 13, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • simonlin1212/a-stock-data11,793 ★ · +2,002
Star history
Repository2026-09-122026-11-13
simonlin1212/a-stock-data9.8k11.8k

2,002 Stars in the last 62 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The whole interface is one Markdown file with Python inside it

There is no package to import and no server to run. The quick start is a directory, a download, and a dependency line:

bash
# 1. 创建 skill 目录
mkdir -p ~/.claude/skills/a-stock-data

# 2. 把 SKILL.md 放进去
curl -o ~/.claude/skills/a-stock-data/SKILL.md \
  https://raw.githubusercontent.com/simonlin1212/a-stock-data/main/SKILL.md

# 3. 安装依赖(V3.0 不再需要 akshare;V3.9 没有新增依赖)
pip install mootdx requests pandas stockstats numpy baostock xlrd openpyxl

The note under it explains the rest: a Skill file is structured Markdown with embedded Python, and any assistant that supports context injection can use it. For Codex and OpenClaw the instruction is to paste the contents of SKILL.md into a system prompt or project context file.

The consequence is architectural. The model reads the endpoint list as text and decides which function to run. The akshare removal noted in step 3 is also a real cost boundary: as of v3.0 that library is gone, and v3.9 added no new dependencies.

mootdx quote commands went dark in September and Layer 1 was renumbered

The most instructive entry point is the one marked as failing. The quote layer keeps an archived row for mootdx that once offered multi-period K lines, five-level order book, tick data and a 46-field realtime quote. Beside it is a warning: since 2026-09 the TDX public server returns empty, tracked as issue #52.

The v3.10.0 release note dated 2026-09-22 explains the repair. Available sources were moved to the front in the order Tencent, then Tencent K lines, then the TDX after-close package, then Tencent tick-by-tick, with mootdx pushed to the end for archival. Two functions were added to cover the loss: tencent_ticks() in section 1.4 for same-day tick trades, and futures_kline() in section 13.7 for Sina futures daily K lines across main continuous and specific contracts, which filled the gap left by the DCE.

Two practical consequences. First, Layer 1 was renumbered, and the release note points old numbering to CHANGELOG.md, so any prompt you wrote against a layer and function index from before September now points somewhere else. Second, mootdx survives for fundamentals and F10 data even though its quote path is dead, which means one dependency is doing two unrelated jobs.

The whole-market daily file is a dated zip with a floor under it

One endpoint carries its own reliability notes in the table, which is unusual and worth reading. The TDX after-close package returns Shanghai, Shenzhen and Beijing whole-market daily lines including turnover for a chosen trading day, in a single zip of roughly 2 to 3 MB. The same cell records that 2022-01-04 and 2023-01-03 were retrieved, that 2021-01-04 is no longer available, and that the check was not run day by day. It also notes that packages dated before 2022-05-06 contain no Beijing exchange rows.

So this endpoint is a calendar of survivable dates, not a continuous history. The 2 to 3 MB figure also means a multi-year daily pull is a multi-gigabyte download.

Zero auth means no key to rotate and no agreement to lean on

The headline claim is zero authentication, with one stated exception. Everything else is reached without a key.

What that buys is immediate start-up: the dependency line contains no credential step. What it costs is every guarantee a key would imply. The architecture note sets the source order explicitly, putting Tencent and official exchange endpoints first because they do not block IPs, keeping Eastmoney for data nothing else carries with rate limiting built in to avoid a ban, and noting that mootdx quote commands have failed since 2026-09 and are kept only for fundamentals and F10.

Read the order as the project's own history of getting blocked. The TDX failure is what forced the September reshuffle, and Eastmoney already needed a throttle. A tool that scrapes 34 sources without keys has no contract with any of them, so the honest expectation is breakage, handled by a backup list of five sources, and renumbering rather than a patch.

The 87 count is a counting convention with the arithmetic shown

The endpoint total is derived rather than measured, and the derivation is printed. The list has 88 rows, which turns into 87 by three adjustments. As a general convention, a function serving both CSI and CNI indices, or both Shanghai and Shenzhen, counts once. The Eastmoney industry report row and the Eastmoney reportapi row are one endpoint separated only by a qType parameter, so one is subtracted. The Tonghuashun northbound history row is a local self-cache rather than an independent endpoint, so another is subtracted. The Eastmoney intraday anomaly pool row contains two endpoints, a list and a count, so one is added back. 88 minus 1 minus 1 plus 1 is 87, split as 82 main entries and 5 backups, with the code conversion helper to_joinquant() excluded.

Two things follow. The number is not comparable with another project's endpoint count, since the convention is particular to this file. And the repository description is behind the README, still advertising 12 layers, 60 endpoints and 22 sources where the page itself now claims 15 layers, 87 endpoints and 34 sources. Trust the README and CHANGELOG, not the sidebar blurb.

Beijing exchange coverage appears in some layers and vanishes in others

The clearest way to see the seams is to follow one exchange across the layers. The Tencent K line endpoint covers Shanghai and Shenzhen daily, weekly, monthly and 1 to 60 minute bars and explicitly excludes Beijing. The Tencent tick endpoint carries the same exclusion. The after-close daily packages carry no Beijing rows before 2022-05-06.

Other layers do include it. Announcements come from Giant Tide for all three exchangesand the whole-market daily line is described as Shanghai, Shenzhen and Beijing.

The consequence is a screen that quietly loses names. A Beijing stock can have filings, a daily line and an ST flag while its intraday bars and tick data return nothing.

The sources contradict each other and the file says which one to believe

Where two sources cover the same ground, the notes pick a winner instead of pretending they agree. The Sina research report list, added as a second source in v3.9 after issue 53, returns title, type, institution, analyst and date but no rating and no target price, so the Eastmoney reportapi row is the listed source for ratings and three-year EPS forecasts.

Read as a whole, this is a set of partial views stitched by preference rather than a reconciled dataset. Nothing described merges them, so building one table from a primary endpoint and its backup will produce columns that exist in one and not the other. The five backups, covering the official dragon-tiger list, Sina fund flow, announcements, the two exchanges' own margin data and current Beijing quotes, exist for that reason.

Editorial conclusion

a-stock-data earns a place in a research workflow that already trusts scraped Chinese market endpoints, because the source order, the fallback list and the known gaps are written down instead of discovered. It does not suit anyone who needs a feed with an uptime commitment, a rate limit agreement, or uniform coverage across Shanghai, Shenzhen and Beijing exchanges, and it cannot answer questions about the US market it never covered. Before wiring it into anything, check four things: which layer number your existing prompts cite, since Layer 1 was renumbered in v3.10.0; whether your date range crosses 2021 or early 2022, where the after-close packages run out; whether the exchange you care about is Beijing, which several layers skip; and how you will handle the one authenticated source, iwencai, which is the single exception to the no-key claim. Read CHANGELOG.md before trusting any function name from an earlier version.

Frequently asked questions

How can I get stock data with a-stock-data?

Create the skill directory, download SKILL.md with the curl command from the quick start, then install the dependencies with pip install mootdx requests pandas stockstats numpy baostock xlrd openpyxl. An assistant with context injection then reads the endpoint list and runs the embedded Python directly.

What does a-stock-data actually cover?

Fifteen categories of China A-share and related market data: quotes and K lines, research reports, market signals, capital flow and chip distribution, news, fundamentals, announcements, limit-up boards, ETF options, investor interaction, macro and rates, indices and the trading calendar, futures and commodities, event driven data, and convertible bonds. Thirty-four sources feed those layers, with a list of five backups for when a primary source is blocked.

Does a-stock-data need an API key?

Almost. The README advertises zero authentication with iwencai named as the single exception, so iwencai is the source that needs credentials. Everything else, including the Cailianpress telegram feed, runs without a key.

Why did a-stock-data stop using mootdx for quotes?

Because the TDX public server began returning empty responses in 2026-09, tracked as issue #52. Version v3.10.0 dated 2026-09-22 reordered the quote layer to put Tencent, Tencent K lines, the TDX after-close package and Tencent tick data first, and moved mootdx to the end for archival, while keeping it for fundamentals and F10 data.

Official sources

  1. Issues
  2. License: Apache-2.0
  3. README
  4. Releases
  5. simonlin1212/a-stock-data on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/simonlin1212-a-stock-data.svg)](https://hysenlabs.com/projects/simonlin1212-a-stock-data)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/simonlin1212-a-stock-data.svg)](https://hysenlabs.com/projects/simonlin1212-a-stock-data)

Was this useful?