# Stock market index API

> Index levels and decades of daily history for the S&P 500, Dow Jones, Nasdaq, Russell 2000, VIX and world benchmarks, plus index option chains, over one API key.

Canonical page: https://stockdataapi.com/index-api

- Symbol format: `^GSPC`: a caret, then the index code
- Quote freshness: About a minute in market hours
- Source delay: Most US indices real time; `^VIX` and `^FTSE` 15 minutes late
- Daily history: `^GSPC` from 1985, `^VIX` from 1990, `^DJI` from 1992
- Options: Index option chains, such as `^SPX`

## Symbol format

Indices start with a caret: `^GSPC` is the S&P 500 and `^DJI` the Dow Jones Industrial Average. Encode the caret as `%5E` in a URL. An index is a level rather than something you can buy; for a tradable proxy, request an ETF such as `SPY` from the same endpoints.

| Symbol | What it is |
| --- | --- |
| `^GSPC` | S&P 500 |
| `^DJI` | Dow Jones Industrial Average |
| `^IXIC` | Nasdaq Composite |
| `^RUT` | Russell 2000 |
| `^VIX` | Cboe Volatility Index |
| `^TNX` | 10-year Treasury yield |
| `^FTSE` | FTSE 100 |
| `^N225` | Nikkei 225 |
| `^STOXX50E` | EURO STOXX 50 |

## Endpoints

- [Quote API](https://stockdataapi.com/docs/quote.md), `GET /v6/finance/quote`: Index levels, change and day range for a batch of indices.
- [Chart API: OHLCV history](https://stockdataapi.com/docs/chart.md), `GET /v8/finance/chart/{symbol}`: Decades of daily history plus intraday bars. Volume where the source reports it: `^GSPC` has it, `^VIX` does not.
- [Spark API: close-price series](https://stockdataapi.com/docs/spark.md), `GET /v8/finance/spark`: Close-only series for index tiles.
- [Market summary API](https://stockdataapi.com/docs/market-summary.md), `GET /v6/finance/quote/marketSummary`: The headline index tiles for a region in one call.
- [Options chain API](https://stockdataapi.com/docs/options.md), `GET /v7/finance/options/{symbol}`: Index option chains, such as `^SPX` for S&P 500 options.

## Example request

```bash
curl -H "x-api-key: $KEY" "https://api.stockdataapi.com/v6/finance/quote?symbols=%5EGSPC,%5EDJI,%5EIXIC,%5EVIX"
```

## Example response

```json
{
  "quoteResponse": {
    "result": [
      {
        "symbol": "^GSPC",
        "shortName": "S&P 500",
        "quoteType": "INDEX",
        "currency": "USD",
        "marketState": "REGULAR",
        "regularMarketPrice": 7376.86,
        "regularMarketChangePercent": 0.3145,
        "exchangeDataDelayedBy": 0
      },
      {
        "symbol": "^VIX",
        "shortName": "CBOE Volatility Index",
        "quoteType": "INDEX",
        "currency": "USD",
        "marketState": "REGULAR",
        "regularMarketPrice": 25.64,
        "regularMarketChangePercent": -9.0135,
        "exchangeDataDelayedBy": 15
      }
    ],
    "error": null
  }
}
```

## Good to know

- Each quote's `exchangeDataDelayedBy` gives the source's delay in minutes: 0 for `^GSPC` and `^IXIC`, 15 for `^VIX` and `^FTSE`.
- `^GSPC` is the index level; S&P 500 index options are listed under `^SPX`.
- Bars follow each index's own exchange calendar and timezone, so a `^N225` day is a Tokyo trading day.

## Questions

### How do I get S&P 500 data from the API?

Request `^GSPC`, encoded as `%5EGSPC` in a URL, from the quote endpoint for the latest level or the chart endpoint for history. S&P 500 index options are under `^SPX`.

### Is index data real time?

Most US indices arrive in real time at the source; a few, such as `^VIX` and `^FTSE`, arrive 15 minutes late. Each quote's `exchangeDataDelayedBy` field gives the delay in minutes.

### How far back does index history go?

Daily bars start in 1985 for the S&P 500 (`^GSPC`), 1990 for the VIX and 1992 for the Dow Jones (`^DJI`).

### Which world indices are covered?

Benchmarks the source quotes, including the FTSE 100 (`^FTSE`), Nikkei 225 (`^N225`) and EURO STOXX 50 (`^STOXX50E`), each on its own exchange's calendar.