Double 11 annual ¥1,699/yrView
102 endpoints

Endpoint reference

Groups: Free 10 · Pro 92. Parameters and curl / Python / JS samples.

/openapi.json · live · 2026-11-12

Free10

GET/v1/modelsOpenAI / Anthropic-compatible model list (free)Open this endpoint →

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.

curl
# 免费端点:无需 API Key(匿名即可调用)
curl "https://api.ashareapi.com/v1/models"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/models",
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/models");
console.log(await r.json());
GET/v1/healthHealth checkOpen this endpoint →

Checks service status and whether both data CLIs are ready.

curl
# 免费端点:无需 API Key(匿名即可调用)
curl "https://api.ashareapi.com/v1/health"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/health",
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/health");
console.log(await r.json());
GET/v1/challengePoW challenge (anonymous rate-limit boost)Open this endpoint →

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
Custom difficulty (leading zero bits); 0 = server default
curl
# 免费端点:无需 API Key(匿名即可调用)
curl "https://api.ashareapi.com/v1/challenge?difficulty=0"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/challenge",
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/challenge?difficulty=0");
console.log(await r.json());
GET/v1/quoteReal-time quoteOpen this endpoint →

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
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
curl
# 免费端点:无需 API Key(匿名即可调用)
curl "https://api.ashareapi.com/v1/quote?code=sh600667"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/quote",
    params={"code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/quote?code=sh600667");
console.log(await r.json());
GET/v1/klineK-line (D/W/M)Open this endpoint →

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).

codestringYes
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
periodstring
Period: day / week / month
countstring
Number of rows, default 30
startstring
起始日期 YYYY-MM-DD(仅 day 与分钟线;须与 end 配对;港股/美股/期货/外汇不支持)
endstring
结束日期 YYYY-MM-DD(仅 day 与分钟线;须与 start 配对;港股/美股/期货/外汇不支持)
curl
# 免费端点:无需 API Key(匿名即可调用)
curl "https://api.ashareapi.com/v1/kline?code=sh600667&period=day"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/kline",
    params={"code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/kline?code=sh600667&period=day");
console.log(await r.json());
GET/v1/wikiDoc search (units / conventions / misuse)Open this endpoint →

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.

qstring
Keyword: a stock name (Chinese works) or a code
slugstring
取某一篇全文(如 units / kline-fields);留空=不用
langstring
语言:zh(默认)/ en
curl
# 注: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/wiki",
    params={},
    timeout=30,
)
print(r.json())
JavaScript
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());
GET/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".

limitinteger
Number of rows, default 30 (list max 50)
typestring
Type: summary / trade / interval / technical / margin / valuation / rotation (updown is T-1; use /v1/changedist for current breadth)
curl
# 免费端点:无需 API Key(匿名即可调用)
curl "https://api.ashareapi.com/v1/hot?limit=10"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/hot",
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/hot?limit=10");
console.log(await r.json());
GET/v1/market-overviewMarket overviewOpen this endpoint →

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
Type: summary / trade / interval / technical / margin / valuation / rotation (updown is T-1; use /v1/changedist for current breadth)
curl
# 免费端点:无需 API Key(匿名即可调用)
curl "https://api.ashareapi.com/v1/market-overview?type=institution"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/market-overview",
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/market-overview?type=institution");
console.log(await r.json());
GET/v1/changedistUp/down distributionOpen this endpoint →

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.

curl
# 免费端点:无需 API Key(匿名即可调用)
curl "https://api.ashareapi.com/v1/changedist"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/changedist",
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/changedist");
console.log(await r.json());
GET/v1/trade-calendarTrading calendar (market open/closed)Open this endpoint →

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.

datestring
A single day, YYYY-MM-DD (leave blank to use year / start+end; all blank = current month)
startstring
Range start date YYYY-MM-DD (pair with end)
endstring
Range end date YYYY-MM-DD (pair with start)
yearstring
A whole year, e.g. 2026 (mutually exclusive with date and start+end)
trading_onlyboolean
true = market-open days only
limitinteger
Row cap (0 = automatic: year/range queries are filled up to 400, so nothing is truncated)
offsetinteger
Skip the first N rows (paging)
curl
# 免费端点:无需 API Key(匿名即可调用)
curl "https://api.ashareapi.com/v1/trade-calendar?date=2026-09-16"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/trade-calendar",
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/trade-calendar?date=2026-09-16");
console.log(await r.json());

Pro92

GET/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.

qstringYes
Keyword: a stock name (Chinese works) or a code
scopestring
Data-source scope (optional): ashare (our own data) / notice,news,report (filings & news) / web (open-web search, needs X-LLM-Key) / wechat (WeChat Official Accounts). Blank = auto-select by the question.
depthstring
Depth: fast / standard (default) / deep — controls the time and tool-call budget.
max_resultsinteger
Maximum number of result rows (default 10, max 50).
clarifyboolean
Only disambiguate the symbol; do not fetch data (returns 1–4 options with explanations).
claimstring
The assertion text to verify (optional). Only when provided can the result be marked contradicted.
replayboolean
Replay reconciliation (optional, default false). Runs one extra model pass and compares the output: match / non_deterministic / not_replayable / skipped_no_client. ⚠️ On the model path it is usually non_deterministic — this does not mean the conclusion is unreliable.
authority_minnumber
Minimum authority score (0–1). Rows below it are filtered out; the number dropped is echoed in dropped_by_authority.
recencystring
Time window, e.g. 7d / 24h (optional). Out-of-window items are still returned but marked unverified.
curl
# 注: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/agent-search",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"q": "太极实业"},
    timeout=30,
)
print(r.json())
JavaScript
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());
POST/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.

qstringYes
Keyword: a stock name (Chinese works) or a code
scopestring
Data-source scope (optional): ashare (our own data) / notice,news,report (filings & news) / web (open-web search, needs X-LLM-Key) / wechat (WeChat Official Accounts). Blank = auto-select by the question.
max_resultsinteger
Maximum number of result rows (default 10, max 50).
recencystring
Time window, e.g. 7d / 24h (optional). Out-of-window items are still returned but marked unverified.
curl
# 注: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/agent-ask",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"q": "太极实业"},
    timeout=30,
)
print(r.json())
JavaScript
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());
POST/v1/messagesAnthropic Messages API (compatible)Open this endpoint →

⭐ 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.

curl
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
  "https://api.ashareapi.com/v1/messages"

# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/messages?key=YOUR_KEY"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/messages",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/messages", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/watchlistWatchlist (list / add / remove; key-isolated)Open this endpoint →

Watchlist isolated per API key; CRUD is not billed as data calls.

actionstring
list (read) / add / remove / export (CSV)
codestring
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
codesstring
Comma-separated codes for batch add/remove; use this or code, not both
liststring
List name, default 默认自选 (the default list)
namestring
Display name (optional)
notestring
Free-form note (optional)
tagsstring
Comma-separated tags (optional)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/watchlist",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/watchlist?action=list", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/watchlist/quotesBatch quotes for the watchlistOpen this endpoint →

Latest quotes for every stock in a watchlist in one call; billed as 1 data call.

liststring
List name; blank = all lists
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/watchlist/quotes",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/watchlist/quotes", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/scanner/snapshotsScanner snapshots for the current key (read-only; no scanner quota charge)Open this endpoint →

返回当前 Key 的最近选股快照;只读,不扣 scanner 次数。

limitinteger
Number of rows, default 30
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/scanner/snapshots",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/scanner/snapshots?limit=10", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/scannerStock Screener (scanner Agent): natural-language conditions - + citations + tool trace (BYOK)Open this endpoint →

把自然语言条件交给选股员(scanner Agent),返回候选池、引用与工具轨迹。

qstringYes
Keyword: a stock name (Chinese works) or a code
curl
# 注: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/scanner",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"q": "太极实业"},
    timeout=30,
)
print(r.json())
JavaScript
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());
GET/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_idstringYes
scanner 快照 ID,如 scn_xxx
focusstring
overall / winners / losers / attribution
horizonstring
只复盘某个窗口:1 / 5 / 20
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/analyst",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"snapshot_id": ""},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/analyst?snapshot_id=&focus=overall", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
POST/v1/chat/completionsOpenAI Chat Completions (compatible, BYOK)Open this endpoint →

⭐ 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.

curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/chat/completions",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/chat/completions", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
POST/v1/responsesOpenAI Responses API (compatible, BYOK)Open this endpoint →

⭐ 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.

curl
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
  "https://api.ashareapi.com/v1/responses"

# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/responses?key=YOUR_KEY"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/responses",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/responses", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
POST/v1/agent-researchAsync research task (submit · cited report · BYOK)Open this endpoint →

⭐ 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.

qstringYes
Keyword: a stock name (Chinese works) or a code
depthstring
Depth: fast / standard (default) / deep — controls the time and tool-call budget.
curl
# 注: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/agent-research",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"q": "太极实业"},
    timeout=30,
)
print(r.json())
JavaScript
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());
GET/v1/futuresFutures (global) quote snapshotOpen this endpoint →

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
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/futures",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/futures?code=sh600667", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/forexFX spot quoteOpen this endpoint →

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
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/forex",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/forex?code=sh600667", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/kline-fullFull-history K-line (10y daily · raw + adjustment factors)Open this endpoint →

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.

codestringYes
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
fqstring
复权:qfq 前复权(默认)/ hfq 后复权 / nofq 不复权原始价
startstring
起始日期 YYYY-MM-DD(省略 = 从库起点 2016-08-08)
endstring
结束日期 YYYY-MM-DD(省略 = 到最新交易日)
curl
# 推荐: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"
Python
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())
JavaScript
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());
GET/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.

datestringYes
Date YYYY-MM-DD (blank = latest trading day)
limitinteger
Number of rows, default 30
offsetinteger
分页偏移(配合 limit 使用)
codesstring
可选:只取指定股票,逗号分隔(如 sh600519,sz000001;省略 = 全市场)
curl
# 推荐: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"
Python
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())
JavaScript
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());
GET/v1/backtestQuant backtest (single-stock live / portfolio precomputed)Open this endpoint →

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).

modestring
single = backtest one stock in real time; portfolio = look up a precomputed multi-stock result
strategystring
Built-in strategy name (see /v1/strategies for the full list and parameters)
codestring
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
startstring
Backtest start date YYYY-MM-DD
endstring
Backtest end date YYYY-MM-DD (blank = latest)
initial_cashnumber
Initial capital, default 1,000,000
weightingstring
mode=portfolio weighting: equal = equal weight (default) / inv_vol = inverse-volatility (Institutional tier)
include_equityboolean
Include the daily equity curve in the response
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/backtest",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/backtest?mode=single", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/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.

curl
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
  "https://api.ashareapi.com/v1/strategies"

# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/strategies?key=YOUR_KEY"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/strategies",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/strategies", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/ip-whitelistIP allow-list (lock a key to fixed IPs)Open this endpoint →

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.

curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/ip-whitelist",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/ip-whitelist", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/backtest-batchBatch backtest (many stocks × many strategies)Open this endpoint →

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).

codesstringYes
Comma-separated stock codes, up to 20 (e.g. sh600519,sz000001)
strategiesstring
Comma-separated strategy names, up to 10 (see /v1/strategies); max 60 combinations
startstring
Backtest start date YYYY-MM-DD
endstring
Backtest end date YYYY-MM-DD (blank = latest)
initial_cashnumber
Initial capital for each backtest, default 1,000,000
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/backtest-batch",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"codes": ""},
    timeout=30,
)
print(r.json())
JavaScript
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());
GET/v1/factorsQuant factor library (87 factors + 22 presets)Open this endpoint →

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.

categorystring
Filter by category — pass the Chinese value: Valuation 估值 / Market 行情 / Profitability 盈利 / Balance sheet 资产负债 / Cash flow 现金流
kindstring
Show only one kind of screening shortcut — pass the Chinese value: Ranking 排行 / Tags 标签 / Events 事件
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/factors",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/factors?kind=daily", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/playbooksQuant playbook library (how to judge the market · 25 playbooks)Open this endpoint →

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.

categorystring
Filter by theme (e.g. 情绪周期 / 风险管理)
idstring
Fetch one playbook by id (e.g. sentiment-cycle)
curl
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
  "https://api.ashareapi.com/v1/playbooks"

# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/playbooks?key=YOUR_KEY"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/playbooks",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/playbooks", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/minute分时(当日 / 近 5 日盘中走势)Open this endpoint →

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).

codestringYes
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
daysinteger
Number of days, default 15
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/minute",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/minute?code=sh600667&days=15", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/newsLatest news for a symbolOpen this endpoint →

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.

codestring
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
idstring
资讯 id(如 SN20261010173533a6c32421)—— 传它就取完整正文(Markdown),此时 code 可省
limitinteger
Number of rows, default 50 (max 100)
typestring
Type: summary / trade / interval / technical / margin / valuation / rotation (updown is T-1; use /v1/changedist for current breadth)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/news",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/news?code=sh600667", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/noticeFilings / announcements (list + detail, ~20 years back)Open this endpoint →

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.

codestring
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
idstring
公告 id(如 nos1225475868)—— 传它就取详情,此时 code 可省
typestring
Type: summary / trade / interval / technical / margin / valuation / rotation (updown is T-1; use /v1/changedist for current breadth)
limitinteger
Number of rows, default 50 (max 100)
offsetinteger
偏移量(有效,0 ~ total−1)—— 翻历史用,如 offset=900 可得约 2010 年
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/notice",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/notice?code=sh600667", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/financeFinancial statementsOpen this endpoint →

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).

codestringYes
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
numinteger
Number of periods, default 4 (the latest N periods, descending)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/finance",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/finance?code=sh600667&num=4", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/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.

codesstringYes
多个股票代码,逗号分隔:sh600519,sz000001(专业版单次 ≤10 只 · 机构版 ≤20 只;且 只数 × periods 不得超过 40)
periodsinteger
每只返回期数(默认 4,最多 12,降序最新在前)
typestring
Type: summary / trade / interval / technical / margin / valuation / rotation (updown is T-1; use /v1/changedist for current breadth)
fieldsstring
字段范围:all(默认,186 列)/ core(69 列,载荷约 1/3)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/finance-batch",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"codes": ""},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/finance-batch?codes=&periods=4", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/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.

codesstringYes
多个股票代码,逗号分隔:sh600519,hk00700(专业版 ≤500 只 · 机构版 ≤1000 只)
datestring
Date YYYY-MM-DD (blank = latest trading day)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/technical-batch",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"codes": ""},
    timeout=30,
)
print(r.json())
JavaScript
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());
GET/v1/fundMoney flow + boards + marginOpen this endpoint →

Everything trading-side in one call: main money flow (+ market rank), top-trader boards, block trades, margin trading.

codestringYes
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/fund",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/fund?code=sh600667", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/fund-batchBatch money flow (many stocks in one call)Open this endpoint →

⭐ 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
Comma-separated stock codes, up to 200 (Pro) / 1000 (Institutional) — e.g. sh600519,sz000001,sz300750
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/fund-batch",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"codes": ""},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/fund-batch?codes=", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/quote-batchBatch quotes (many stocks in one call)Open this endpoint →

⭐ 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).

codesstringYes
多个股票代码,逗号分隔:sh600519,sz000001,sz300750
periodstring
Period: day / week / month
countinteger
Number of rows, default 30
startstring
起始日期 YYYY-MM-DD(可选)
endstring
结束日期 YYYY-MM-DD(可选)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/quote-batch",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"codes": ""},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/quote-batch?codes=&period=day", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/kline-batchBatch K-lines (many stocks × one date range)Open this endpoint →

⭐ Fetch K-lines for many stocks in one call (many symbols × one date range), with per-symbol status.

codesstringYes
多个股票代码,逗号分隔:sh600519,sz000001,sz300750
periodstring
Period: day / week / month
countinteger
Number of rows, default 30
startstring
起始日期 YYYY-MM-DD(可选)
endstring
结束日期 YYYY-MM-DD(可选)
fqstring
复权:qfq 前复权 / hfq 后复权 / nofq 不复权(留空 = 服务端默认)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/kline-batch",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"codes": ""},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/kline-batch?codes=&period=day", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/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
多个股票代码,逗号分隔:sh600519,sz000001(专业版 ≤200 只 · 机构版 ≤250 只)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/snapshot-batch",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"codes": ""},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/snapshot-batch?codes=", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/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
多个股票代码,逗号分隔:sh600519,sz000001(专业版 ≤100 只 · 机构版 ≤150 只)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/profile-batch",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"codes": ""},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/profile-batch?codes=", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/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.

codesstringYes
多个股票代码,逗号分隔:sh600519,sz000001(专业版 ≤200 只 · 机构版 ≤300 只)
datestring
Date YYYY-MM-DD (blank = latest trading day)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/chip-batch",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"codes": ""},
    timeout=30,
)
print(r.json())
JavaScript
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());
GET/v1/technicalTechnical indicatorsOpen this endpoint →

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).

codestringYes
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
datestring
Date YYYY-MM-DD (blank = latest trading day)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/technical",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
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());
GET/v1/shareholderShareholder researchOpen this endpoint →

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
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/shareholder",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/shareholder?code=sh600667", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/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
多个股票代码,逗号分隔:sh600519,hk00700(专业版 ≤200 只 · 机构版 ≤300 只)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/shareholder-batch",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"codes": ""},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/shareholder-batch?codes=", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/chipChip distribution / costOpen this endpoint →

Chip distribution and holding-cost analysis.

codestringYes
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
datestring
Date YYYY-MM-DD (blank = latest trading day)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/chip",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
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());
GET/v1/orderbookOrder book (five best bids / asks)Open this endpoint →

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
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/orderbook",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/orderbook?code=sh600667", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/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
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/snapshot",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/snapshot?code=sh600667", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/abnormalAbnormal moves / deviation (short-term regulatory signals)Open this endpoint →

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.

modestring
list or detail
datestring
Date YYYY-MM-DD (blank = latest trading day)
limitinteger
Number of rows, default 30
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/abnormal",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/abnormal?mode=deviation", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/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.

modestring
list or detail
datestring
Date YYYY-MM-DD (blank = latest trading day)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/review",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/review?mode=board", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/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.

modestring
list or detail
datestring
Date YYYY-MM-DD (blank = latest trading day)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/limit-up",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/limit-up?mode=limit", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/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).

modestring
list or detail
codestringYes
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
datestring
Date YYYY-MM-DD (blank = latest trading day)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/auction",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/auction?code=sh600667&mode=stock", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/eventsStock event labels (42)Open this endpoint →

42 event tags per stock: block trades, top-trader boards, buybacks, placements, dividends, earnings, lockups.

codestringYes
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/events",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/events?code=sh600667", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/bigorderL2 大单净额分时(分钟级 · 机构版专属)Open this endpoint →

单股大单资金分时:每 1 分钟一个点,net = 该分钟大单净额(元),正数=大单净买入、负数=净卖出。

codestringYes
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/bigorder",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/bigorder?code=sh600667", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/bigorder-flowL2 大单成交明细(含主动/被动拆分 · 机构版专属)Open this endpoint →

逐笔大单成交:单只票当日每一笔成交额 ≥ 阈值的大单,并按主动 / 被动 × 买 / 卖四方向标注。

codestringYes
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
moneyinteger
金额阈值档:0=30万 1=50万 2=100万 3=300万 4=1000万
limitinteger
Number of rows, default 30
offsetinteger
分页偏移(笔):0 = 最新一段,配合 limit 往后翻可取全天
curl
# 推荐: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"
Python
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())
JavaScript
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());
GET/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.

codestringYes
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
moneyinteger
金额阈值档:0=30万 1=50万 2=100万 3=300万 4=1000万
max_rowsinteger
最多返回多少笔(安全阀,防极端标的撑爆响应)
curl
# 推荐: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"
Python
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())
JavaScript
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());
GET/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.

codestringYes
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
volinteger
委托量阈值(手):500/1000/2000/5000/10000
turinteger
委托金额阈值(万元):30/50/100/200/500/1000
limitinteger
Number of rows, default 30
curl
# 推荐: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"
Python
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())
JavaScript
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());
GET/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.

codestringYes
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
limitinteger
Number of rows, default 30
curl
# 推荐: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"
Python
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())
JavaScript
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());
GET/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.

codestringYes
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
datestring
Date YYYY-MM-DD (blank = latest trading day)
curl
# 推荐: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"
Python
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())
JavaScript
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());
GET/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.

sortstring
排序:net_in/net_out/buy/sell/gain/loss/turnover/mcap
limitinteger
Number of rows, default 30
offsetinteger
偏移(翻页用)
datestring
Date YYYY-MM-DD (blank = latest trading day)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/bigorder-rank",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/bigorder-rank?sort=net_in", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/lhb-seatsDragon-tiger list seat detail (broker branches, hot-money tag)Open this endpoint →

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.

codestringYes
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
datestring
Date YYYY-MM-DD (blank = latest trading day)
curl
# 推荐: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"
Python
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())
JavaScript
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());
GET/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.

datestring
Date YYYY-MM-DD (blank = latest trading day)
sortstring
排序:net_buy / change_pct / turnover_rate / market_cap
limitinteger
Number of rows, default 30
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/lhb-agency",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
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());
GET/v1/market-moodMarket mood (break rate + money-making effect, 9-day trend)Open this endpoint →

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
Date YYYY-MM-DD (blank = latest trading day)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/market-mood",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
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());
GET/v1/limit-reasonLimit-up reasons (per stock, historical, full reason text)Open this endpoint →

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.

codestringYes
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
datestring
Date YYYY-MM-DD (blank = latest trading day)
limitinteger
Number of rows, default 30
curl
# 推荐: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"
Python
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())
JavaScript
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());
GET/v1/broken-boardBroken-board history (limit-ups smashed open)Open this endpoint →

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.

datestring
Date YYYY-MM-DD (blank = latest trading day)
limitinteger
Number of rows, default 30
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/broken-board",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
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());
GET/v1/tail-chaseTail-end capital grab (whole-market ranking)Open this endpoint →

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.

limitinteger
Number of rows, default 30
sortstring
排序:chase_amount / change_pct
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/tail-chase",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/tail-chase?limit=10", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/northboundA-share northbound holdings by sector (quarterly)Open this endpoint →

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.

datestring
Date YYYY-MM-DD (blank = latest trading day)
limitinteger
Number of rows, default 30
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/northbound",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/northbound?date=2026-09-16", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/new-high100-day new highs (by theme)Open this endpoint →

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.

datestring
Date YYYY-MM-DD (blank = latest trading day)
limitinteger
Number of rows, default 30
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/new-high",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
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());
GET/v1/flash7×24 market-wide financial news flash (whole-market wire)Open this endpoint →

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.

limitinteger
Number of rows, default 30
indexinteger
翻页偏移(0/20/40…,步长=上次的 limit)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/flash",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/flash?limit=10", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/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.

qstringYes
Keyword: a stock name (Chinese works) or a code
scopestring
Data-source scope (optional): ashare (our own data) / notice,news,report (filings & news) / web (open-web search, needs X-LLM-Key) / wechat (WeChat Official Accounts). Blank = auto-select by the question.
limitinteger
Number of rows, default 30
curl
# 注: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/evidence",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"q": "太极实业"},
    timeout=30,
)
print(r.json())
JavaScript
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());
GET/v1/lhbTop-trader boards (split)Open this endpoint →

Top-trader boards by type (6 kinds): all / institution / active seats / high-win-rate buys / high-win-rate seats / hot money.

typestring
Type: summary / trade / interval / technical / margin / valuation / rotation (updown is T-1; use /v1/changedist for current breadth)
datestring
Date YYYY-MM-DD (blank = latest trading day)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/lhb",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/lhb?type=institution", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/screenStock screening (factor / label / ranking / strategy / event)Open this endpoint →

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.

modestring
filter factor screening (default) / pool theme pools / rank whole-market ranking / strategy strategies / event corporate events
filtersstring
[filter] Screening conditions, comma = AND: pe_ttm:0..20,roe_ttm:>=15. Ranges 0..20 (inclusive); comparisons >=15 / <=30 / >0 / <0 / =5; 94 available fields, see list=fields
sortstring
Sort field (semantic name, see list=fields); descending by default, prefix - for ascending: sort=roe_ttm / sort=-roe_ttm
boardstring
Stock pool: hs300 / zz500 / zz1000 / sse50 / sz_component; blank = whole market
metricstring
[rank] Ranking metric: overall / capital / fundamental / risk / technical (default overall)
presetstring
[filter] Official preset name (mutually exclusive with filters): low_pe / high_dividend … 22 in total; see list=presets
poolstring
[pool] Theme pool / attribute tag — a Chinese name or a code both work (e.g. 央企 / shareholder_central_state); see list=pools for the catalogue
strategystring
[strategy] Strategy — a Chinese name or a code both work (e.g. 高股息 / high_dividend); see list=strategies for the catalogue
eventstring
[event] Event — a Chinese name or a code both work (e.g. 分红预案公告后一月 / dividend_plan); see list=events for the catalogue
limitinteger
Number of rows, default 20. filter mode has no cap (pass 9999 to fetch the whole market in one call — measured 5,000+ rows); other modes cap at 200 per page
offsetinteger
Skip the first N rows (paging). filter mode supports it too — we fetch the full set and slice offset:offset+limit, so rows are dropped but values never change; other modes pass it to the data source
datestring
Query date YYYY-MM-DD (blank = latest trading day); in filter mode this is a historical cross-section
startstring
[pool/strategy] Range start date YYYY-MM-DD (pair with end)
endstring
[pool/strategy] Range end date YYYY-MM-DD (pair with start)
assetstring
Asset class: stock (default) / etf — pool/rank only; filter and strategy are stocks only
liststring
true = list every available value for that mode (with Chinese names and groups)
slimboolean
Slim response: true drops tables when it is a verbatim duplicate of structured (single-table output, ~42% smaller); multi-table output (calendar / macro) is unaffected
curl
# 注: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/screen",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
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());
GET/v1/sectorSector performanceOpen this endpoint →

Industry / concept / region sector moves, with the leading stock.

curl
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
  "https://api.ashareapi.com/v1/sector"

# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/sector?key=YOUR_KEY"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/sector",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/sector", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/industry-chainIndustry chain (themes / graph / per-stock position)Open this endpoint →

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".

modestring
list = theme list / graph = theme graph / stock = a stock's chains
topicstring
Theme name (mode=graph), e.g. 超级电容 / 集成电路
codestring
Stock code (mode=stock), e.g. sh600667
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/industry-chain",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/industry-chain?mode=graph", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/sector-valuationSector valuation (percentile)Open this endpoint →

Shenwan sector PE/PB/PS/PCF + dividend yield + historical percentile. code like pt01801780.

codestringYes
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
curl
# 推荐: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"
Python
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())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/sector-valuation?code=sh600667", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/index-constituentIndex constituents (full list)Open this endpoint →

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
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
curl
# 推荐: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"
Python
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())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/index-constituent?code=sh600667", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/macroMacro dataOpen this endpoint →

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.

regionstring
Region: cn / us / jp / eu / hk
namesstring
Indicator short names (e.g. cn_gdp / cn_cpi_ppi / cn_lpr / us_inflation); blank = all for that region
limitinteger
Number of rows, default 30
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/macro",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/macro?region=cn", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/suspensionTrading halts (CN / HK / US)Open this endpoint →

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
Market: hs (A-share) / hk / us (blank = A-share)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/suspension",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/suspension?market=hs", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/buybackShare buybacks (A-shares / HK)Open this endpoint →

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.

codestringYes
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
startstring
起始日期 YYYY-MM-DD(可选)
endstring
结束日期 YYYY-MM-DD(可选)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/buyback",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/buyback?code=sh600667", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/consensusAnalyst consensus (target price + forecasts)Open this endpoint →

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
股票代码,逗号分隔(≤15 只):sh600519,sz000001 / hk00700
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/consensus",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"codes": ""},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/consensus?codes=", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/ratingAnalyst ratings (HK / US · target price + distribution)Open this endpoint →

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
代码,逗号分隔:hk00700,usAAPL(仅港股/美股)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/rating",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"codes": ""},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/rating?codes=", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/disclosureEarnings disclosure calendarOpen this endpoint →

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
代码,逗号分隔:sh600519 / hk00700 / usAAPL
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/disclosure",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"codes": ""},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/disclosure?codes=", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/fund-flowMoney flow (A-shares / HK; A-share history range)Open this endpoint →

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.

codestringYes
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
startstring
沪深历史区间开始 YYYY-MM-DD(与 end 同时提供)
endstring
沪深历史区间结束 YYYY-MM-DD(与 start 同时提供)
curl
# 推荐: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"
Python
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())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/fund-flow?code=sh600667", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/fund-shortShort selling (HK / US)Open this endpoint →

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.

codestringYes
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
datestring
Date YYYY-MM-DD (blank = latest trading day)
curl
# 推荐: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"
Python
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())
JavaScript
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());
GET/v1/fund-southSouthbound holdings (Stock Connect)Open this endpoint →

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.

codesstringYes
港股代码,逗号分隔:hk00700,hk03690
datestring
Date YYYY-MM-DD (blank = latest trading day)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/fund-south",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"codes": ""},
    timeout=30,
)
print(r.json())
JavaScript
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());
GET/v1/index-listIndex list (1,223 indices)Open this endpoint →

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.

limitinteger
Number of rows, default 30
offsetinteger
偏移
datestring
Date YYYY-MM-DD (blank = latest trading day)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/index-list",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/index-list?limit=10", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/scoreStock scores (5 dimensions)Open this endpoint →

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.

codesstringYes
股票代码,逗号分隔:sh600519,sz000001
datestring
Date YYYY-MM-DD (blank = latest trading day)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/score",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"codes": ""},
    timeout=30,
)
print(r.json())
JavaScript
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());
GET/v1/reportAnalyst reports (list / full text)Open this endpoint →

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.

codestring
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
idstring
研报 ID(详情模式):res843401040115 —— 从列表的 id 字段取
limitinteger
Number of rows, default 30
offsetinteger
列表偏移(翻页)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/report",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/report?code=sh600667", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/bondConvertible bond termsOpen this endpoint →

Full convertible-bond terms: premium, conversion value, double-low, redemption triggers, rating. code like sh113052.

codestringYes
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/bond",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/bond?code=sh600667", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/etfETF overviewOpen this endpoint →

ETF quote / size / premium-discount / money flow. code like sh510300.

codestringYes
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
kindstring
概览(默认)/详情/持仓/净值/公司/持有人/财务
startstring
仅 kind=净值:起始日 YYYY-MM-DD
endstring
仅 kind=净值:结束日 YYYY-MM-DD
datestring
Date YYYY-MM-DD (blank = latest trading day)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/etf",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/etf?code=sh600667&kind=daily", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/ipoIPO calendarOpen this endpoint →

IPO calendar: issue, subscription, allotment, listing.

daysinteger
Number of days, default 15
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/ipo",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/ipo?days=15", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/dividendDividends & splitsOpen this endpoint →

Dividend and split history (per-share dividend, bonus, ex-date).

codestringYes
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
yearsinteger
Number of years, default 3
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/dividend",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/dividend?code=sh600667&years=3", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/dehydratedResearch digestOpen this endpoint →

Broker research digests.

modestring
list or detail
symbolstring
Stock code (used with detail)
limitinteger
Number of rows, default 30
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/dehydrated",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/dehydrated?mode=list", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/profileCompany profileOpen this endpoint →

Company basics: listing date, main business, industry.

codestringYes
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/profile",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/profile?code=sh600667", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/searchSearch (disambiguation)Open this endpoint →

Search stocks, funds and sectors by name or code. Use this first to confirm a code.

qstringYes
Keyword: a stock name (Chinese works) or a code
curl
# 注: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/search",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={"q": "太极实业"},
    timeout=30,
)
print(r.json())
JavaScript
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());
GET/v1/stocksAll Listed Stocks (code / name / listing date / industry)Open this endpoint →

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.

marketstring
Market: hs (A-share) / hk / us (blank = A-share)
industrystring
行业名精确匹配,如 '食品饮料'(留空=全部)
limitinteger
Number of rows, default 30
offsetinteger
跳过前 N 条(翻页)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/stocks",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/stocks?market=hs", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/calendarCorporate event calendarOpen this endpoint →

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.

datestring
Window start date YYYY-MM-DD (blank = from today); returns events for roughly the following month
limitinteger
Result size (passed to the data source; it groups by event type, so per-section counts are not exactly this value)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/calendar",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/calendar?date=2026-09-16", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/margin-tradeMargin tradingOpen this endpoint →

Margin trading detail: margin balance, buys, repayments, short balance.

codestring
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
datestring
Date YYYY-MM-DD (blank = latest trading day)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/margin-trade",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/margin-trade?code=sh600667", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/block-tradeBlock tradesOpen this endpoint →

Block trades: price, premium/discount, volume, both-side brokerages.

codestring
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
datestring
Date YYYY-MM-DD (blank = latest trading day)
curl
# 推荐: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"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/block-trade",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/block-trade?code=sh600667", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/usageUsage & quotaOpen this endpoint →

The key's call count today, tier and daily quota.

curl
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
  "https://api.ashareapi.com/v1/usage"

# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/usage?key=YOUR_KEY"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/usage",
    headers={"Authorization": "Bearer YOUR_KEY"},
    params={},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch("https://api.ashareapi.com/v1/usage", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
Need other data?

Free endpoints need no key. Paid endpoints need a key (see pricing).