A-share data skill● Releasedv3.10.2 · 2026-10-11 · ★ 10,784

A-Stock Data

A full-stack A-share data skill. One SKILL.md file brings 34 data sources together as 15 layers and 87 endpoints, covering quotes and K-lines, research, fund flows, filings, limit-up pools, macro and rates, futures and convertibles. Load it into Claude Code or Codex and your agent fetches the data directly, without memorising each source's parameters, formats or authentication.

For Investors and developers who want their own agent to fetch raw A-share data and pass it on to their own research process or backtesting framework.

Requires Python 3.9+ and eight common Python packages. SKILL.md is structured Markdown with embedded Python, so the code can also be copied into your own scripts. Eastmoney endpoints are rate-limited by the source; the skill throttles them, and batch jobs should widen the interval. Full endpoint list and FAQ in the README ↗

Install

Three steps into Claude Code.

The skill loads when a question needs its data. For Codex, put the contents of SKILL.md into your system prompt or project context file; the embedded Python runs as is.

mkdir -p ~/.claude/skills/a-stock-datacurl -o ~/.claude/skills/a-stock-data/SKILL.md https://raw.githubusercontent.com/simonlin1212/a-stock-data/main/SKILL.mdpip install mootdx requests pandas stockstats numpy baostock xlrd openpyxl→ Open Claude Code and ask: fetch the live price and forward PE of 688017# Codex: put the contents of SKILL.md into your project context file

Then ask your agent

  • “Fetch the live price, consensus EPS, forward PE and PEG for 688017”
  • “How many stocks hit limit-up today, highest consecutive boards, break rate”
  • “Latest reports on the humanoid robot supply chain, especially ball screws and reducers”
  • “Where are the latest social financing and PMI figures”
  • “What are investors asking BYD recently and how did the company respond”
  • “Yesterday's settlement prices and open interest for SHFE rebar and copper contracts”

Coverage

Fifteen layers, 87 endpoints.

01

Quotes and K-lines

Live price, PE/PB, market cap and turnover; adjusted daily, weekly and monthly bars and 1 to 60-minute bars; full-market daily bars for a trading day; adjust factors; indices and ETFs. Sources: Tencent, TDX official site, Baidu, Sina.

02

Research

Stock and industry reports with PDFs, ratings, three-year EPS forecasts, consensus estimates and natural-language search. Sources: Eastmoney, Sina, THS, iwencai.

03

Market signals

Hot stocks and themes, northbound flow, sector membership, fund flow, dragon-tiger board, lockup expiries, industry ranking and sector fund flow. Sources: THS, Eastmoney.

04

Capital flow and chips

Margin trading, block trades, shareholder counts, dividends, 120-day fund flow, locally computed chip distribution and ETF shares. Sources: Eastmoney, SSE, SZSE.

05

News

Stock news, CLS flash, 7×24 live news and CCTV evening news transcripts. Sources: Eastmoney, CLS, Wallstreetcn, CCTV.

06

Fundamentals

Quarterly snapshots, F10, financial statements, valuation history, listing and delisting dates, SW industry history and the ST list. Sources: TDX, Sina, baostock, SW, Eastmoney.

07

Filings

Full filings across the Shanghai, Shenzhen and Beijing exchanges. Source: cninfo.

08

Limit-up

Limit-up, break, limit-down and previous-day pools, limit-up reasons, the exchange watch list and intraday anomalies. Sources: Eastmoney, THS.

09

ETF options

T-quotes, Greeks and implied volatility. Source: Sina.

10

Investor Q&A and sentiment

cninfo IRM (Shenzhen), SSE e-Interaction (Shanghai), the THS hot list, Eastmoney popularity rank and concept hits.

11

Macro and rates

Social financing, PMI, government and credit yield curves, repo fixing rates, LPR and a global macro calendar. Sources include PBoC, NBS, ChinaBond and CFETS.

12

Indices and calendar

CSI and CNI constituents and weights, CSI PE and dividend yield, and the official SZSE trading calendar.

13

Futures and commodities

Official daily data from five futures exchanges, commodity and index options, member position rankings, real-time futures, futures daily bars, FTSE China A50 and SGE gold spot.

14

Event-driven

Earnings previews, institutional surveys, shareholder buying and selling, buybacks, share pledges and the IPO calendar. Source: Eastmoney.

15

Convertible bonds

Terms, conversion price, conversion value, premium and listing or delisting status. Source: Eastmoney.

Sources

Stable sources first, with backups when a primary fails.

Tencent and official sources first
Live prices, valuations and K-lines come from Tencent first, then exchanges, futures exchanges, ChinaBond, PBoC, NBS and other official sources, without high-frequency requests.
Eastmoney only for unique data
Dragon-tiger board, lockups, margin, event-driven data and convertibles come from Eastmoney only because they are not available elsewhere, all through the built-in throttle. If blocked, pause 30 to 60 minutes or switch networks.
Backups when a primary fails
Five backup sources cover the dragon-tiger board, fund flow, filings, SSE/SZSE margin data and Beijing exchange quotes. Not every capability has a backup, so check dates and completeness after fetching.
One source needs a key
Of the 34 sources, only iwencai natural-language research search needs an API key. The rest need no registration or credentials.

Source priority is ordered by the risk of IP blocking; the full list is in the README's source priority table.

Current release

What exists today

  1. 01v3.10.2 was released on 11 October 2026, fixing the years returned by one valuation function when earnings do not grow; the 15 layers, 87 entries and 34 sources are unchanged
  2. 02Fifteen layers, 87 endpoints (82 primary entries plus five backups) and 34 data sources
  3. 03179 offline tests extract the released code from SKILL.md and check dates, fields, units, paging and error propagation; live network tests must be switched on explicitly
  4. 04After TDX public servers stopped answering K-line, order book and tick commands in September 2026, K-lines moved to Tencent and TDX end-of-day packages and ticks moved to Tencent
  5. 05Open source under Apache 2.0 as one self-contained file you can copy and use

Known limits

Gaps in this version

  • Fetches data only and has no backtesting engine; pass the data to your own framework for backtests
  • The DCE website blocks scripted access, so its official daily data is not connected; use Sina futures daily bars for DCE contracts
  • Tencent K-lines and ticks exclude the Beijing exchange, whose daily bars come from TDX end-of-day packages; valuation history and share pledges do not cover it
  • Index constituents are current snapshots and cannot stand in for historical point-in-time membership
  • Some residential broadband connections in mainland China fail intermittently on Eastmoney endpoints and need a retry or another network

Boundary

What it will not do

  • Ships code, not data: it fetches from each source directly, never through our servers
  • Each data source's own terms apply to your use
  • No stock picks, no price predictions and no trade timing
  • A data access tool only, not investment advice
Back to products