Early access is open. Free sample datasets are live now. Download a sample

API Reference: Index Levels

Details

Docs navigation

The index endpoints return the level of a benchmark over time: S&P 500, Nasdaq-100, Dow Jones Industrial Average, Russell 2000, the VIX family and more. This index data API endpoint reference covers historical bars, the latest level and the list of indices we carry, plus the licensing limits that decide how fresh index values can be on each plan.

Early access. Planned v1 endpoints, not live yet. Free: end-of-day levels for about 20 major indices, 1 year. Starter ($29/mo): full daily history and 15-minute delayed levels. Pro ($79/mo): 1-minute bar history. Real-time S&P, Nasdaq and Cboe values are Enterprise only, because the index owners' licence fees are higher than our other plans can carry.

Details

Index bars

GET https://api.marketdata.co/v1/indices/bars

Parameters

Name Type Required Default Description
symbol string yes Index code: SPX, NDX, DJI, RUT, VIX
interval string no 1d 1m, 5m, 15m, 1h, 1d
start, end string no 1 year Dates or UTC timestamps
limit, cursor, format no Paging and output

Response fields

Field Type Description
symbol string Index code
name string e.g. S&P 500
interval string Bar size
timestamp / date string Intraday bar start (UTC) or session date
open, high, low, close number Index points
volume number Only where the provider publishes one (optional)
previous_close number Prior session close (optional)
change, change_percent number Versus previous close (optional)
currency string Index currency (optional)
provider string Index owner, e.g. S&P Dow Jones Indices (optional)
is_official boolean False for derived or CFD values

Example

Example (curl):

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.marketdata.co/v1/indices/bars?symbol=SPX&interval=1d&start=2020-01-01"

Example (Python), SPX drawdown from its running high:

import os
import requests
import pandas as pd

r = requests.get(
    "https://api.marketdata.co/v1/indices/bars",
    headers={"Authorization": f"Bearer {os.environ['MARKETDATA_API_KEY']}"},
    params={"symbol": "SPX", "interval": "1d", "start": "2000-01-01", "limit": 50000},
)
spx = pd.DataFrame(r.json()["results"]).set_index("date")["close"]
drawdown = spx / spx.cummax() - 1
print(drawdown.min())

Example response

Values are illustrative, not real index levels:

{
  "status": "ok",
  "count": 1,
  "next_cursor": null,
  "results": [
    {
      "symbol": "SPX",
      "name": "S&P 500",
      "interval": "1d",
      "date": "2026-11-18",
      "open": 6702.14,
      "high": 6741.88,
      "low": 6688.30,
      "close": 6725.42,
      "previous_close": 6699.07,
      "change": 26.35,
      "change_percent": 0.3933,
      "currency": "USD",
      "provider": "S&P Dow Jones Indices",
      "is_official": true
    }
  ]
}

Details

Latest level

GET https://api.marketdata.co/v1/indices/latest?symbols=SPX,NDX,VIX

Returns one record per index with symbol, name, timestamp, level, previous_close, change, change_percent, is_delayed and is_official. Delayed by 15 minutes on Starter and up; end of day on Free.

Details

Index list

GET https://api.marketdata.co/v1/indices/list returns every index we carry with symbol, name, provider, currency and the earliest date we hold. For index members and weights, see index constituents data.

API

Errors for these endpoints

HTTP error.code When
400 invalid_symbol_format ^GSPC, $SPX or I:SPX; send SPX
403 plan_required Intraday bars below Pro, history beyond 1 year on Free, real-time levels below Enterprise
404 symbol_not_found Index we do not carry

Watch out

Notes and gotchas

  • An index is a calculation, not a traded instrument. There is no bid, ask or real volume. Use SPY or the ES future for tradable prices.
  • is_official: false marks values that come from derived or CFD sources. Keep those out of anything you publish as the index level.
  • Index levels are price returns. Dividends are not included, so long-run comparisons with a total-return stock series will look worse.
  • The first intraday print of the day is often stale, because some members have not opened yet. Treat the first minute of the open with care.
  • VIX is calculated from SPX option prices and has its own history with methodology changes. See VIX historical data.
  • One index's full daily history is also sold as a file for $19. See dataset downloads.

Keep reading

Next steps

Details

Was this page useful?

[Yes] [No]

Missing an index? Tell us on the custom data form.