---
title: "Get Historical Quotes"
method: GET
path: "/api/market/historical"
tags: ["Market Data"]
---

# Get Historical Quotes

`GET /api/market/historical`

## Request

- Base URL: `https://api.zerogex.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.zerogex.io/api/market/historical`
- Auth: HTTP bearer

Get historical quotes.

``delay_minutes`` ends the window at the newest bar at least that old,
however late ``end_date`` asks for (see src/api/delayed_read.py).

## Query parameters

- `symbol` string
- `start_date` string, nullable
- `end_date` string, nullable
- `window_units` integer
- `timeframe` '1min' | '5min' | '15min' | '1hr' | '1day' | '1hour'
- `allow_futures` boolean: Opt-in: when true and outside the cash session, return the cash index's futures bars instead of the (frozen) index series. Only the candlestick chart sets this; index-keyed overlays (gamma heatmap, max-pain, smart-money) leave it false so their price series stays the index.
- `delay_minutes` integer: Serve the newest data that is at least this many minutes old instead of the latest. 0, the default, is the live read.

## Response `200`

Successful Response

- UnderlyingQuote[]
  - `timestamp` string, date-time, required
  - `symbol` string, required
  - `open` string, required
  - `high` string, required
  - `low` string, required
  - `close` string, required
  - `up_volume` integer, nullable
  - `down_volume` integer, nullable
  - `volume` integer, nullable
  - `session` string, nullable
  - `display_source` string, nullable
  - `data_symbol` string, nullable
  - `data_contract` string, nullable
  - `data_contract_expiry` string, date, nullable
  - `futures_close` string, nullable
  - `futures_reference_close` string, nullable
  - `stale` boolean, nullable
  - `data_age_seconds` integer, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/zerogex/apis/zerogex-api.md) · [All operations](https://skmtc.dev/zerogex/apis/zerogex-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zerogex/apis/zerogex-api/revisions/753b26bf0592?raw)
