Double 11 annual ¥1,699/yrView
Pro endpoint · Pro

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

ProGET /v1/finance
Signature
GET /v1/finance?code=sh600667&num=4
One-liner
curl "https://api.ashareapi.com/v1/finance?code=sh600667&num=4&key=YOUR_KEY"
Parameters: code * · num* = required

Quick start

Replace the key below with yours (free endpoints need no key):

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

Parameters

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)

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

Located in: data[][]Envelope: ok / endpoint / tier / elapsed_ms / sourceProbed: 2026-10-20
FieldTypeReal sample value
codestrsh600519
EndDatestr2026-06-30
InfoPublDatestr2026-08-15
BasicEPSstr35.57
BasicEPSYOYstr-1.686
CapitalSurplusFundPSstr0.0013
DilutedEPSstr35.57
DilutedEPSYOYstr-1.686
DividendTTMstr65033211845.95
EBITstr61192879672.31
EPSstr35.6112
EPSTTMstr65.1429
EPS_Qstr13.81859
EnterpriseTypestr一般企业
FinancialExpensestr-243237716.96
FinancialExpense_Qstr-127434381.98
GrossIncomeRatiostr89.5552
GrossIncomeRatioTTMstr90.2507
GrossIncomeRatio_Qstr89.4797
GrossProfitTTMstr153563460009.570016
MainIncomePSstr72.5579
MainProfitProportionstr99.9558
NPDeductNonRecurringPLstr44464207646.01
NPPCCGrowRate3Ystr7.3543
NPParentCompanyCutYOYstr-2.0402
NPParentCompanyCutYOY_Qstr-7.09
NPParentCompanyOwnersstr44516880421.86
NPParentCompanyOwnersTTMstr81433985225.44
NPParentCompanyOwners_Qstr17274367535.41
NPParentCompanyYOYstr-1.9516
NPParentCompanyYOY_Qstr-6.9043
NetProfitRatiostr50.7516
NetProfitRatioTTMstr49.5774
ORComGrowRate3Ystr9.2415
OperProfitGrowRatestr-2.163
OperProfitGrowRate_Qstr-7.2208
OperatingCoststr9473762565.88
OperatingCostTTMstr16588549052.86
OperatingCost_Qstr3953033365.56
OperatingExpensestr3206308341.53
OperatingExpense_Qstr1600543576.65
OperatingProfitstr61411291686.27
OperatingProfitTTMstr113451268476.14
OperatingProfit_Qstr23874282999.85
OperatingRevenuestr90703260964.48
OperatingRevenueGrowRatestr1.4699
OperatingRevenueGrowRate_Qstr-5.1417
OperatingRevenuePSTTMstr136.1127
OperatingRevenueTTMstr170152009062.429984
OperatingRevenue_Qstr36794008743.97
RAndDstr114926219.60
RAndD_Qstr55615495.14
ROAstr15.0218
ROATTMstr27.2955
ROEstr17.7179
ROECutstr17.6969
ROECut_Qstr6.855314
ROETTMstr32.4111
ROEWeightedstr16.75
ROE_Qstr6.8753
ROICstr16.3748
RetainedEarningsPSstr199.1347
RoeYOYstr-6.8713
RoeYOY_Qstr-11.5754
SecuCodestrsh600519
SurplusReserveFundPSstr39.3986
TORGrowRatestr1.3001
TORGrowRate_Qstr-5.2336
TotalAdminExpensestr3635355263.82
TotalAdminExpense_Qstr1781591398.01
TotalOperateRevenuePSstr73.8176
TotalOperatingCoststr30946044878.08
TotalOperatingCostTTMstr59917518486.55
TotalOperatingCost_Qstr13753821353.37
TotalOperatingRevenuestr92278072083.21
TotalOperatingRevenueTTMstr173238481420.149984
TotalOperatingRevenue_Qstr37575159697.98
TotalProfeiGrowRatestr-2.1338
TotalProfeiGrowRate_Qstr-7.1908
TotalProfitstr61438419177.29
TotalProfit_Qstr23895169533.27
UndividedProfitstr159.7361
typestrincome
Response

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.

Rate limits & quota

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)

Do these endpoints need an API key?

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.

Am I charged when the upstream returns nothing or errors?

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.

How fresh is the data?

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.

Can I request several stocks in one call?

No. code is a single-value parameter — one stock per call. For batches, issue concurrent calls and respect your tier per-minute limit.

How do I use this from Claude / Cursor / ChatGPT?

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.

Use it from an AI Agent?

Set up MCP once, then just ask the AI — it calls the endpoint itself.

← Back to the full endpoint reference