NSE Indices

NSE index API endpoints for listings, historical data, and rolling returns.

All NSE index endpoints are under /api/nse/ and require the x-api-token header.

List All Index Types

Returns NSE index types (Broad Market, Sectoral, Thematic, etc.).

  • Method: GET
  • URL: /api/nse/list_all_index_type
  • Auth: Required
curl -s https://api.indvested.com/api/nse/list_all_index_type \
  -H "x-api-token: YOUR_TOKEN"
[
  { "recordID": 1, "name": "Broad Market", "updatedAt": "2026-02-06T10:00:00Z" }
]

List All Indices

Returns a lite listing of all NSE indices with metadata. Pre-computed and cached.

  • Method: GET
  • URL: /api/nse/list_all_indices
  • Auth: Required
curl -s https://api.indvested.com/api/nse/list_all_indices \
  -H "x-api-token: YOUR_TOKEN"

Get Historical Data

Returns historical OHLC data for a single NSE index as a streaming CSV download.

  • Method: GET
  • URL: /api/nse/get_historical_data/<index_id>
  • Auth: Required

URL parameters:

ParameterTypeDescription
index_idintNSE index ID (from list_all_indices)
curl -s https://api.indvested.com/api/nse/get_historical_data/1 \
  -H "x-api-token: YOUR_TOKEN" \
  -o nifty50_historical.csv

CSV columns:

ColumnDescription
record_idRow identifier
index_idNSE index ID
index_nameIndex name (e.g., “NIFTY 50”)
dateDate (YYYY-MM-DD)
openOpening value
highDay high
lowDay low
closeClosing value
market_directionup or down
absolute_rangeHigh minus low

Get Rolling Return Data

Returns rolling return data, summary statistics, and metrics for a single index. Pre-computed and cached.

  • Method: GET
  • URL: /api/nse/get_rolling_return_data/<index_id>
  • Auth: Required

URL parameters:

ParameterTypeDescription
index_idintNSE index ID
curl -s https://api.indvested.com/api/nse/get_rolling_return_data/1 \
  -H "x-api-token: YOUR_TOKEN"

Response includes rolling return summary by duration (1Y, 3Y, 5Y, 7Y, 10Y, 12Y, 15Y) with meanReturn, bestReturn, worstReturn, percentOfWindowsWithPositiveReturn, and per-window data.


Get Present Index Status Metrics

Returns current rolling return summaries and metrics for all NSE indices.

  • Method: GET
  • URL: /api/nse/get_present_index_status_metrics
  • Auth: Required
curl -s https://api.indvested.com/api/nse/get_present_index_status_metrics \
  -H "x-api-token: YOUR_TOKEN"

Returns an array of index objects, each containing rolling return summary by duration and present level metrics.