---
title: "Get Spread History"
method: GET
path: "/api/market/spreads/history"
tags: ["Market Data", "Beta"]
---

# Get Spread History

`GET /api/market/spreads/history`

## 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/spreads/history`
- Auth: HTTP bearer

Trailing daily quoted-width history from the ``daily_spread_stats`` rollup.

This is what turns "spreads are 6.2% wide" into "spreads are wider than
they have been all quarter".  Rows are oldest first.

Sessions whose anchor snapshot was too thin to be a measurement are
omitted and counted in ``excluded_thin_sessions``; a chart should show
the gap rather than a point, because an ingestion outage is not a
session anyone traded.

An empty ``rows`` list is a normal answer on a deployment where neither
the analytics writer nor ``src.tools.daily_spread_stats_backfill`` has
run yet — not an error, and the caller should render the live reading
without a historical verdict rather than an error state.

**Beta** — contract may change.

## Query parameters

- `symbol` string: Underlying symbol
- `option_type` string: C (calls), P (puts) or A (blended chain)
- `days` integer

## Response `200`

Successful Response

- SpreadHistoryResponse
  - `symbol` string, required
  - `option_type` string, required
  - `dte_max` integer, required
  - `moneyness_band_pct` number, required
  - `basis` string
  - `disclosure` string
  - `excluded_thin_sessions` integer
  - `rows` HistoryRow[], required
    - `trading_date` string, date, required
    - `option_type` string, required
    - `spot_price` number, required
    - `contract_count` integer, required
    - `tradable_count` integer, required
    - `two_sided_pct` number, required
    - `zero_bid_pct` number, required
    - `crossed_or_locked_pct` number, required
    - `median_spread` number, nullable
    - `median_relative_spread_pct` number, nullable
    - `p90_relative_spread_pct` number, nullable
    - `median_spread_bps_underlying` number, nullable
    - `p90_spread_bps_underlying` number, 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)
