Index Endpoints
Query endpoints for stock market index data.
GET /api/v1/index/constituents
Index constituent stocks and weights.
Query Parameters:
| Parameter | Type | Filter Type | Description |
|---|---|---|---|
index_code | string | exact | Index code |
stock_code | string | exact | Constituent stock code |
source | string | exact | Data source |
date_from | string | date range | Start date |
date_to | string | date range | End date |
Example:
curl -H "F-API-KEY: fk-xxxxx" \ "https://finance-api.xp-java.workers.dev/api/v1/index/constituents?index_code=000001"GET /api/v1/index/price
Index price and daily return history.
Query Parameters:
| Parameter | Type | Filter Type | Description |
|---|---|---|---|
index_code | string | exact | Index code |
trade_date | string | exact | Trade date |
source | string | exact | Data source |
date_from | string | date range | Start date |
date_to | string | date range | End date |
GET /api/v1/index/meta
Index metadata (name, compile rule, publish date).
Query Parameters:
| Parameter | Type | Filter Type | Description |
|---|---|---|---|
index_code | string | exact | Index code |
name | string | like | Index name (fuzzy) |