Endpoint reference
Groups: Free 10 · Pro 92. Parameters and curl / Python / JS samples.
/openapi.json · live · 2026-11-12
Free10
Model list: deepseek-flash / gpt-5.6-luna / claude-*, plus ashare/scanner@deepseek-flash (Stock Screener / scanner Agent, Pro ¥99+). Free, no key needed; chat still requires apiKey = ct-...:sk-... (BYOK). The response carries both OpenAI (object / owned_by) and Anthropic (type / display_name / created_at) fields, so either SDK can read it.
# 免费端点:无需 API Key(匿名即可调用)
curl "https://api.ashareapi.com/v1/models"import requests
r = requests.get(
"https://api.ashareapi.com/v1/models",
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/models");
console.log(await r.json());Checks service status and whether both data CLIs are ready.
# 免费端点:无需 API Key(匿名即可调用)
curl "https://api.ashareapi.com/v1/health"import requests
r = requests.get(
"https://api.ashareapi.com/v1/health",
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/health");
console.log(await r.json());Returns a proof-of-work challenge (the same challenge is also returned directly when an anonymous request is rate-limited, HTTP 429). Solve the nonce and send X-PoW: <challenge>.<nonce> to raise the anonymous limit from 5 to 15 requests per minute. ⚠️ This raises the per-minute request count only — not the daily item cap (anonymous users can fetch at most 100,000 items per day). Paid key users do not need this.
difficultyinteger# 免费端点:无需 API Key(匿名即可调用)
curl "https://api.ashareapi.com/v1/challenge?difficulty=0"import requests
r = requests.get(
"https://api.ashareapi.com/v1/challenge",
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/challenge?difficulty=0");
console.log(await r.json());Real-time quote for A-shares, HK and US (lightweight, 8 fields): last price, open/high/low, volume, amount, turnover rate. ⚠️ Data is rolled during the trading session (refreshed about every minute); read the current price from data[0]. ⚠️ Free / anonymous tiers refresh on a 5-minute cycle (to protect service stability); paid tiers are real-time (every call returns the latest value). ⚠️ data is an ARRAY (30 daily bars by default, data[0] is the latest). ⚠️ The turnover rate field is named turnover (in %) — the same name and value as /v1/snapshot (e.g. sz000001 = 0.54 in both). ⚠️ Renamed 2026-09-26: it used to be exchange, a name that reads like "exchange" the venue. ⚠️ Does NOT include valuation / market cap — use /v1/snapshot for those (35 fields, pro tier, A-shares only). ⚠️ volume is in LOTS (1 lot = 100 shares) — 100× smaller than /v1/kline-full and /v1/market-kline, which report shares; amount is in CNY. ⚠️⚠️ Degradation flags (present ONLY when data is stale or the source is rate-limiting; absent on normal responses): stale:true + stale_age_s (how many seconds old the data is) · degraded:true + reason + retry_after_s (how long to wait). Check these two flags to decide whether the quote is usable — do NOT rely on ok alone (ok:true can come with stale:true, meaning it is the last good value, not the current one). ⚠️ code accepts a comma-separated list (multiple symbols) — but anonymous calls are capped at 5 symbols per request (no cap with an API key).
codestringYes# 免费端点:无需 API Key(匿名即可调用)
curl "https://api.ashareapi.com/v1/quote?code=sh600667"import requests
r = requests.get(
"https://api.ashareapi.com/v1/quote",
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/quote?code=sh600667");
console.log(await r.json());Historical K-line data (daily / weekly / monthly / quarterly / yearly, plus minute bars m1–m120). ⚠️ Any date span on daily bars: start/end can cover 3 years, 5 years or the full history since listing — one call returns the complete series, no need to split by year and stitch. ⚠️ The turnover rate field is named turnover (in %) — same as /v1/quote and /v1/snapshot (renamed from exchange on 2026-09-26). ⚠️ The price basis is fixed at forward-adjusted (no gap on ex-dividend days; no adjust parameter) — do not re-adjust (double adjustment). ⚠️ Minute bars require the Standard tier (¥29.9) and above; daily / weekly / monthly / quarterly / yearly are free. ⚠️ Free / anonymous tiers refresh on a 5-minute cycle; paid tiers are real-time (every call returns the latest value). ⚠️ volume is in LOTS (1 lot = 100 shares) — 100× smaller than /v1/kline-full and /v1/market-kline, which report shares; amount is in CNY. ⚠️ code accepts a comma-separated list (multiple symbols) — but anonymous calls are capped at 5 symbols per request (no cap with an API key).
codestringYesperiodstringcountstringstartstringendstring# 免费端点:无需 API Key(匿名即可调用)
curl "https://api.ashareapi.com/v1/kline?code=sh600667&period=day"import requests
r = requests.get(
"https://api.ashareapi.com/v1/kline",
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/kline?code=sh600667&period=day");
console.log(await r.json());Search the product docs: field units, conventions, common misuse and cross-market differences. Progressive loading to save context: no params returns the CATALOG (slug + title + one-liner); q=keyword returns matching docs as SUMMARIES (with a snippet, NOT the full text); slug=xxx returns that one doc in full. It never dumps every doc at once — go catalog first, then fetch the single doc you need. lang: zh (default) or en. Free tier (no key required), but calls still count toward usage and rate limits.
qstringslugstringlangstring# 注:q 的值已做 URL 编码(浏览器 / curl 会自动还原,照抄即可)
# 免费端点:无需 API Key(匿名即可调用)
curl "https://api.ashareapi.com/v1/wiki?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A"import requests
r = requests.get(
"https://api.ashareapi.com/v1/wiki",
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/wiki?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A");
console.log(await r.json());/v1/hotHeat board (trending stocks / whole-market / articles / sectors / ETFs)Open this endpoint →Attention ranking (who is being watched — NOT who is up). ⚠️ The five type values have completely different field shapes, so do not read them with one schema: stock trending stocks (default) → code/name/zdf/zxj; wx whole-market heat → same plus a pv heat value; news trending articles → news_id/news_title/source (⛔ no code); sector hot sectors → symbol/rankdelta (⛔ no code); etf trending ETFs → title/tag. ⚠️ A current snapshot — no history or trend is available, so do not use it to compute "heat change".
limitintegertypestring# 免费端点:无需 API Key(匿名即可调用)
curl "https://api.ashareapi.com/v1/hot?limit=10"import requests
r = requests.get(
"https://api.ashareapi.com/v1/hot",
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/hot?limit=10");
console.log(await r.json());Market-level picture. type = summary / trade / interval / technical / margin / valuation / rotation. ⚠️ type=updown (up/down distribution) is T-1: the response carries its own data date and can lag one trading day — for the current session use /v1/changedist (the two will not match).
typestring# 免费端点:无需 API Key(匿名即可调用)
curl "https://api.ashareapi.com/v1/market-overview?type=institution"import requests
r = requests.get(
"https://api.ashareapi.com/v1/market-overview",
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/market-overview?type=institution");
console.log(await r.json());Advancers, decliners, limit-ups and limit-downs plus turnover — market breadth and sentiment (current session). This is the recommended entry point for breadth; do not use /v1/market-overview?type=updown for the same figures (that one is T-1 and will not match). ⚠️⚠️ Response shape (the most common gotcha): data is pre-rendered Markdown text (for humans). For programmatic access use the top-level structured array (one entry per metric: advancers / advancers share / decliners / flat / suspended / limit-up / limit-down …). When there are multiple groups, use the top-level tables (array of arrays). ⛔ structured sits at the response top level, NOT inside data — reading data.structured returns nothing, which does not mean there is no data.
# 免费端点:无需 API Key(匿名即可调用)
curl "https://api.ashareapi.com/v1/changedist"import requests
r = requests.get(
"https://api.ashareapi.com/v1/changedist",
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/changedist");
console.log(await r.json());A-share trading calendar: for each date, whether the market is open, and whether it is the LAST trading day of the week / month / quarter / year (useful for settlement, expiry and rebalancing dates). NOT the same as /v1/calendar, which lists per-stock corporate events. Three query modes (pick one): no params = current month; date=YYYY-MM-DD = a single day; start+end = a range, or year=2026 = a whole year. Set trading_only=true to get market-open days only (~242 rows a year). limit is filled in automatically for year/range queries, so results are never silently truncated; use offset to page. data is a formatted table; read structured for programmatic access. Columns: date / is_trading_day / is_week_last / is_quarter_last / is_year_last / is_month_last. Free tier (no key required), but calls still count toward usage and rate limits.
datestringstartstringendstringyearstringtrading_onlybooleanlimitintegeroffsetinteger# 免费端点:无需 API Key(匿名即可调用)
curl "https://api.ashareapi.com/v1/trade-calendar?date=2026-09-16"import requests
r = requests.get(
"https://api.ashareapi.com/v1/trade-calendar",
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/trade-calendar?date=2026-09-16");
console.log(await r.json());Pro92
/v1/agent-searchNatural-language search with evidence chain (for your own orchestration)Open this endpoint →⭐ Natural language → structured candidates with an evidence chain, for you to orchestrate yourself. We do not generate an answer — you get "structured results + evidence metadata". How it differs from other endpoints: you do not need to know which endpoint to call first — just ask in plain language; we resolve the symbol and intent, then fetch. Every row carries an evidence object: endpoint / params / field_path / value / value_hash (16 chars) / hash_alg. Re-fetch with the same endpoint + params, recompute sha256 over the same record, and you should get the same value_hash — you do not have to trust us. ⚠️ Paid tier — Standard (¥29.9) and above. ⭐ scope (optional): ashare (our own data) · notice,news,report (filings / news / research) · web (open-web search, requires X-LLM-Key) · wechat (WeChat Official Accounts). ⚠️ With an explicit scope=web/wechat, only that channel is searched — if nothing is found you get an honest ok:false with the reason, never a silent substitute from another channel. ⭐ Web/WeChat rows also carry rerank_score (0–3, ≥1.5 is good) + quality (good/fair), plus sentence-level start_char/end_char. ⭐ replay=true runs one extra model pass to reconcile the output, marking match / non_deterministic / not_replayable / skipped_no_client — off by default; ⚠️ on the model path it is usually non_deterministic, which does not mean the conclusion is unreliable.
qstringYesscopestringdepthstringmax_resultsintegerclarifybooleanclaimstringreplaybooleanauthority_minnumberrecencystring# 注:q 的值已做 URL 编码(浏览器 / curl 会自动还原,照抄即可)
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/agent-search?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A&depth=fast"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/agent-search?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A&depth=fast&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/agent-search",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"q": "太极实业"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/agent-search?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A&depth=fast", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());/v1/agent-askNatural-language Q&A with inline citations (BYOK — bring your own model key)Open this endpoint →⭐ Ready-to-use Q&A: we fetch the data and generate an answer with inline citations — no orchestration on your side. How it differs from /v1/agent-search: that one returns "structured candidates + evidence" only and generates no answer; this one builds an answer on top of it. 🔑 BYOK (bring your own model key), passed in request headers: X-LLM-Provider (deepseek / openai / moonshot) · X-LLM-Key (your model key) · X-LLM-Model (optional, pin a model). ⚠️ How we handle your key: used only in memory for this single request — never stored, never logged. ⚠️ Paid tier — Standard (¥29.9) and above.
qstringYesscopestringmax_resultsintegerrecencystring# 注:q 的值已做 URL 编码(浏览器 / curl 会自动还原,照抄即可)
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/agent-ask?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A&max_results=10"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/agent-ask?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A&max_results=10&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/agent-ask",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"q": "太极实业"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/agent-ask?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A&max_results=10", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());⭐ Anthropic Messages-compatible endpoint: send Claude-style messages requests; we resolve the data intent and generate an answer with inline citations. 🔑 BYOK: pass your model key as x-api-key: ct-...:sk-..., or Authorization: Bearer ct-... plus x-api-key: sk-.... deepseek-* / claude-* with sk-... routes to DeepSeek; claude-* with sk-ant-... routes to Anthropic. max_tokens is required; SSE is supported (streaming: upstream tokens are forwarded as generated; stream=false returns the full message). ⚠️ Paid tier — Pro (¥99) and above.
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/messages"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/messages?key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/messages",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/messages", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Watchlist isolated per API key; CRUD is not billed as data calls.
actionstringcodestringcodesstringcode, not bothliststringnamestringnotestringtagsstring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/watchlist?action=list"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/watchlist?action=list&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/watchlist",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/watchlist?action=list", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Latest quotes for every stock in a watchlist in one call; billed as 1 data call.
liststring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/watchlist/quotes"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/watchlist/quotes?key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/watchlist/quotes",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/watchlist/quotes", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());/v1/scanner/snapshotsScanner snapshots for the current key (read-only; no scanner quota charge)Open this endpoint →返回当前 Key 的最近选股快照;只读,不扣 scanner 次数。
limitinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/scanner/snapshots?limit=10"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/scanner/snapshots?limit=10&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/scanner/snapshots",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/scanner/snapshots?limit=10", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());/v1/scannerStock Screener (scanner Agent): natural-language conditions - + citations + tool trace (BYOK)Open this endpoint →把自然语言条件交给选股员(scanner Agent),返回候选池、引用与工具轨迹。
qstringYes# 注:q 的值已做 URL 编码(浏览器 / curl 会自动还原,照抄即可)
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/scanner?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/scanner?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/scanner",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"q": "太极实业"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/scanner?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());/v1/analystAnalyst Agent: review a scanner snapshot (T+1/T+5/T+20 returns, benchmark, excess, hit rate; read-only)Open this endpoint →输入 snapshot_id,读取该快照的 picks 与 T+1/T+5/T+20 评估,输出收益/基准/超额/命中率、赢家输家、数据缺口和复盘报告。
snapshot_idstringYesfocusstringhorizonstring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/analyst?snapshot_id=&focus=overall"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/analyst?snapshot_id=&focus=overall&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/analyst",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"snapshot_id": ""},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/analyst?snapshot_id=&focus=overall", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());⭐ OpenAI Chat Completions-compatible: point base_url at https://api.ashareapi.com/v1 and set apiKey to ct-...:sk-... (our key, then your model key). model accepts ashare/deepseek-flash / gpt-5.6-luna and similar; stream=true returns SSE. ⭐ Stock Screener (scanner Agent): model=ashare/scanner@deepseek-flash (Pro ¥99+) chooses read-only tools itself and returns x_citations + x_tool_trace. ⚠️ tools is ignored in v1; for Anthropic use /v1/messages. Paid tier — Pro (¥99) and above.
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/chat/completions"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/chat/completions?key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/chat/completions",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/chat/completions", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());⭐ OpenAI Responses-compatible: input accepts a string or message array; instructions is discarded so the data rules cannot be overridden. apiKey = ct-...:sk-...; stream=true returns the 9 standard Responses SSE events (streaming: upstream tokens are forwarded as generated; stream=false returns the full JSON). ⭐ Stock Screener (scanner Agent): model=ashare/scanner@deepseek-flash (Pro ¥99+) returns x_tool_trace. ⚠️ Server-side previous_response_id is not implemented in v1 — put context in input. Paid tier — Pro (¥99) and above.
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/responses"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/responses?key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/responses",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/responses", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());⭐ Deep research: submit a task, get a task_id, then poll for the result. Flow: POST to submit → receive task_id → poll GET /v1/agent-research/{task_id}. ⭐ Polling does not consume quota (status checks only verify identity — no double billing). Depth tiers (depth): fast — 30–90s, budget 5 calls · standard (default) — 2–5min, budget 12 calls · deep — 5–15min, budget 25 calls. ⚠️ Budget = cap on tool calls (data fetches); the actual value is echoed in the response. 🔑 BYOK — same request-header convention as /v1/agent-ask. ⚠️ Paid tier — Standard (¥29.9) and above.
qstringYesdepthstring# 注:q 的值已做 URL 编码(浏览器 / curl 会自动还原,照抄即可)
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/agent-research?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A&depth=standard"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/agent-research?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A&depth=standard&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/agent-research",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"q": "太极实业"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/agent-research?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A&depth=standard", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Live snapshot of one global futures contract (24 columns): last price, bid/ask, open/high/low, settlement and previous close, volume and turnover, open interest plus daily change, expiry date, 52-week high/low, VWAP and a delayed flag. Use /v1/kline for the historical series — that endpoint has no bid/ask, no settlement and no expiry. ⚠️ Spot codes hf_* (London gold/silver/platinum, Brent, six LME metals) return 16 columns with volume always 0 and have no historical bars; for gold history use the futures contract fuGC instead (the two differ by basis). ⚠️ Domestic Chinese commodity futures, index futures (IF/IC/IM/IH) and Treasury futures (T/TF/TS) are not covered. ⚠️ fu6* are CME currency futures (contract prices with basis and expiry), not spot rates — use /v1/forex for rates. ⚠️ isDelayed comes straight from the data source. Paid endpoint — Institutional tier (¥199).
codestringYes# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/futures?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/futures?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/futures",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/futures?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Live quotes for 10 major FX spot pairs: USDCNY, offshore CNY, EURUSD, GBPUSD, USDJPY, USDHKD, EURCNY, HKDCNY, CNYJPY and the dollar index. 14 columns: code name price change askPrice bidPrice changePct high low marketStatus open prevClose symbol updateTime. ⚠️ The last-price field is price (not lastPrice, unlike /v1/futures). ⚠️ No volume and no open interest — FX spot has no such concept. ⚠️ marketStatus is a concatenated string from the source, not an enum. ⚠️ updateTime is a plain number (YYYYMMDDHHMMSS). ⚠️ fu6E is a CME euro futures contract, not a rate. ⚠️ AUD/CHF/CAD/NZD spot rates and all crosses are not covered. Paid endpoint — Institutional tier (¥199).
codestringYes# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/forex?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/forex?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/forex",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/forex?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Full-history daily bars for A-share stocks — the whole history in one call (about 2,400 bars, where /v1/kline is capped at 1,212). Built for long-horizon backtests, factor research and precise adjustment. Scope: A-share stocks only (sh / sz / bj, 5,572 in total); ETFs, convertible bonds, indices, sectors, Hong Kong, US, futures and FX are not supported — use /v1/kline for those. fq picks the adjustment basis: qfq forward-adjusted (default, for charting) · hfq back-adjusted (for backtests — history does not change with future dividends) · nofq raw unadjusted (compute the adjustment yourself). Data starts 2016-08-08. Seven fixed columns: time open high low close volume amount (no turnover). ⚠️ volume is in SHARES (not lots) — 100× the figure from /v1/kline and /v1/kline-batch, which report lots; it matches /v1/market-kline. amount is in CNY. Paid tier — Standard (¥29.9) and above.
codestringYesfqstringstartstringendstring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/kline-full?code=sh600667&fq=qfq"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/kline-full?code=sh600667&fq=qfq&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/kline-full",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/kline-full?code=sh600667&fq=qfq", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());/v1/market-klineWhole-market single-day K-line (all A-shares, 5,000+ in one call)Open this endpoint →Every A-share stock's daily bar for one trading day in a single call (5,000+ symbols) — built for whole-market incremental updates, replacing a 5,000-request loop with one request. Typical use: call it once after the close to ingest the day's whole-market bars. Scope: A-share stocks only (5,572) from 2016-08-08, raw unadjusted prices; ETFs, convertible bonds, indices, sectors, Hong Kong, US, futures and FX are not included. Latest data is available up to the previous trading day (intraday same-day data is not available). ⚠️ Two hard limits: available on the Pro (¥99) and Institutional (¥199) tiers only, and 1 call counts as 500 calls of quota (one request moves 5,000+ symbols, far beyond a single-symbol endpoint). A separate daily cap applies (Pro 200 / Institutional 1,000 per day). Eight columns: code time open high low close volume amount. ⚠️ volume is in SHARES (not lots) — 100× the figure from /v1/kline and /v1/kline-batch, which report lots; it matches /v1/kline-full. amount is in CNY. Response is roughly 785 KB per call. ⭐ Passing codes also returns requested / returned / missing — missing lists each symbol that was not returned with reason (not_covered = outside this endpoint's scope, e.g. ETF / index / HK / US; no_data = no bar for that session). When limit truncates the result it is flagged partial:true and only not_covered is reported — a symbol absent from this page does not mean it has no data.
datestringYeslimitintegeroffsetintegercodesstring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/market-kline?date=2026-09-16&limit=10"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/market-kline?date=2026-09-16&limit=10&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/market-kline",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"date": "2026-09-16"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/market-kline?date=2026-09-16&limit=10", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Run a built-in strategy over history and get return / risk metrics (optionally the equity curve). Two modes: mode=single (default) backtests one stock in real time — pass code + strategy; mode=portfolio looks up a precomputed multi-stock result — pass strategy; results are preset per range (four standard ranges from 2019; an unsupported start/end returns the list of available ranges). Portfolio mode also accepts weighting: equal (default) or inv_vol (inverse-volatility, Institutional tier — steadier names get more, wilder names get less). Costs are included: commission (0.03%, min ¥5), stamp duty (0.05%, sell side), transfer fee (Shanghai) and slippage (0.1%). Constraints are included: price limits (no fill when sealed) and suspensions (no fill without a quote). ⚠️ ST status uses the current list as an approximation (no public source for day-by-day history) — ST names are about 3.6% of the market and the effect is limited to price-limit days. ⚠️ NOT included: market impact and capacity. ⚠️ Past performance does not indicate future results; research use only, not investment advice. Paid tier — Standard (¥29.9) and above, 30 calls/day (Pro ¥99: 300/day · Institutional ¥199: 1,000/day).
modestringstrategystringcodestringstartstringendstringinitial_cashnumberweightingstringinclude_equityboolean# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/backtest?mode=single"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/backtest?mode=single&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/backtest",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/backtest?mode=single", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());/v1/strategiesQuant strategy list (20 single-stock + 9 portfolio, with measured performance)Open this endpoint →List every built-in strategy (20 single-stock timing + 9 portfolio selection) with each strategy name and its parameter whitelist (type / min / max / default). ⭐ Each strategy also carries a measured performance block — its real result across 800 stocks (CSI 300 + CSI 500) since 2019, with real trading costs (commission / stamp duty / slippage). verdict grades it: effective / neutral / weak / avoid (measured loss); the note field explains the pitfall. ⚠️ Losing strategies are listed too — so you can avoid the common traps (e.g. high-turnover strategies eaten by costs). ⚠️ This is a static list + summary and does not consume the /v1/backtest heavy quota. ⚠️ Historical results do not indicate future performance; research use only. Paid tier — Standard (¥29.9) and above.
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/strategies"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/strategies?key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/strategies",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/strategies", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Lock an API key to a fixed set of IPs, so a leaked key cannot be used from anywhere else. GET returns the current list · POST replaces it (ips=1.2.3.4,5.6.7.8, up to 50) · DELETE clears it (the key is then usable from any IP again). When the list is non-empty, requests from other IPs get 403. Authenticate with the same key you are locking. ⚠️ Calls from your own current IP always pass, so you cannot lock yourself out; use DELETE to recover. Paid tier — Institutional (¥199) and above.
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/ip-whitelist"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/ip-whitelist?key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/ip-whitelist",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/ip-whitelist", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Run many stocks × many strategies in one call and get a side-by-side comparison table. Pass codes (comma-separated, up to 20) and strategies (comma-separated, up to 10; max 60 combinations). Each stock's history is loaded once and shared across every strategy, so a 15-combination batch returns in about a second — far faster than calling /v1/backtest 15 times. Returns a row per (stock, strategy) with total return / CAGR / Sharpe / max drawdown / volatility / trade count, plus a skipped list for codes without enough history. Same cost model, price-limit and suspension constraints as /v1/backtest. Paid tier — Pro (¥99) and above, 20 batches/day (Institutional ¥199: 100/day).
codesstringYesstrategiesstringstartstringendstringinitial_cashnumber# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/backtest-batch?codes=&strategies=buy_hold"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/backtest-batch?codes=&strategies=buy_hold&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/backtest-batch",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"codes": ""},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/backtest-batch?codes=&strategies=buy_hold", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());List every available stock-selection factor (code / Chinese name / unit / description / category), plus 22 presets and the usage rules. Feed factors to /v1/screen as an expression, e.g. intersect([PE_TTM > 0, PE_TTM < 20, ROETTM > 15]). Multiple conditions are combined with intersect([...]) (AND); the only operators are > < >= <= = != — between, in and OR are not supported. ⭐ Historical cross-sections are supported: /v1/screen?date=YYYY-MM-DD returns factor values for any past trading day (data exists from 2016-08-08), so you can chain factor → screen → backtest. ⚠️ Eight usage rules apply — most importantly PE_TTM > 0 must come first (loss-making companies have negative PE and would otherwise be picked as "low PE"). ⚠️ This is a static list (no heavy quota). Paid tier — Standard (¥29.9) and above.
categorystringkindstring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/factors?kind=daily"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/factors?kind=daily&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/factors",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/factors?kind=daily", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());A library of playbooks — reusable "how to judge the market" workflows. Each one spells out its signals (formula + data + threshold), its stages (e.g. sentiment: freeze / start / ferment / climax / ebb, with the action for each), what losses it avoids, and the measured evidence behind it (backtest numbers; entries marked "pending" have not been run — we do not invent figures). Covers 25 playbooks across 12 themes: risk control · trend/momentum · fundamentals · valuation percentile · portfolio rebalancing · money flow · market timing · sector rotation · sentiment cycle · volume structure · event-driven · limit-up chasing · ST restructuring. ⚠️ Playbooks are a judgement process, not investment advice — thresholds are adjustable starting points. Past backtests do not indicate future results. ⚠️ Static list (no heavy quota). Paid tier — Standard (¥29.9) and above.
categorystringidstring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/playbooks"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/playbooks?key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/playbooks",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/playbooks", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Intraday trend: one price plus cumulative volume per minute. days=1 for today (default), days=5 for the last 5 trading days (there is no 2/3/4 — the full 5 days are returned). ⚠️ Different from the minute bars of /v1/kline: this endpoint returns the intraday trend line, while kline?period=m5 returns minute OHLC candles. Paid tier — Standard (¥29.9) and above. ⚠️ Paid tiers are real-time (every call returns the latest value).
codestringYesdaysinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/minute?code=sh600667&days=15"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/minute?code=sh600667&days=15&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/minute",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/minute?code=sh600667&days=15", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Financial news for one symbol. Without id it returns the list (title + source + time); with id it returns the full body of that article. ⭐ The body is clean Markdown (HTML tags, image placeholders and dead internal links stripped; stock-code links kept as 茅台(sh600519); timestamps YYYY-MM-DD HH:MM:SS) — ready to feed straight to an LLM. ⚠️ The list covers the latest items only (no paging or history is available); for historical announcements use /v1/notice. ⚠️ The url in a list row points at a dynamic page that cannot be fetched directly — use this endpoint's id parameter for the body.
codestringidstringlimitintegertypestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/news?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/news?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/news",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/news?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Company filings. Without id it returns the list (code required; supports type / limit / offset, reaching about 16 years back (Moutai: 929 filings to 2010 in our tests)); with id it returns that one announcement. ⚠️ The detail has two shapes (about 9 in 10 give text): most short filings → text holds the body, url empty; a few long reports (e.g. a 100+ page interim/annual report) → text empty, url is a PDF link. ⇒ Check text first; fall back to url when empty. ⚠️ Fetch and parse that PDF yourself (with your own PDF tooling) — we provide the link and do not parse it for you. 💡 For financial figures (revenue / profit / assets / cash flow) use /v1/finance instead — it is structured and far faster and safer than scraping a 100+ page PDF.
codestringidstringtypestringlimitintegeroffsetinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/notice?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/notice?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/notice",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/notice?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Three statements: income, balance sheet, cash flow (multi-period, the latest N periods). ⚠️ data is a LIST OF TABLES: data[0]=income · data[1]=balance sheet · data[2]=cash flow; each table is [{EndDate: …, field: …}] in DESCENDING period order (latest first).
codestringYesnuminteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/finance?code=sh600667&num=4"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/finance?code=sh600667&num=4&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/finance",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/finance?code=sh600667&num=4", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());/v1/finance-batchBatch financial statements (income / balance / cash flow, many stocks in one call)Open this endpoint →⭐ Fetch the three financial statements for many stocks in one call (income statement / balance sheet / cash flow), with per-symbol status.
codesstringYesperiodsintegertypestringfieldsstring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/finance-batch?codes=&periods=4"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/finance-batch?codes=&periods=4&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/finance-batch",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"codes": ""},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/finance-batch?codes=&periods=4", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());/v1/technical-batchBatch technical indicators (MA / EMA / MACD / KDJ / RSI / BOLL / BIAS / WR / DMI / OBV and more - 55 fields, many stocks in one call)Open this endpoint →⭐ Fetch technical indicators for many stocks in one call (MA / EMA / MACD / KDJ / RSI / BOLL / BIAS / WR / DMI / OBV / VR / BBI / TRIX / DPO / PSY / ENE / CCI - 55 fields), with per-symbol status.
codesstringYesdatestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/technical-batch?codes=&date=2026-09-16"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/technical-batch?codes=&date=2026-09-16&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/technical-batch",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"codes": ""},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/technical-batch?codes=&date=2026-09-16", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Everything trading-side in one call: main money flow (+ market rank), top-trader boards, block trades, margin trading.
codestringYes# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/fund?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/fund?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/fund",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/fund?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());⭐ Fetch money flow for many stocks in one call (main capital + top-trader boards + block trades + margin), one record per stock. Built for quant / batch research — scan a whole industry or your watchlist at once instead of calling /v1/fund stock by stock.
codesstringYes# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/fund-batch?codes="
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/fund-batch?codes=&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/fund-batch",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"codes": ""},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/fund-batch?codes=", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());⭐ Fetch quotes for many stocks in one call, with per-symbol status. Looping 300 symbols means 300 requests (≈3.5 minutes, plus rate-limit backoff); this endpoint returns them in about 4 seconds (measured 300 symbols / 4.16s).
codesstringYesperiodstringcountintegerstartstringendstring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/quote-batch?codes=&period=day"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/quote-batch?codes=&period=day&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/quote-batch",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"codes": ""},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/quote-batch?codes=&period=day", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());⭐ Fetch K-lines for many stocks in one call (many symbols × one date range), with per-symbol status.
codesstringYesperiodstringcountintegerstartstringendstringfqstring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/kline-batch?codes=&period=day"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/kline-batch?codes=&period=day&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/kline-batch",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"codes": ""},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/kline-batch?codes=&period=day", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());/v1/snapshot-batchBatch full profiles (valuation / market cap / shares, many stocks in one call)Open this endpoint →⭐ Fetch full profiles for many stocks in one call (35+ fields: price / five-level order book / PE·PB / market cap / share capital / limit-up and limit-down prices / volume ratio / amplitude / speed / outer and inner volume), with per-symbol status.
codesstringYes# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/snapshot-batch?codes="
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/snapshot-batch?codes=&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/snapshot-batch",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"codes": ""},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/snapshot-batch?codes=", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());/v1/profile-batchBatch company profiles (listing date / main business / industry, many stocks in one call)Open this endpoint →⭐ Fetch company profiles for many stocks in one call (listing date / main business / industry / website / registered capital / chairman / contact details), with per-symbol status.
codesstringYes# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/profile-batch?codes="
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/profile-batch?codes=&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/profile-batch",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"codes": ""},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/profile-batch?codes=", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());/v1/chip-batchBatch chip distribution (profit ratio / average cost / concentration, many stocks in one call)Open this endpoint →⭐ Fetch chip distribution for many stocks in one call (profit ratio / average cost / 90% and 70% concentration), with per-symbol status.
codesstringYesdatestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/chip-batch?codes=&date=2026-09-16"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/chip-batch?codes=&date=2026-09-16&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/chip-batch",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"codes": ""},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/chip-batch?codes=&date=2026-09-16", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());MA / EMA / MACD / KDJ / RSI / BOLL / BIAS / WR / DMI / OBV and more - 55 fields in total. date (YYYY-MM-DD) looks back at a past session; daily bars only. ⭐ For many symbols use /v1/technical-batch (up to 500 per call, 1.2s measured).
codestringYesdatestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/technical?code=sh600667&date=2026-09-16"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/technical?code=sh600667&date=2026-09-16&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/technical",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/technical?code=sh600667&date=2026-09-16", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Shareholder research (sectioned response). ⚠️ data is a SECTIONED structure: data.tables is an ordered list of sections, each with title / slug / rows; plus data.data{slug: rows} as a convenience index. A-shares: top10_holders / top10_float_holders / holder_count (holder counts include totalSHNum / avgHoldShares). HK: shareholders / holder_distribution / institutional_holdings — semantically different from A-shares, do not index by position.
codestringYes# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/shareholder?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/shareholder?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/shareholder",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/shareholder?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());/v1/shareholder-batchBatch shareholder research (top-10 holders / float holders / holder count, many stocks in one call)Open this endpoint →⭐ Fetch shareholder research for many stocks in one call (top-10 holders / top-10 float holders / holder count), with per-symbol status.
codesstringYes# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/shareholder-batch?codes="
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/shareholder-batch?codes=&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/shareholder-batch",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"codes": ""},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/shareholder-batch?codes=", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Chip distribution and holding-cost analysis.
codestringYesdatestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/chip?code=sh600667&date=2026-09-16"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/chip?code=sh600667&date=2026-09-16&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/chip",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/chip?code=sh600667&date=2026-09-16", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Second-level snapshot of the five best bids and asks — price and resting volume (in lots) for b1–b5 and a1–a5, plus last price, change and data time. Field naming follows the Tushare convention and is flat (df["b1_p"] works directly): b1_p/b1_v … b5_p/b5_v = bid price/volume, a1_p/a1_v … a5_p/a5_v = ask price/volume. Use it to read seal strength, buy/sell pressure and intraday support/resistance. ⚠️ Only meaningful during the session (after the close it is the day's final snapshot); data refreshes about every 10 seconds. ⚠️ Volume is in lots (×100 = shares); all bid levels read 0 at limit-down and all ask levels read 0 at limit-up (normal).
codestringYes# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/orderbook?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/orderbook?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/orderbook",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/orderbook?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());/v1/snapshotFull quote snapshot (valuation / market cap / shares / limit prices)Open this endpoint →The full picture of one stock: price + order book (five best bids/asks + imbalance) + valuation (PE TTM / dynamic / static, PB) + market cap (float / total) + shares (float / total) + intraday trading stats (limit-up / limit-down price, volume ratio, amplitude, speed) + flags (security type, status, currency) + active/passive volume. ⚠️ How it differs from /v1/quote: quote is light (8 fields), runs on the official channel and is free; this endpoint is full (35 fields) and is on the Pro tier. If you only need the last price, quote is lighter (fewer fields, faster). ⚠️ A-shares only (HK/US field layouts differ — use /v1/quote); other markets return empty rather than wrong data. ⚠️ Cost = calls: one call returns all 35 fields — cheaper than calling quote/valuation/orderbook separately when you need valuation + market cap + shares + limit price together. ⚠️ Units: volume in lots · amount in 10k CNY · market cap in 100M CNY · shares in shares · ratios/changes in percent. (Field reference: https://ashareapi.com/docs/)
codestringYes# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/snapshot?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/snapshot?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/snapshot",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/snapshot?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Short-term regulatory abnormal moves / deviation — stocks triggering a *severe move*, a *10-day 100% deviation*, or on the abnormal-move watchlist. mode: deviation hot list (today, default) · deviation_hist (history, needs date) · deviation_plan (both today and tomorrow, split by group) · abnormal frequency + reason (needs date) · watch watchlist (today) · watch_hist (history) · alert severe-move alerts (today). ⚠️ History modes need a real trading day. Paid tier — Standard (¥29.9) and above.
modestringdatestringlimitinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/abnormal?mode=deviation"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/abnormal?mode=deviation&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/abnormal",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/abnormal?mode=deviation", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());/v1/reviewShort-term review (limit-up structure: sector mainlines / consecutive-board ladder)Open this endpoint →Short-term review of the limit-up structure — where today's money went and how the ladder looks. mode=board (default) sector mainlines (theme + limit_count limit-ups + amount sector turnover + stocks constituents); mode=ladder consecutive-board ladder, grouped by board height, with board_name / market_cap / tips (e.g. "7天4板") / max_streak / limit_days / is_repack reverse flag. ⚠️ Empty date = realtime; YYYY-MM-DD = that trading day (must be a real trading day, otherwise empty). ⚠️ For limit-up reason / seal amount / money flow use /v1/limit-up. data is always a row array (DataFrame-ready); the count is the top-level count. Paid tier — Standard (¥29.9) and above.
modestringdatestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/review?mode=board"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/review?mode=board&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/review",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/review?mode=board", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());/v1/limit-upLimit-up pool (full pool, or auction-sealed only; reason / seal amount / main capital)Open this endpoint →Short-term trading — the full limit-up pool for the session: every limit-up stock in one call, with reason limit-up reason / seal_amount & seal_amount_max seal amounts / main_net / main_buy·main_sell main capital / amount / concepts / float_cap / turnover / streak board count / pct. Two mode values. auction — only stocks that sealed the limit at the 09:25 call-auction fix (one-word boards / aggressive auction bidding). A stock that merely touched the limit during the auction but was knocked off before the fix does not count — it re-seals after the open and reports a later limit_time (e.g. 09:30). This is the table short-term traders check before the open. limit (default) — the full limit-up pool. ⚠️ Empty date = realtime; YYYY-MM-DD = that trading day (must be a real trading day, otherwise empty). ⚠️ For the ladder structure / sector mainlines use /v1/review. data is always a row array (DataFrame-ready); the count is the top-level count. Paid tier — Standard (¥29.9) and above.
modestringdatestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/limit-up?mode=limit"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/limit-up?mode=limit&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/limit-up",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/limit-up?mode=limit", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());/v1/auctionCall auction (intraday series / historical ticks / auction volume + "touched limit-up / limit-down" flags)Open this endpoint →The 09:15–09:25 call auction for a single stock, including a "touched limit-up during auction" flag. mode=stock (default) intraday auction series, minute ticks covering 09:15–09:24 — each row has time / price / stage a source-side marker flag (meaning not publicly defined — do not rely on it; to split the cancellable / non-cancellable windows use time: 09:15–09:20 cancellable · 09:20–09:25 non-cancellable) / volume cumulative volume; mode=stock-history second-level historical ticks (requires date); mode=volume intraday auction volume / net amount (single point). ⭐ is_limit_up / is_limit_down at the top level = the "touched limit-up / touched limit-down" flags (auction high ≥ limit-up price · auction low ≤ limit-down price; both limit prices are taken from raw source fields, so main board 10% / ChiNext·STAR 20% / ST 5% / Beijing Exchange 30% are correct by construction). Also returns up_px limit-up price / down_px limit-down price / open_px the 09:25 match price / preclose_px previous close / hprice auction high / lprice auction low. ⚠️ mode=stock covers today only; for history use mode=stock-history with a date (must be a real trading day). ⚠️ For mode=stock the number of points varies by symbol and by market (same window, different symbols, different counts — driven by the source's tick cadence); to align granularity across symbols, keep the last point of each minute (≤10 points per symbol for 09:15–09:24). data is always a row array (DataFrame-ready). Paid tier — Pro (¥99) and above (the Standard tier is not included).
modestringcodestringYesdatestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/auction?code=sh600667&mode=stock"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/auction?code=sh600667&mode=stock&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/auction",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/auction?code=sh600667&mode=stock", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());42 event tags per stock: block trades, top-trader boards, buybacks, placements, dividends, earnings, lockups.
codestringYes# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/events?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/events?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/events",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/events?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());单股大单资金分时:每 1 分钟一个点,net = 该分钟大单净额(元),正数=大单净买入、负数=净卖出。
codestringYes# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/bigorder?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/bigorder?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/bigorder",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/bigorder?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());逐笔大单成交:单只票当日每一笔成交额 ≥ 阈值的大单,并按主动 / 被动 × 买 / 卖四方向标注。
codestringYesmoneyintegerlimitintegeroffsetinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/bigorder-flow?code=sh600667&money=0"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/bigorder-flow?code=sh600667&money=0&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/bigorder-flow",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/bigorder-flow?code=sh600667&money=0", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());/v1/bigorder-flow-fullL2 big-order fills, full session (whole trading day in one call, no 200-row cap)Open this endpoint →Whole-day big-order fills in one call — the same rows as /v1/bigorder-flow, but paged internally so you get every trade above the amount threshold instead of just the latest 200. Rows (amounts in CNY): time / direction (1 passive sell · 2 active buy · 3 passive buy · 4 active sell) / direction_cn / volume (lots) / amount / avg_price. Top-level meta: total (all trades that day) / returned (after de-duplication) / raw_returned / deduped / pages / complete (whole day retrieved) / summary (four-way amount totals, summary_scope="all_rows" — whole-day totals once complete=true). ⭐ Use it when you must add up money: total main-capital net inflow, active-buy vs active-sell amounts, exporting the full session for your own analysis — the 200-row cap of /v1/bigorder-flow will give a wrong total. ⭐ Versus /v1/bigorder-flow: flow = fast, latest segment, direction reading; this = slower, whole day, exact amounts. ⚠️ Slower by design (one page ≈ 0.8 s): a 300k-CNY threshold on an active stock (≈5,000 fills / 26 pages) takes 20–30 s; 1M threshold ≈ 10 s; 3M threshold ≈ 2 s — raise money when you only need a conclusion. ⚠️ Large response (~600 KB for 5,000 rows; gzip ≈ 50 KB) — use max_rows to trim if needed. ⚠️ Today only; non-trading days return the latest session (check time in the rows). ⚠️ This is the trade (filled) side, not pending orders, not a ten-level order book. Paid tier — Institutional only.
codestringYesmoneyintegermax_rowsinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/bigorder-flow-full?code=sh600667&money=0"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/bigorder-flow-full?code=sh600667&money=0&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/bigorder-flow-full",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/bigorder-flow-full?code=sh600667&money=0", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());/v1/bigorder-queueL2 big-order order flow (pending orders + cancellations, limit-up tag)Open this endpoint →Big-order pending orders: every order whose order volume or order amount exceeds the threshold, listed one by one, with limit-up and cancelled flags. data rows: time / order_id / price / volume (lots) / amount (CNY) / side (1 buy · 2 sell) / side_cn / is_limit_up (1 = placed at the limit-up price) / is_cancel (1 = cancelled). Top-level meta: vol_threshold (lots) / tur_threshold (10k CNY) / total / returned / truncated; it also gives cancel_count / cancel_ratio (0–1) / cancel_volume (lots) / cancel_amount (CNY) for the returned rows only (cancel_stats_scope="returned_rows"), not the full day. ⭐ What it answers: is that limit-up seal real or staged — a big buy order that is posted then pulled (is_cancel=1) is a textbook fake seal. Pair it with /v1/bigorder-flow (what actually traded) to separate "posted but never filled" from "actually bought". ⚠️ Today only; about 200 rows per call max. ⚠️ This is the order (pending) side, not trades, and not a ten-level order book. Paid tier — Institutional only.
codestringYesvolintegerturintegerlimitinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/bigorder-queue?code=sh600667&vol=500"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/bigorder-queue?code=sh600667&vol=500&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/bigorder-queue",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/bigorder-queue?code=sh600667&vol=500", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());/v1/bigorder-historyL2 historical big-order net flow (per trading day, up to 100 days back)Open this endpoint →Per-day big-order net flow, up to 100 trading days back. data rows: date / net (that day's big-order net amount in CNY; positive = net buying, negative = net selling), newest first. Top-level fields (siblings of data): code / days / upstream_days / unit. ⭐ Use case: /v1/bigorder only covers today; this one looks back — is the big money accumulating steadily or just today's spike, and on which day did it turn. ⚠️ The source always returns 100 trading days; limit only truncates locally (saves bandwidth, not a call). ⚠️ net is the big-order metric (aggregated by trade amount) — not main-capital net flow, not the exchange dragon-tiger list, not tick data. ⚠️ Non-trading days return the 100 days ending at the last session — trust data[0].date. Paid tier — Institutional only.
codestringYeslimitinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/bigorder-history?code=sh600667&limit=10"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/bigorder-history?code=sh600667&limit=10&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/bigorder-history",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/bigorder-history?code=sh600667&limit=10", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());/v1/bigorder-splitL2 main-capital four-way split (minute-level: active/passive × buy/sell, plus buy/sell average price)Open this endpoint →Minute-level four-way main-capital split: main buying is split into active buy + passive buy, main selling into active sell + passive sell, one row per minute. Rows (amounts in CNY): time / trades / net / main_buy / main_sell (negative) / active_buy / passive_buy / active_sell / passive_sell. Top-level fields (siblings of data): day / points / mode (realtime | history) / summary (whole-day totals) / buy_avg_price / sell_avg_price (volume-weighted average price of main buying / selling). ⭐ How to read it: high active_buy = someone is sweeping the offer; high passive_buy = your bids are being hit; concentrated active_sell = active distribution; heavy passive_sell = offers being lifted. Only the four-way split tells you who is hitting whom. ⭐ Versus /v1/bigorder-flow: flow is the tick-by-tick trade list (which specific trade; today only, ≤200 per call); this endpoint is the minute aggregation (rhythm + average price, history supported, no row cap). ⚠️ Pass date for a past session; omit for today. ⚠️ This is a capital-flow metric (split by trade direction) — not an order queue, not a ten-level order book. Paid tier — Institutional only.
codestringYesdatestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/bigorder-split?code=sh600667&date=2026-09-16"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/bigorder-split?code=sh600667&date=2026-09-16&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/bigorder-split",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/bigorder-split?code=sh600667&date=2026-09-16", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());/v1/bigorder-rankL2 whole-market main-capital ranking (5,500+ stocks, 8 sort modes, historical lookup)Open this endpoint →Whole-market main-capital leaderboard (~5,500 stocks in one call), 8 sort modes, pagination and historical lookup. sort: net_in (default) / net_out / buy / sell / gain / loss / turnover / mcap. Rows (amounts in CNY): code / name / price / change_pct / main_buy / main_sell (negative) / main_net / turnover_rate / amount / market_cap / concept. Top-level fields (siblings of data): total / returned / sort / date / offset / truncated / unit. ⭐ Self-check identity: main_buy + main_sell == main_net (holds for 100% of all ~5,500 rows). ⭐ Drill-down path: pick a stock here → /v1/bigorder (minute net flow) / /v1/bigorder-split (four-way split). ⚠️ limit up to 6000 (whole market in one call, ~1 MB); use offset to page. ⚠️ market_cap is the raw source market-cap field — for sorting / coarse screening only; do not mix it with market-cap fields from other endpoints. ⚠️ This is a capital-flow metric (aggregated by trade amount and direction) — not the exchange dragon-tiger list, not seat data, not ticks. Paid tier — Institutional only.
sortstringlimitintegeroffsetintegerdatestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/bigorder-rank?sort=net_in"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/bigorder-rank?sort=net_in&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/bigorder-rank",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/bigorder-rank?sort=net_in", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Dragon-tiger list broker seats: the buy/sell seat breakdown (up to 10 broker branches) for one stock on one appearance, with a hot-money tag. data rows: name (branch) / total_buy (CNY) / total_sell (CNY) / net (buy − sell) / is_youzi (hot-money seat) / log_id. Top-level meta: code / name / date (appearance date) / qjzf (interval change %) / rows. ⭐ Who is buying — far more concrete than aggregate institutional stats: you see whether it is the Shanghai/Shenzhen Connect dedicated seat, a named brokerage branch, or a hot-money seat. ⚠️ The dragon-tiger list is post-close data: leave date empty for the most recent appearance, and trust the returned date. ⚠️ Up to ~10 seats per call (source limit). Paid tier — Institutional only.
codestringYesdatestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/lhb-seats?code=sh600667&date=2026-09-16"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/lhb-seats?code=sh600667&date=2026-09-16&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/lhb-seats",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/lhb-seats?code=sh600667&date=2026-09-16", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());/v1/lhb-agencyInstitutional participation board (whole market: which stocks institutions traded on the dragon-tiger list)Open this endpoint →Institutional participation board (whole market): every stock that institutional seats traded on the dragon-tiger list on a given session, in one call (~51 stocks per session). data rows (amounts in CNY): code / name / net_buy (institutional net buying — ⚠️ negative means institutions were net sellers) / join_num (seats involved) / change_pct (%) / turnover (CNY) / amplitude (%) / turnover_rate (%) / float_cap (CNY) / market_cap (CNY) / fengkou_plates (theme plate codes; plate names are not provided). Top-level meta (siblings of data): date (the actual session) / total / returned / sort / unit. ⭐ How to use it: sort=net_buy shows who institutions really bought today (negatives are sells); pair with /v1/lhb-seats to drill from a stock down to which broker branch bought it. ⭐ Versus /v1/lhb: that one is the split board (stocks listed by change / turnover criteria); this one keeps only the institution-involved names and gives the institutional amount directly — no manual cross-checking. ⚠️ The dragon-tiger list is post-close data: leave date empty for the latest session and trust the returned date. ⚠️ net_buy is a net figure (buy − sell) and can be negative (26 of the 51 rows were negative on the measured session) — ⛔ do not take the absolute value as buying volume. Paid tier — Institutional only.
datestringsortstringlimitinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/lhb-agency?date=2026-09-16"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/lhb-agency?date=2026-09-16&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/lhb-agency",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/lhb-agency?date=2026-09-16", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());How cold or hot the short-term tape is today: break rate plus a 9-trading-day series of money-making stats. Top-level date / break_count (limit-ups that broke) / break_rate (%). data rows (newest first): date / success_rate (%) / profit_rate (%) - can be negative. How to read it: success_rate sliding for several days = the tape is cooling; profit_rate turning positive = money-making is back. break_rate = broken / (broken + limit-ups) x 100; on 2026-10-23 that is 12 / (12 + 82) = 12.766%, verified digit for digit. Moves intraday (5-minute cache). Paid tier - Institutional only.
datestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/market-mood?date=2026-09-16"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/market-mood?date=2026-09-16&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/market-mood",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/market-mood?date=2026-09-16", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());The answer to "why did this stock limit up": for each past limit-up, the full reason text plus the sector it belongs to and its "dragon rank of the day". data rows (newest first): date / type / dragon_rank (e.g. 日内龙一 = #1 of the day, empty = not a leader) / plates (sector codes) / reason (full text) / concept. ⭐ Versus /v1/limit-up: that endpoint lists today's whole market limit-ups with a one-line reason; this one gives one stock's history, so you can see which theme it limit-ups on every time. ⚠️ code must be an A-share (6 digits, optionally prefixed). Paid tier — Institutional only.
codestringYesdatestringlimitinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/limit-reason?code=sh600667&date=2026-09-16"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/limit-reason?code=sh600667&date=2026-09-16&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/limit-reason",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/limit-reason?code=sh600667&date=2026-09-16", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Which stocks had their limit-up smashed open on a given day. data rows: code / name / change_pct (%) / main_net (CNY) / amount (CNY) / turnover_rate (%) / concepts (e.g. fintech, financial concepts) / raw. Complements /v1/limit-up: that one shows the sealed boards, this one shows the broken ones - compare the two to judge the seal quality of that day. Empty date = the latest weekday (weekends fall back to Friday); pass an explicit date around public holidays. Paid tier - Institutional only.
datestringlimitinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/broken-board?date=2026-09-16"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/broken-board?date=2026-09-16&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/broken-board",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/broken-board?date=2026-09-16", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Where late-session money is grabbing: about 292 stocks market-wide with grab amount, theme and change. data rows: code / name / fund_tag (e.g. fund, empty = none) / theme / change_pct (%) / chase_amount (CNY) / masked / raw. A few symbols are withheld and carry masked=true while the amount stays complete; do not treat those rows as tradable symbols. Results are re-sorted by sort (default chase_amount descending), so the first row is the largest grab of the day. Paid tier - Institutional only.
limitintegersortstring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/tail-chase?limit=10"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/tail-chase?limit=10&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/tail-chase",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/tail-chase?limit=10", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Foreign (northbound) holdings by A-share sector, published quarterly; 20 sectors measured. data rows: plate_code / plate_name / raw (includes holding value columns). Top-level: date (the actual reporting period) / total_net (CNY, can be negative) / total_hold (CNY) / available_dates (7 quarter-ends). How to use it: total_net shows whether foreign money is net in or out; go sector by sector to see which line is being added. You must pass a quarter-end date (e.g. 2026-09-30); empty picks the latest quarter-end automatically, and a non-quarter-end date returns empty (not a fault). This is sector level, not per-stock holdings. Not the same as /v1/fund-south (Stock Connect southbound into HK) - this one is A-share northbound. Paid tier - Institutional only.
datestringlimitinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/northbound?date=2026-09-16"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/northbound?date=2026-09-16&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/northbound",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/northbound?date=2026-09-16", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Which themes are printing 100-day new highs today, aggregated by theme. data rows: theme / plate_code / raw (includes the counts); top-level date. Themes where new highs cluster are where the money is working; compare with /v1/sector (change leaderboard). Paid tier - Institutional only.
datestringlimitinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/new-high?date=2026-09-16"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/new-high?date=2026-09-16&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/new-high",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/new-high?date=2026-09-16", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Whole-market financial news flash (Cailianshe and similar sources), newest first, cache refreshed once per minute. Use it for "what big news today / latest financial headlines / what just happened". data rows: id / time (YYYY-MM-DD HH:MM:SS) / title / content (body, HTML already stripped) / source (e.g. Cailianshe) / url (may be empty). Top-level meta: returned / index (current offset) / next_index (for paging; omitted when empty). ⭐ Versus /v1/news: /v1/news is per-stock news (requires code); this one is the whole-market wire (no code needed) — use it for the market, macro and breaking events, and use news for one ticker. ⚠️ Paging: index starts at 0, step = the limit you passed (e.g. limit=20&index=20 is page 2); it only pages backwards (older), there is no date parameter. ⚠️ limit caps at 200. ⚠️ 1-minute cache: repeated calls within the same minute return the same batch and are not billed twice.
limitintegerindexinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/flash?limit=10"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/flash?limit=10&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/flash",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/flash?limit=10", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());/v1/evidenceMulti-source evidence (filings + news + research, deduped, with hashes)Open this endpoint →One query, several sources: searches CNINFO filings (both exchanges, official first-hand) and Eastmoney news at the same time, normalises both into one table and removes republication duplicates.
qstringYesscopestringlimitinteger# 注:q / scope 的值已做 URL 编码(浏览器 / curl 会自动还原,照抄即可)
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/evidence?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A&scope=notice%2Cnews"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/evidence?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A&scope=notice%2Cnews&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/evidence",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"q": "太极实业"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/evidence?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A&scope=notice%2Cnews", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Top-trader boards by type (6 kinds): all / institution / active seats / high-win-rate buys / high-win-rate seats / hot money.
typestringdatestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/lhb?type=institution"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/lhb?type=institution&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/lhb",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/lhb?type=institution", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Screen the market — five modes selected by mode (default condition). condition: a factor expression, e.g. intersect([PE_TTM > 0, PE_TTM < 20, ROETTM > 15]), or one of 22 presets. label: by attribute tag — central SOEs / SOEs / private / QFII, ST / delisting / broken IPO, below-book, loss-making, cash-flow structure, listing age, market-cap band … (108 tags); asset=etf switches to ETF theme pools. ranking: whole-market ranking by metric — composite / capital / fundamentals / risk / technical scores, margin balance and its daily-weekly-monthly-quarterly-yearly change, main and retail fund flows, northbound activity, limit-up streak … (type picks the metric, default CompScore). strategy: technical and style strategies — MACD golden cross, KDJ golden cross, break above the 250-day line, first limit-up, consecutive limit-ups, high dividend, high-ROE value, master strategies (Buffett / Graham / Fisher …) — 98 strategies. event: event-driven — dividend plan/resolution/implementation/ex-date, earnings pre-announcement/express/release, private placement before and after listing, management changes and insider trading, block trades, lockup releases … (42 events). ⭐ Not sure which values exist? Set list=true to get the full list with Chinese names and groups; you may pass type as a group filter when listing. Do not guess the type value. ⚠️ If the source rejects your type value, the response is ok:false + reason:"invalid_param" + hint (carrying the source's own message and the ?mode=xxx&list=true pointer) — retrying will not help, just use a valid value. data is a formatted table; read structured for the first table — some queries return several sections, so use tables for all of them. ⭐ Risk flags (ST / delisting period): results carry an extra trailing column 风险标记 (- / ST / 退市整理), and every structured / tables row also carries isST (boolean) / isDelisting (boolean) / status (normal / ST / delisting). Useful because factor sorts such as low PE / low PB put delisting-period and ST names at the top (measured: preset=low_pe returns 萃华退 first) — the column lets you exclude them yourself. ⛔ We never filter implicitly — flags are provided, the decision is yours, otherwise your backtests cannot be reproduced. ⚠️ Suspensions are not flagged: the source has no suspension dimension, and "change = 0" cannot be used to infer it (normal stocks hit 0 too), so we flag nothing rather than flag wrongly. Fetch size: mode=condition has no 200 cap on limit — one call with limit=9999 returned the whole market (5,000+ rows, ~1.6 MB, 1-2 s), still billed as a single request. ⚠️ condition does not support offset paging — fetch everything in one call instead of looping. Other modes (label/ranking/strategy/event) are capped at 200 per page and page via offset.
modestringfiltersstringsortstring- for ascending: sort=roe_ttm / sort=-roe_ttmboardstringmetricstringpresetstringpoolstringstrategystringeventstringlimitintegeroffsetintegerdatestringstartstringendstringassetstringliststringslimbooleantables when it is a verbatim duplicate of structured (single-table output, ~42% smaller); multi-table output (calendar / macro) is unaffected# 注:filters 的值已做 URL 编码(浏览器 / curl 会自动还原,照抄即可)
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/screen?filters=pe_ttm%3A0..20%2Croe_ttm%3A%3E%3D15"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/screen?filters=pe_ttm%3A0..20%2Croe_ttm%3A%3E%3D15&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/screen",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/screen?filters=pe_ttm%3A0..20%2Croe_ttm%3A%3E%3D15", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Industry / concept / region sector moves, with the leading stock.
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/sector"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/sector?key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/sector",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/sector", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());A-share industry-chain data (183 themes). mode=list = theme list · mode=graph&topic=超级电容 = industry-chain graph (related stocks + their node + position upstream / midstream / downstream) · mode=stock&code=sh600667 = the chains a stock belongs to (theme / node / position / relevance / business description). Use it when asked "what is the industry chain / upstream and downstream / where does this company sit / which companies are in this theme".
modestringtopicstringcodestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/industry-chain?mode=graph"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/industry-chain?mode=graph&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/industry-chain",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/industry-chain?mode=graph", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Shenwan sector PE/PB/PS/PCF + dividend yield + historical percentile. code like pt01801780.
codestringYes# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/sector-valuation?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/sector-valuation?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/sector-valuation",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/sector-valuation?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Full constituent list of an index (CSI 300 / SSE 50 / CSI 500 / CSI 1000 / STAR 50 / ChiNext / HSI). Measured: sh000300 → 300 rows with code / name / IndexName. Use it to approximate what an ETF actually holds (ETFs replicate their tracked index), for index rebalancing research, or as the universe for index enhancement. ⚠️ No weights — use /v1/etf?kind=持仓 for weighted top 20, and /v1/etf?kind=详情 for top20Ratio. ⚠️ Not the ETF creation/redemption basket (PCG) — the PCG is published by the fund company and includes weights and cash-substitution flags. ⚠️ Only index codes are accepted (sh000xxx / sz399xxx / hk*); single stocks or ETFs return 422. Static reference data, cached 1 hour. Paid tier — Standard (¥29.9) and above.
codestringYes# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/index-constituent?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/index-constituent?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/index-constituent",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/index-constituent?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Global macro: GDP / CPI / PMI / LPR / treasury yields / fiscal. ⚠️ limit controls how many periods come back (default 12, max 120) — LPR / CPI / PPI are published monthly, so pass limit=60 for multi-year trends (LPR yields 58 rows, measured; the available history differs per indicator and we do not pad it). The source has no date-range filter, so you cannot ask for a specific 2020–2022 window.
regionstringnamesstringlimitinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/macro?region=cn"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/macro?region=cn&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/macro",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/macro?region=cn", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Daily trading halts: which tickers are suspended or resuming, with the reason. Markets: CN (default) / HK / US via market. ⚠️ Factor/strategy screening does not exclude halted stocks — cross-check candidates against this list. Paid tier — Standard (¥29.9) and above.
marketstring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/suspension?market=hs"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/suspension?market=hs&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/suspension",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/suspension?market=hs", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Share buyback records. ⚠️ Response shape differs by market: A-shares return an event summary (code/name/market); HK returns per-day detail (date/BuybackMoney/BuybackPrice/BuybackShares/BuybackCumMoney/closePrice). Paid tier — Standard (¥29.9) and above.
codestringYesstartstringendstring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/buyback?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/buyback?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/buyback",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/buyback?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Sell-side consensus: analyst target price plus forward estimates (EPS / revenue / net profit / forward PE·PB·PS / coverage count). codes accepts a comma list (≤15 — data above 15 is dropped). ⚠️ Fields differ by market: A-shares have targetPrice; HK has no target price, only *Forecast columns. Paid tier — Standard (¥29.9) and above.
codesstringYes# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/consensus?codes="
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/consensus?codes=&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/consensus",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"codes": ""},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/consensus?codes=", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Sell-side ratings (HK / US only): target price (avg / max / min) + rating distribution (buy / increase / hold / decrease / sell + coverage count) + monthly trend. ⚠️ A-shares return 422 — there is no sell-side rating coverage for A-shares; use /v1/consensus for A-share target prices. Paid tier — Standard (¥29.9) and above.
codesstringYes# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/rating?codes="
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/rating?codes=&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/rating",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"codes": ""},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/rating?codes=", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Scheduled earnings disclosure dates: disclosureDate + reportEndDate + a descriptive note. Three markets: A-shares / HK / US. ⚠️ Not the same as /v1/calendar (dividends, lock-ups, meetings). ⚠️ For HK the disclosureDate is often empty — the date lives in disclosureDesc (e.g. "将于2026-11-18发布财报"). Paid tier — Standard (¥29.9) and above.
codesstringYes# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/disclosure?codes="
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/disclosure?codes=&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/disclosure",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"codes": ""},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/disclosure?codes=", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Per-stock money flow (A-shares / HK): main and retail buy/sell/net plus average price and close. ⚠️ Not the same as /v1/fund (LHB + block trades + margin, A-shares only) — HK money flow is only available here. Amounts are in CNY/HKD units. ⭐ Shanghai/Shenzhen support optional start + end (YYYY-MM-DD, single code) for daily history; omit both for the latest day. HK returns the latest day only. ⚠️ US stocks have no money-flow data (every tier returns data: []) — for US, use /v1/fund-short (short selling). Paid tier — Pro (¥99) and above.
codestringYesstartstringendstring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/fund-flow?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/fund-flow?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/fund-flow",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/fund-flow?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Short-selling data (HK / US): ShortShares / ShortAmount / ShortRatio. ⚠️ Pass date — without it, if the day's data is not yet published the response only carries identifier fields. A-shares have no short-selling data (use /v1/margin-trade). Paid tier — Pro (¥99) and above.
codestringYesdatestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/fund-short?code=sh600667&date=2026-09-16"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/fund-short?code=sh600667&date=2026-09-16&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/fund-short",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/fund-short?code=sh600667&date=2026-09-16", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Southbound (Stock Connect) holdings, quarterly: shares held, holding ratio, market value. HK only. ⚠️ Quarterly snapshot, not daily flow — for daily net inflow use /v1/fund-flow. Paid tier — Pro (¥99) and above.
codesstringYesdatestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/fund-south?codes=&date=2026-09-16"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/fund-south?codes=&date=2026-09-16&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/fund-south",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"codes": ""},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/fund-south?codes=&date=2026-09-16", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());All indices (1,223): code / name. Use it to find an index code, then call /v1/index-constituent. Paging via limit (≤500) + offset; A-share and HK indices are mixed (distinguish by sh / sz / cs / hk prefix). Paid tier — Pro (¥99) and above.
limitintegeroffsetintegerdatestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/index-list?limit=10"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/index-list?limit=10&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/index-list",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/index-list?limit=10", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Stock scores (A-shares only): basic / technical / composite / fund / risk, each 0-100 with week/month/quarter changes. Returns structured objects (value + chg_week / chg_month / chg_quarter) so no string parsing is needed. ⚠️ chg_quarter is the cumulative change this quarter (scores reset quarterly, so it usually equals value). codes accepts a comma list; date reaches back to late April 2026. Paid tier — Standard (¥29.9) and above.
codesstringYesdatestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/score?codes=&date=2026-09-16"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/score?codes=&date=2026-09-16&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/score",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"codes": ""},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/score?codes=&date=2026-09-16", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Sell-side analyst reports: without id you get a list (title / broker / rating / type / time); with id you get the full text as Markdown. Covers A-shares and HK. ⚠️ At most 20 rows per list call (limit above 20 returns 422); page with offset; the "N total" figure is the historical count, not the page size. There is no date-range filter. Complements /v1/dehydrated (condensed summaries). Paid tier — Pro (¥99) and above.
codestringidstringid 字段取limitintegeroffsetinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/report?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/report?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/report",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/report?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Full convertible-bond terms: premium, conversion value, double-low, redemption triggers, rating. code like sh113052.
codestringYes# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/bond?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/bond?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/bond",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/bond?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());ETF quote / size / premium-discount / money flow. code like sh510300.
codestringYeskindstringstartstringendstringdatestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/etf?code=sh600667&kind=daily"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/etf?code=sh600667&kind=daily&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/etf",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/etf?code=sh600667&kind=daily", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());IPO calendar: issue, subscription, allotment, listing.
daysinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/ipo?days=15"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/ipo?days=15&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/ipo",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/ipo?days=15", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Dividend and split history (per-share dividend, bonus, ex-date).
codestringYesyearsinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/dividend?code=sh600667&years=3"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/dividend?code=sh600667&years=3&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/dividend",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/dividend?code=sh600667&years=3", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Broker research digests.
modestringsymbolstringlimitinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/dehydrated?mode=list"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/dehydrated?mode=list&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/dehydrated",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/dehydrated?mode=list", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Company basics: listing date, main business, industry.
codestringYes# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/profile?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/profile?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/profile",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/profile?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Search stocks, funds and sectors by name or code. Use this first to confirm a code.
qstringYes# 注:q 的值已做 URL 编码(浏览器 / curl 会自动还原,照抄即可)
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/search?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/search?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/search",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"q": "太极实业"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/search?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());The full A-share universe in one call (~5,576 stocks): code, name, market, listing date, industry, sector, issue price, registered capital. Unlike /v1/search (needs a keyword) or /v1/quote (needs a code), this endpoint enumerates everything — use it to build a stock pool or seed a database. Filter with market=sh|sz|bj or industry=..., paginate with limit/offset. A value of "-" means the source has no such field for that stock (not a fetch failure). Coverage is currently listed stocks; new listings are added automatically.
marketstringindustrystringlimitintegeroffsetinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/stocks?market=hs"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/stocks?market=hs&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/stocks",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/stocks?market=hs", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Corporate event calendar (per-stock events, NOT macro): dividend, lockup release, earnings disclosure and other scheduled company events. For macro data use /v1/macro. ⚠️ data is a SECTIONED structure: data.tables is an ordered list of sections, each with title / slug / rows; plus data.data{slug: rows} as a convenience index. Common slugs: financial_report / dividend / ipo / meeting / lockup_release / rights_issue.
datestringlimitinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/calendar?date=2026-09-16"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/calendar?date=2026-09-16&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/calendar",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/calendar?date=2026-09-16", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Margin trading detail: margin balance, buys, repayments, short balance.
codestringdatestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/margin-trade?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/margin-trade?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/margin-trade",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/margin-trade?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Block trades: price, premium/discount, volume, both-side brokerages.
codestringdatestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/block-trade?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/block-trade?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/block-trade",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/block-trade?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());The key's call count today, tier and daily quota.
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/usage"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/usage?key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/usage",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/usage", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Free endpoints need no key. Paid endpoints need a key (see pricing).