Financial statements API
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).
GET /v1/financeGET /v1/finance?code=sh600667&num=4curl "https://api.ashareapi.com/v1/finance?code=sh600667&num=4&key=YOUR_KEY"code * · num* = requiredQuick start
Replace the key below with yours (free endpoints need no key):
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/finance?code=sh600667&num=4"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/finance?code=sh600667&num=4&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/finance",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/finance?code=sh600667&num=4", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | Stock code with market prefix: sh600667 (SH), sz000001 (SZ), hk00700 (HK), usAAPL (US) |
| num | integer | No | Number of periods, default 4 (the latest N periods, descending) |
codestringYesnumintegerResponse fields
The table below is captured from real API calls (not inferred): each row gives the field name, its type and one real sample value, so you can align your parser.
data[][]Envelope: ok / endpoint / tier / elapsed_ms / sourceProbed: 2026-10-20| Field | Type | Real sample value |
|---|---|---|
| code | str | sh600519 |
| EndDate | str | 2026-06-30 |
| InfoPublDate | str | 2026-08-15 |
| BasicEPS | str | 35.57 |
| BasicEPSYOY | str | -1.686 |
| CapitalSurplusFundPS | str | 0.0013 |
| DilutedEPS | str | 35.57 |
| DilutedEPSYOY | str | -1.686 |
| DividendTTM | str | 65033211845.95 |
| EBIT | str | 61192879672.31 |
| EPS | str | 35.6112 |
| EPSTTM | str | 65.1429 |
| EPS_Q | str | 13.81859 |
| EnterpriseType | str | 一般企业 |
| FinancialExpense | str | -243237716.96 |
| FinancialExpense_Q | str | -127434381.98 |
| GrossIncomeRatio | str | 89.5552 |
| GrossIncomeRatioTTM | str | 90.2507 |
| GrossIncomeRatio_Q | str | 89.4797 |
| GrossProfitTTM | str | 153563460009.570016 |
| MainIncomePS | str | 72.5579 |
| MainProfitProportion | str | 99.9558 |
| NPDeductNonRecurringPL | str | 44464207646.01 |
| NPPCCGrowRate3Y | str | 7.3543 |
| NPParentCompanyCutYOY | str | -2.0402 |
| NPParentCompanyCutYOY_Q | str | -7.09 |
| NPParentCompanyOwners | str | 44516880421.86 |
| NPParentCompanyOwnersTTM | str | 81433985225.44 |
| NPParentCompanyOwners_Q | str | 17274367535.41 |
| NPParentCompanyYOY | str | -1.9516 |
| NPParentCompanyYOY_Q | str | -6.9043 |
| NetProfitRatio | str | 50.7516 |
| NetProfitRatioTTM | str | 49.5774 |
| ORComGrowRate3Y | str | 9.2415 |
| OperProfitGrowRate | str | -2.163 |
| OperProfitGrowRate_Q | str | -7.2208 |
| OperatingCost | str | 9473762565.88 |
| OperatingCostTTM | str | 16588549052.86 |
| OperatingCost_Q | str | 3953033365.56 |
| OperatingExpense | str | 3206308341.53 |
| OperatingExpense_Q | str | 1600543576.65 |
| OperatingProfit | str | 61411291686.27 |
| OperatingProfitTTM | str | 113451268476.14 |
| OperatingProfit_Q | str | 23874282999.85 |
| OperatingRevenue | str | 90703260964.48 |
| OperatingRevenueGrowRate | str | 1.4699 |
| OperatingRevenueGrowRate_Q | str | -5.1417 |
| OperatingRevenuePSTTM | str | 136.1127 |
| OperatingRevenueTTM | str | 170152009062.429984 |
| OperatingRevenue_Q | str | 36794008743.97 |
| RAndD | str | 114926219.60 |
| RAndD_Q | str | 55615495.14 |
| ROA | str | 15.0218 |
| ROATTM | str | 27.2955 |
| ROE | str | 17.7179 |
| ROECut | str | 17.6969 |
| ROECut_Q | str | 6.855314 |
| ROETTM | str | 32.4111 |
| ROEWeighted | str | 16.75 |
| ROE_Q | str | 6.8753 |
| ROIC | str | 16.3748 |
| RetainedEarningsPS | str | 199.1347 |
| RoeYOY | str | -6.8713 |
| RoeYOY_Q | str | -11.5754 |
| SecuCode | str | sh600519 |
| SurplusReserveFundPS | str | 39.3986 |
| TORGrowRate | str | 1.3001 |
| TORGrowRate_Q | str | -5.2336 |
| TotalAdminExpense | str | 3635355263.82 |
| TotalAdminExpense_Q | str | 1781591398.01 |
| TotalOperateRevenuePS | str | 73.8176 |
| TotalOperatingCost | str | 30946044878.08 |
| TotalOperatingCostTTM | str | 59917518486.55 |
| TotalOperatingCost_Q | str | 13753821353.37 |
| TotalOperatingRevenue | str | 92278072083.21 |
| TotalOperatingRevenueTTM | str | 173238481420.149984 |
| TotalOperatingRevenue_Q | str | 37575159697.98 |
| TotalProfeiGrowRate | str | -2.1338 |
| TotalProfeiGrowRate_Q | str | -7.1908 |
| TotalProfit | str | 61438419177.29 |
| TotalProfit_Q | str | 23895169533.27 |
| UndividedProfit | str | 159.7361 |
| type | str | income |
Unified envelope: { ok, endpoint, tier, elapsed_ms, source, data }
Rows live in data; when upstream returns nothing you get ok:false and the call is not counted.
Free endpoints need no key (anonymous 5/min — 250 bars per request, 100k rows per day; solve one PoW challenge for 15/min). Paid tiers: Trial 30 · Standard 120 · Pro 300 · Unlimited 600 per minute; buyout packs are capped by total calls and never expire.
See the error code table →FAQ
General (applies to every endpoint)
Free endpoints do not: health, challenge, quote, kline, hot, market-overview and changedist work anonymously. Paid endpoints do: send Authorization: Bearer <your key>. ⚠️ The anonymous allowance is tiered by caller type: browsers (humans) get 5/min; scripts, SDKs and AI Agents (curl, requests, axios, openai user-agent strings) get 2/min — automated traffic is easier to abuse. Solving one PoW challenge (GET /v1/challenge, then send the X-PoW header) raises it to 15/min regardless of type. ⚠️ Also, anonymous calls are capped at 250 bars per request and 100k rows per day — use an API key for the full 1212 bars or unlimited daily volume.
No. When the upstream fails or returns nothing you get ok:false and the charge for that call is refunded (total_calls / usage_log / ep_log are rolled back together). Only calls that actually returned data count.
Quotes (quote / kline / orderbook / changedist) are real-time or current session; financials, shareholders, dividends and events are within T+1 of source disclosure. Every response carries its own data timestamp — time (HHMM) on intraday bars, date (trading day) on quotes — so you can check exactly which moment a payload reflects.
No. code is a single-value parameter — one stock per call. For batches, issue concurrent calls and respect your tier per-minute limit.
Set up MCP once, then just ask the AI — it calls the endpoint itself. MCP exposes 92 tools covering quotes, financials, screening, sectors and macro.
Related endpoints
Set up MCP once, then just ask the AI — it calls the endpoint itself.