Base URL
https://finance-api.xp-java.workers.devAll 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.
| Category | Endpoints | Description |
|---|---|---|
| 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 }}| Field | Description |
|---|---|
code | 0 indicates success; non-zero values indicate errors |
message | Human-readable status description |
data | Array of result records |
meta.total | Total matching records |
meta.limit | Rows returned in this request |
meta.offset | Rows skipped |
meta.has_more | Whether 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