Skip to content

Index Endpoints

Query endpoints for stock market index data.

GET /api/v1/index/constituents

Index constituent stocks and weights.

Query Parameters:

ParameterTypeFilter TypeDescription
index_codestringexactIndex code
stock_codestringexactConstituent stock code
sourcestringexactData source
date_fromstringdate rangeStart date
date_tostringdate rangeEnd date

Example:

Terminal window
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:

ParameterTypeFilter TypeDescription
index_codestringexactIndex code
trade_datestringexactTrade date
sourcestringexactData source
date_fromstringdate rangeStart date
date_tostringdate rangeEnd date

GET /api/v1/index/meta

Index metadata (name, compile rule, publish date).

Query Parameters:

ParameterTypeFilter TypeDescription
index_codestringexactIndex code
namestringlikeIndex name (fuzzy)