---
title: "Get Historical Gex"
method: GET
path: "/api/gex/historical"
tags: ["GEX"]
---

# Get Historical Gex

`GET /api/gex/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/gex/historical`
- Auth: HTTP bearer

Get historical GEX data.

Each bucket is the last snapshot inside it, up to ``window_units`` buckets
per request (newest first); page further back with ``start_date`` /
``end_date``. Per-strike detail is kept for a shorter window than the
summary, so buckets older than it carry the walls and ``net_gex`` stored
with the snapshot, and ``total_call_gex`` / ``total_put_gex`` are null.

## Query parameters

- `symbol` string
- `start_date` string, nullable
- `end_date` string, nullable
- `window_units` integer
- `timeframe` '1min' | '5min' | '15min' | '1hr' | '1day' | '1hour'

## Response `200`

Successful Response

- GEXSummary[]
  - `timestamp` string, date-time, required
  - `symbol` string, required
  - `spot_price` string, required
  - `total_call_gex` string, nullable, required
  - `total_put_gex` string, nullable, required
  - `net_gex` string, nullable, required
  - `net_gex_at_spot` string, nullable
  - `gamma_flip` string, nullable
  - `gamma_flip_raw` string, nullable
  - `gamma_flip_span_used` string, nullable
  - `flip_distance` string, nullable
  - `local_gex` string, nullable
  - `convexity_risk` string, nullable
  - `max_pain` string, nullable
  - `call_wall` string, nullable
  - `put_wall` string, nullable
  - `call_walls` WallLevel[]
    - `rank` integer, required
    - `label` string, required
    - `strike` string, required
    - `strength` string, nullable
  - `put_walls` WallLevel[]
    - `rank` integer, required
    - `label` string, required
    - `strike` string, required
    - `strength` string, nullable
  - `max_gamma_strike` string, nullable
  - `total_call_oi` integer, nullable
  - `total_put_oi` integer, nullable
  - `put_call_ratio` string, nullable
  - `pin_strike` string, nullable
  - `pin_score` number, nullable
  - `pin_confidence` number, nullable
  - `pin_strike_reason` string, 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)
