Data in 3 steps

Quick start

No SDK, no approval process. One curl call gets you real data.

1Get a key

Free endpoints work without a key. For everything else, get a key (see pricing).

# Free endpoints, no key needed
curl "https://api.ashareapi.com/v1/quote?code=sh600667"
2Call with your key

The Authorization header is recommended (keeps the key out of logs); a ?key= URL parameter also works and is handy for a quick browser test.

# Option A (recommended — use this in scripts / production): request header
curl -H "Authorization: Bearer ct-your-key" \
  "https://api.ashareapi.com/v1/fund?code=sh600667"

# Option B (quick test only): URL parameter — paste it straight into a browser
curl "https://api.ashareapi.com/v1/fund?code=sh600667&key=ct-your-key"
3Read the response

One JSON envelope: ok / endpoint / tier / elapsed_ms / source / data

{
  "ok": true,
  "endpoint": "fund",
  "tier": "pro",
  "elapsed_ms": 862,
  "source": "multi",
  "data": { "main_net": "...", "lhb": [...], ... }
}

Error codes

Check this table first — most problems you can solve yourself.

401
Invalid API key
Key mistyped or disabled → check it; or you called a paid endpoint without a key
403
This key already used N different IPs today
Anti-resale limit hit → if a network change caused it, contact us to reset
429
Rate limit exceeded (per minute)
Slow down or add a delay; Standard allows 120/min
200 + ok:false
Upstream fetch failed
We already switched sources and do not count these calls; if it persists, tell us (endpoint + time)

Integration guides

Connect your AI Agent (MCP)

One config block lets Claude Code / Codex and other agents query A-share data

View
Agent Skill (45+ clients)

One folder installs into Claude Code / Cursor / Codex and more

View
China platforms (Bailian / Coze / Yuanqi)

Checked against each platform docs — just paste the URL

View
AI crawler list & verification

International + China crawlers, official IP ranges / rDNS checks, common blocking mistakes

View
Migrating from Tushare

Endpoint mapping, four-step rewrite, field mapping (including what cannot move)

View
Tutorials & guides

Runnable Python (and more) with trade-offs and boundaries

View
Daily A-share report

Pre-market / midday / post-close summaries, Markdown version included

View
Call from Python

Sample code lives in the endpoint reference

View
Data source status

What is available right now — public

View
Want the full endpoint list?

Parameters plus curl / Python / JS samples for all 32 endpoints, on one page.

Endpoint reference