Quick start
No SDK, no approval process. One curl call gets you real data.
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"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"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.
| Code | Meaning | What to do |
|---|---|---|
| 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
One config block lets Claude Code / Codex and other agents query A-share data
ViewChecked against each platform docs — just paste the URL
ViewInternational + China crawlers, official IP ranges / rDNS checks, common blocking mistakes
ViewEndpoint mapping, four-step rewrite, field mapping (including what cannot move)
ViewParameters plus curl / Python / JS samples for all 32 endpoints, on one page.