Skip to content

Query API Overview

Authentication and common patterns for the Finance API query endpoints.

Authentication

All query endpoints require an API key via the F-API-KEY header.

F-API-KEY: fk-xxxxx

Obtain an API key from the dashboard.

Rate Limiting

Requests are subject to per-key rate limits based on the quotas configured for your key.

Common Query Parameters

Every query endpoint supports the following parameters:

ParameterTypeDefaultDescription
limitinteger100Max rows per page (max 1000)
offsetinteger0Number of rows to skip
sortstringendpoint-specificField to sort by
orderasc | descendpoint-specificSort direction

Filtering

Exact match filters vary by endpoint. Pass the field name and value as query parameters:

GET /api/v1/etf/basic?code=510300&exchange=SH

Like (fuzzy) filters support partial matches using SQL LIKE %value%:

GET /api/v1/etf/basic?name=沪深300

Date range filters use date_from and date_to on endpoints that support time-series data:

GET /api/v1/etf/nav?code=510300&date_from=2024-01-01&date_to=2024-01-31

Response Format

All query endpoints return a unified JSON structure:

{
"code": 0,
"message": "ok",
"data": [...],
"meta": {
"total": 1250,
"limit": 100,
"offset": 0,
"has_more": true
}
}
FieldDescription
code0 means success; non-zero indicates an error
messageHuman-readable status message
dataArray of result rows
meta.totalTotal matching rows (ignoring pagination)
meta.limitRows returned in this request
meta.offsetCurrent offset
meta.has_moreWhether more results exist

Endpoint Categories

  • ETF — ETF basic info, NAV, price, size, flow, holdings, PCF, dividends, kline
  • A-Share — Stock spot data, financials, industry classification
  • Index — Index constituents, price, metadata
  • Macro & Market — Macro indicators, margin trading, HK Stock Connect flows
  • US Stocks — US companies, SEC filings, financial facts, insider trades, 13F holdings