Skip to content

GET /api/v1/index/constituents

Index constituent stocks and weights.

Returns constituent stocks and their weights for a given market index.

Request

GET /api/v1/index/constituents

Headers

HeaderValue
F-API-KEYYour API key

Query Parameters

ParameterTypeRequiredFilterDescription
index_codestringNoexactIndex code
stock_codestringNoexactConstituent stock code
sourcestringNoexactData source
date_fromstringNorangeStart date
date_tostringNorangeEnd date
limitintegerNoMax rows per page (default 100, max 1000)
offsetintegerNoRows to skip (default 0)
sortstringNoSort field (default update_date)
orderasc | descNoSort direction (default desc)

Example

Terminal window
curl -H "F-API-KEY: fk-xxxxx" \
"https://finance-api.xp-java.workers.dev/api/v1/index/constituents?index_code=000001"

Response

{
"code": 0,
"message": "ok",
"data": [
{
"index_code": "000001",
"stock_code": "600519",
"stock_name": "贵州茅台",
"weight": 5.82,
"update_date": "2024-12-31",
"source": "exchange",
"updated_at": "2024-12-31T15:30:00Z"
}
],
"meta": {
"total": 50,
"limit": 100,
"offset": 0,
"has_more": false
}
}