Error codes
Most problems you can solve yourself. If not, send us the endpoint + code + time.
401Invalid API key- Key typed wrong (mind the case — format is ct-xxxxxxxx)
- Key disabled (resale detection / manual stop)
- Called a paid endpoint without a key
- Key used incorrectly: with a URL parameter, missing ?key= / &key=; with a header, missing the Bearer prefix
Check the key. Free endpoints (quote / kline / hot / market-overview / changedist / health) need no key
403This key already used N different IPs today (over the limit)- One key shared by several people (resale)
- Normal use after a network change (travel / hotspot / dynamic IP / proxy)
- Same-LAN egress IP changed (rare)
If normal use tripped it, contact us to reset. If you are sharing, please buy separately
429Rate limit exceeded (calls per minute or rows per day)- Too much concurrency in a short window (no delay inside a loop)
- Anonymous calls: over 5/min, or the daily row budget is used up
- An older Python SDK (< 0.2.1): on 429 it retried once as three calls, hitting the limit again
Anonymous (no key): 5/min · max 250 rows per call · max 100k rows per day (per IP) — poll at ≥12s intervals; solving one PoW challenge (https://ashareapi.com/v1/challenge) raises it to 15/min (daily rows unchanged). If the message says the daily budget is exhausted, PoW will not help — it resets next day, or use an API key. With a key: Trial 30 · Standard 120 · Pro 300 · Unlimited 600 /min. Python SDK users: run pip install -U ashareapi (0.2.1 fixes the retry amplification).
200 + ok:falseUpstream fetch failed (empty data)- Upstream source temporarily unavailable
- A stock code that does not exist
- Upstream interface changed
Sources switch automatically. These calls are not counted. If it keeps failing, send us endpoint + code + time
422Parameter format error / too many symbols in an anonymous request- code without a market prefix (sh600667, not 600667)
- Wrong date format (should be YYYY-MM-DD)
- A required parameter is missing
- More than 5 symbols in one anonymous call (/v1/kline · /v1/quote) — the response carries max_codes and requested_codes
Check the parameter table in the endpoint reference. For anonymous batch calls, get an API key (https://ashareapi.com/pricing) — there is no symbol limit with a key
Parameter conventions
| code carries a market prefix | sh600667 (SH) · sz000001 (SZ) · hk00700 (HK) · usAAPL (US) · sh113052 (SH bond) · sz123138 (SZ bond) |
| Date format | YYYY-MM-DD (e.g. 2026-09-16); leave blank for the latest trading day |
| Booleans | true / false (lowercase) |
| Response envelope | Always { ok, endpoint, tier, elapsed_ms, source, data } |