← all repositories
simonlin1212/a-stock-data

One skill file that teaches AI assistants to read Chinese stocks

Because your coding assistant shouldn't need a securities API cheat sheet to analyze A-shares.

a-stock-data
Velocity · 7d
+107
★ / day
Trend
accelerating
star history

What it does This is a single self-contained Markdown “skill” file that wraps 13 scattered China A-share data sources into 27 endpoints an AI coding assistant can invoke directly. It covers the full stack—real-time quotes, K-lines, research reports, capital flow, margin trading, block trades, shareholder counts, news, and regulatory announcements—so you can ask Claude or Codex natural-language questions like “estimate PE for 688017” without the model hallucinating or getting lost in authentication headers.

The interesting bit The project deliberately killed off akshare in v3.0, arguing that wrapper libraries are just moving failure points; instead it hits the underlying HTTP and TCP APIs directly. It also ranks every data source by IP-ban risk, prioritizing mootdx and Tencent (never ban) while quarantining East Money behind a built-in em_get() rate limiter with serial delays and jitter. It’s essentially defensive driving for scraping Chinese financial data.

Key highlights

  • 27 endpoints across 7 layers: quotes, research, signals, capital flow, news, fundamentals, and announcements
  • Zero third-party data dependencies since v3.0; direct HTTP/TCP connections to 13 sources including Tongdaxin, Tencent, East Money, Tonghuashun, and Sina
  • Built-in IP-ban risk management: prefers non-banning sources, serializes East Money calls with ≥1s jitter via em_get()
  • 4 canned research workflows: single-stock valuation, batch comparison, theme report search, and full due diligence
  • Only iwencai needs an API key; everything else is free to use

Caveats

  • mootdx requires a domestic Chinese IP; overseas servers will time out unless proxied
  • East Money still carries medium IP-ban risk despite rate limiting, and the docs spell out exact thresholds (5/sec, 10 concurrent, etc.)
  • Some upstream quirks leak through: Baidu Stock API returns unstable ResultCode types, and Tonghuashun hot-spot “reason” tags are empty before the 15:30 market close

Verdict Grab it if you want your AI coding agent to stop making up Chinese financial data. Skip it if you don’t trade A-shares or already pay for a professional data terminal.

Frequently asked

What is simonlin1212/a-stock-data?
Because your coding assistant shouldn't need a securities API cheat sheet to analyze A-shares.
Is a-stock-data open source?
Yes — simonlin1212/a-stock-data is open source, released under the Apache-2.0 license.
How popular is a-stock-data?
simonlin1212/a-stock-data has 7.6k stars on GitHub and is currently accelerating.
Where can I find a-stock-data?
simonlin1212/a-stock-data is on GitHub at https://github.com/simonlin1212/a-stock-data.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.