Skip to content

Learn about the Finance API architecture and capabilities.

Base URL

https://finance-api.xp-java.workers.dev

All API requests are served over HTTPS.

API Groups

Query APIs

The query APIs provide read-only access to financial datasets. All endpoints are prefixed with /api/v1/ and require the F-API-KEY header.

CategoryEndpointsDescription
ETF/api/v1/etf/*Basic info, NAV, price, size, flow, holdings, PCF, holders, dividend, cross-border, kline
A-Share/api/v1/stock/*Spot data, financials, Shenwan industry classification
Index/api/v1/index/*Constituents, price history, metadata
Macro & Market/api/v1/macro/*, /api/v1/market/*Economic indicators, margin trading, Stock Connect flows
US Stocks/api/v1/us/*Companies, SEC filings, financial facts, statements, metrics, insider trades, 13F holdings

Response Format

Query APIs return a consistent envelope:

{
"code": 0,
"message": "ok",
"data": [],
"meta": {
"total": 0,
"limit": 100,
"offset": 0,
"has_more": false
}
}
FieldDescription
code0 indicates success; non-zero values indicate errors
messageHuman-readable status description
dataArray of result records
meta.totalTotal matching records
meta.limitRows returned in this request
meta.offsetRows skipped
meta.has_moreWhether more pages are available

Features

  • API Key Authentication — Secure per-key access with SHA-256 hashing
  • Quota Management — Daily and monthly request limits per API key
  • Rate Limiting — Automatic 429 responses when quotas are exceeded
  • Usage Logging — Per-endpoint usage tracking for analytics