32 endpoints

Endpoint reference

Groups: Free 7 · Pro 25. Parameters and curl / Python / JS samples.

/openapi.json · live · 2026-10-03

Free7

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/challenge获取 PoW 挑战(匿名提额用)Open this endpoint →

匿名请求超限(429)时也会直接返回同一份挑战。解出 nonce 后带 `X-PoW: .` 请求,匿名配额从 5 次/分提升到 60 次/分。付费 Key 用户无需使用。

difficultyinteger
自定义难度(前导 0 位数),0=服务端默认
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 an ARRAY (30 daily bars by default, `data[0]` is the latest) — read the current price from `data[0].last`. ⚠️ 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`, an upstream 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).

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

codestringYes
Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US)
periodstring
Period: day / week / month
countinteger
Number of rows, default 30
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/hotHot listOpen this endpoint →

Market-wide hot list by attention (A-share / US / ETF) with change %.

limitinteger
Number of rows, default 30
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).

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());

Pro25

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/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/technicalTechnical indicatorsOpen this endpoint →

MA / MACD / KDJ / RSI / BOLL.

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/technical?code=sh600667"

# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/technical?code=sh600667&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", {
  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/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)
curl
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
  "https://api.ashareapi.com/v1/chip?code=sh600667"

# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/chip?code=sh600667&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", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
GET/v1/orderbook五档盘口(order book · 买五卖五)Open this endpoint →

秒级快照:买一~买五 / 卖一~卖五的价格与挂单量(手),含现价/涨跌/数据时间。字段命名对齐 Tushare 惯例:`b1_p`/`b1_v` ~ `b5_p`/`b5_v` = 买档价格/量,`a1_p`/`a1_v` ~ `a5_p`/`a5_v` = 卖档(扁平列,pandas 直接取 `df['b1_p']`)。用途:看封单强度、买卖压力、盘中支撑压力位。⚠️ 盘中才有意义(收盘后为当日最后快照);数据约 10 秒刷新一次。⚠️ 量单位是手(×100 = 股);跌停时买档全 0 / 涨停时卖档全 0(正常现象)。

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/snapshot全字段行情画像(估值/市值/股本/涨停价)Open this endpoint →

一只股票的完整画像:价格 + 盘口(买五卖五+委差)+ 估值(PE TTM/动/静 + PB) + 市值(流通/总)+ 股本(流通/总)+ 打板(涨停/跌停价 + 量比 + 振幅 + 涨速) + 标识(证券类型/股票状态/币种)+ 外盘/内盘。⚠️ 与 `/v1/quote` 的分工:quote 轻(8 字段)· 走官方通道 · 免费;本端点全(35 字段)· pro 档。只要现价用 quote 更轻(字段少、响应快)。⚠️ 仅 A 股(港股/美股字段布局不同,请用 `/v1/quote`)——传其他市场返回空,不返回错数据。⚠️ 计费 = 次数:本端点 1 次拿全 35 字段——要估值+市值+股本+涨停价多项时,比分别调 quote/valuation/orderbook 更省次数。⚠️ 单位:`volume` 手 · `amount` 万元 · 市值 亿元 · 股本 股 · 比率/涨幅 百分数。(字段含义见 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/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/lhbTop-trader boards (split)Open this endpoint →

Top-trader boards by type: institution / hot money / active seats.

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/screenFactor screeningOpen this endpoint →

Screen the whole market with a factor expression, e.g. intersect([PE_TTM > 0, PE_TTM < 20, ROETTM > 15]).

exprstring
Factor expression, e.g. intersect([PE_TTM > 0, PE_TTM < 20, ROETTM > 15])
presetstring
Preset name (alternative to expr): LowPE / LowPB / HighDividend / PEG / HighROE, and 17 more
limitinteger
Number of rows, default 30
orderbystring
Sort field (e.g. ROETTM)
descboolean
True = descending, False = ascending
marketstring
Market: hs (A-share) / hk / us (blank = A-share)
curl
# 注:expr 的值已做 URL 编码(含 [ ] 空格 等)
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
  "https://api.ashareapi.com/v1/screen?expr=intersect(%5BPE_TTM%20%3E%200%2C%20PE_TTM%20%3C%2020%2C%20ROETTM%20%3E%2015%5D)"

# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/screen?expr=intersect(%5BPE_TTM%20%3E%200%2C%20PE_TTM%20%3C%2020%2C%20ROETTM%20%3E%2015%5D)&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?expr=intersect(%5BPE_TTM%20%3E%200%2C%20PE_TTM%20%3C%2020%2C%20ROETTM%20%3E%2015%5D)", {
  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-chain产业链(主题/图谱/个股定位)Open this endpoint →

A 股产业链数据(183 个产业链主题):mode=list 主题列表 · mode=graph&topic=超级电容 → 产业链图谱(关联个股 + 所属节点 + 产业链位置 上游/中游/下游)· mode=stock&code=sh600667 → 个股所属产业链(主题 / 节点 / 位置 / 关联度 / 业务描述)。用户问『产业链/上下游/某公司处于链上什么位置/这个主题有哪些公司』时用。

modestring
list or detail
topicstring
主题名(mode=graph):如 超级电容 / 集成电路
codestring
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/industry-chain?mode=list"

# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/industry-chain?mode=list&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=list", {
  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/macroMacro dataOpen this endpoint →

Global macro: GDP / CPI / PMI / LPR / treasury yields / fiscal.

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
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/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)
curl
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
  "https://api.ashareapi.com/v1/etf?code=sh600667"

# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/etf?code=sh600667&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", {
  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 编码(含 [ ] 空格 等)
# 推荐: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/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
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/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).