ZeroGEX Replay (v2) API

The Replay (v2) API from ZeroGEX, for replay (v2).

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 5

GET /api/v2/replay/sessions Api V2 Replay Sessions Get #
GET /api/v2/replay/frame Api V2 Replay Frame Get #
GET /api/v2/replay/range Api V2 Replay Range Get #
GET /api/v2/replay/diff Api V2 Replay Diff Get #
POST /api/v2/replay/clip Api V2 Replay Clip Post #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/zerogex-io:zerogex-io-replay-v2-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

zerogex-io-replay-v2-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: ZeroGEX Replay (v2) API
  description: 'Real-time options analytics API.


    **Two versions are served.**


    * **v2 (recommended)** — `/api/v2/*`. Every endpoint returns `{"data": ..., "freshness": {...}}`, where the `freshness` block reports response evaluation time, the underlying data''s source timestamp, the market session, the expected update cadence, and a rolled-up `freshness_status` — so endpoint health and data age are separate, machine-readable facts on every response.

    * **v1 (stable)** — `/api/*` and `/api/v1/levels/*`. Unchanged and supported; `data` in a v2 response is byte-for-byte the v1 body.


    See "API versions & the freshness envelope" in API_Guide.md for the field contract and the per-endpoint cadence table.'
  version: 2.0.0
tags:
- name: Replay (v2)
paths:
  /api/v2/replay/sessions:
    get:
      tags:
      - Replay (v2)
      summary: Api V2 Replay Sessions Get
      description: 'Recent trading days with replayable GEX data for the symbol.


        Used by the /replay date picker. Bar-count is the number of

        ``gex_summary`` rows in the cash session (09:30–15:59 ET) — a full

        session is 390 minutes; partial sessions surface as such.


        ``has_strikes`` is ``False`` for a session whose per-strike rows have aged

        out (``gex_by_strike`` is pruned at DATA_RETENTION_DAYS; ``gex_summary`` is

        not), so it replays the levels and candles without a strike profile.

        ``None`` when the retention horizon couldn''t be read.'
      operationId: api_v2_replay_sessions_get
      security:
      - HTTPBearer: []
      parameters:
      - name: symbol
        in: query
        required: false
        schema:
          type: string
          maxLength: 10
          default: SPY
          title: Symbol
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 180
          minimum: 1
          default: 30
          title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Envelope_Any_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v2/replay/frame:
    get:
      tags:
      - Replay (v2)
      summary: Api V2 Replay Frame Get
      description: 'Single per-minute replay frame at-or-before ``ts``.


        Combines the gex_summary headline (spot/walls/flip/max-pain) with the

        per-strike GEX bars for the same minute. Optimised for the scrubber:

        ≤100 ms target so a fast drag feels fluid.'
      operationId: api_v2_replay_frame_get
      security:
      - HTTPBearer: []
      parameters:
      - name: symbol
        in: query
        required: false
        schema:
          type: string
          maxLength: 10
          default: SPY
          title: Symbol
      - name: ts
        in: query
        required: true
        schema:
          type: string
          description: ISO-8601 timestamp to render.
          title: Ts
        description: ISO-8601 timestamp to render.
      - name: strike_limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 4000
          minimum: 10
          default: 60
          title: Strike Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Envelope_Any_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v2/replay/range:
    get:
      tags:
      - Replay (v2)
      summary: Api V2 Replay Range Get
      description: 'All replay frames for one session — bundled for the playhead buffer.


        Returns per-minute ``gex_summary`` + ``gex_by_strike`` bars for the

        requested ET session date so a single round-trip pre-warms an entire

        session into the browser. The scrubber then renders locally without

        a per-frame fetch.


        ``strike_band_pct`` filters strikes to a ±band around each bar''s

        spot so the payload stays bounded — a full-chain SPX session would

        be ~40k rows otherwise. Default 4% covers the strikes that actually

        matter for a same-day dealer-positioning view.


        ``timeframe`` is accepted but currently ignored: we always return

        1-min frames. 5-min / 15-min down-sampling is a v2 optimization

        when payload size becomes a real problem.


        ``include_expirations`` opts into the per-strike expiration mix that

        drives the scrubber''s expiry colour gradient. Each strike then also

        carries ``call_shares`` / ``put_shares`` — fractions summing to 1,

        aligned positionally to the response''s top-level ``expirations`` legend

        (nearest-first, with a trailing "far" slot when the chain runs deeper

        than ``max_expirations``). Shares only ever SUBDIVIDE the call/put totals

        already in the payload, so a client that ignores them renders exactly what

        it renders today. Off by default because it costs a second session-wide

        scan and grows the bundle; callers that only need the aggregate ladder

        (e.g. the pair-comparison scrubber) should leave it off.


        ``expirations`` scopes the session. ``0dte`` — the case the replay exists

        for — is the session''s own expiry: on ``/replay/SPY/2026-09-15`` that is

        2026-09-15, resolved from the requested date rather than from today, so a

        shared link keeps meaning what it meant. Under a scope every per-strike

        bar carries only those expirations, and ``call_wall`` / ``put_wall`` /

        ``gamma_flip`` / ``max_pain`` are re-derived from that same filtered book

        (the stored ones are whole-chain and would describe bars that aren''t on

        screen). ``pin_strike`` / ``pin_confidence`` and ``max_gamma_strike`` do

        NOT move with the scope — both are whole-chain by definition, exactly as

        they behave under ``/api/gex/strike-profile-timeseries``''s filter and in

        the live charts'' Expiry selector. The response echoes the resolved scope

        as ``expiration_filter`` (``null`` for All) so a client never has to infer

        what it got.


        A scoped session with no matching contracts (0DTE on a day the chain had

        no same-day expiry) returns its frames with EMPTY ladders and null levels

        rather than silently falling back to the whole chain — "all expirations" is

        the one answer a 0DTE request must not quietly become.


        ``has_strikes`` is ``False`` when the session''s per-strike rows have aged

        out of ``gex_by_strike`` (pruned at DATA_RETENTION_DAYS; ``gex_summary`` is

        kept), so every ladder is empty under any scope while the whole-chain

        levels and candles remain. It is whole-chain whatever the scope, which is

        what lets a client tell an aged-out session from a scope with no

        contracts — both come back as empty ladders. ``None`` when the session

        has no frames or the retention horizon couldn''t be read.'
      operationId: api_v2_replay_range_get
      security:
      - HTTPBearer: []
      parameters:
      - name: symbol
        in: query
        required: false
        schema:
          type: string
          maxLength: 10
          default: SPY
          title: Symbol
      - name: date
        in: query
        required: true
        schema:
          type: string
          description: Trading day YYYY-MM-DD (ET).
          title: Date
        description: Trading day YYYY-MM-DD (ET).
      - name: timeframe
        in: query
        required: false
        schema:
          type: string
          pattern: ^(1min|5min|15min)$
          default: 1min
          title: Timeframe
      - name: strike_band_pct
        in: query
        required: false
        schema:
          type: number
          maximum: 0.1
          minimum: 0.005
          default: 0.04
          title: Strike Band Pct
      - name: include_expirations
        in: query
        required: false
        schema:
          type: boolean
          description: 'Attach the per-strike expiration mix (shares) so a client can colour-grade each bar by time-to-expiry. Off by default: it is a second session-wide scan and it grows the payload.'
          default: false
          title: Include Expirations
        description: 'Attach the per-strike expiration mix (shares) so a client can colour-grade each bar by time-to-expiry. Off by default: it is a second session-wide scan and it grows the payload.'
      - name: max_expirations
        in: query
        required: false
        schema:
          type: integer
          maximum: 12
          minimum: 1
          default: 6
          title: Max Expirations
      - name: expirations
        in: query
        required: false
        schema:
          type: string
          description: 'Expiration scope for the whole session: ''all'' (default, every expiration aggregated), ''0dte'' (the session''s own expiry), or a comma-separated list of YYYY-MM-DD dates. Under a scope the ladder carries only those expirations and the walls / flip / max pain are re-derived from it.'
          default: all
          title: Expirations
        description: 'Expiration scope for the whole session: ''all'' (default, every expiration aggregated), ''0dte'' (the session''s own expiry), or a comma-separated list of YYYY-MM-DD dates. Under a scope the ladder carries only those expirations and the walls / flip / max pain are re-derived from it.'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Envelope_Any_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v2/replay/diff:
    get:
      tags:
      - Replay (v2)
      summary: Api V2 Replay Diff Get
      description: 'Strike-by-strike net GEX delta between two replay timestamps.


        Powers the two-pin diff overlay: drop a ''before'' marker and an

        ''after'' marker on the scrubber and the result is a red/green bar

        chart of which strikes dealers re-hedged into / out of in between.


        ``net_gex_a`` / ``net_gex_b`` are each strike''s TOTAL across every

        expiration at that minute: the figure the live ladder shows, and what

        ``/api/replay/frame``''s per-expiration rows add up to. (Until 2026-11 each

        strike kept one arbitrary expiration''s row instead.) ``strike_limit``

        picks the strikes nearest each minute''s own spot, and the response covers

        both windows: a strike only one window reached is read at the other minute

        too, so its delta is a real change rather than the edge of a window that

        moved with price.'
      operationId: api_v2_replay_diff_get
      security:
      - HTTPBearer: []
      parameters:
      - name: symbol
        in: query
        required: false
        schema:
          type: string
          maxLength: 10
          default: SPY
          title: Symbol
      - name: ts_a
        in: query
        required: true
        schema:
          type: string
          description: ISO-8601 'before' timestamp.
          title: Ts A
        description: ISO-8601 'before' timestamp.
      - name: ts_b
        in: query
        required: true
        schema:
          type: string
          description: ISO-8601 'after' timestamp.
          title: Ts B
        description: ISO-8601 'after' timestamp.
      - name: strike_limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 200
          minimum: 10
          description: How many strikes nearest each minute's spot to compare. Counts strikes, each summed across all of its expirations.
          default: 60
          title: Strike Limit
        description: How many strikes nearest each minute's spot to compare. Counts strikes, each summed across all of its expirations.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Envelope_Any_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v2/replay/clip:
    post:
      tags:
      - Replay (v2)
      summary: Api V2 Replay Clip Post
      description: 'MP4 export of a replay window — v2 feature, not yet deployed.


        The server-side renderer is intentionally not shipped in v1: a real

        Playwright + ffmpeg worker is needed for cross-browser-compatible

        MP4 generation, and the additional deployment / storage surface is

        out of scope for the first replay release. The endpoint exists so

        clients can feature-detect; until the worker lands this returns 503

        with a stable, machine-readable status string.'
      operationId: api_v2_replay_clip_post
      responses:
        '503':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Envelope_Any_'
      security:
      - HTTPBearer: []
components:
  schemas:
    Freshness:
      properties:
        evaluated_at:
          type: string
          format: date-time
          title: Evaluated At
          description: 'When the API evaluated this response (server wall clock, UTC). Endpoint-health signal: advances on every request even when the underlying data is unchanged.'
        generated_at:
          type: string
          format: date-time
          title: Generated At
          description: When the served data was computed. Equals the snapshot stamp for cycle-backed endpoints, or evaluated_at for endpoints computed on demand for this request.
        source_timestamp:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Source Timestamp
          description: Timestamp of the upstream market observation the payload derives from. This is what freshness_status is measured against. Null when the endpoint has no upstream feed or returned no rows.
        latest_event_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Latest Event At
          description: Newest event timestamp present in the payload (last bar, last trade, last scored row). Best-effort on very large responses, which are sampled rather than fully walked.
        age_seconds:
          anyOf:
          - type: number
          - type: 'null'
          title: Age Seconds
          description: evaluated_at - source_timestamp, in seconds. Null when source_timestamp is null.
        market_session_status:
          type: string
          title: Market Session Status
          description: pre-market | regular | after-hours | closed (US/Eastern).
        expected_update_cadence:
          anyOf:
          - type: string
          - type: 'null'
          title: Expected Update Cadence
          description: ISO-8601 duration for how often this endpoint's data is expected to change right now, e.g. PT60S. Null means no updates are expected (weekend, holiday, or a feed that only runs during the session).
        expected_update_cadence_seconds:
          anyOf:
          - type: number
          - type: 'null'
          title: Expected Update Cadence Seconds
          description: expected_update_cadence as a number of seconds.
        cadence_profile:
          type: string
          title: Cadence Profile
          description: Identifier of the cadence class this endpoint belongs to, e.g. analytics_cycle. Stable across releases; the seconds behind it may be retuned.
        stale_after:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Stale After
          description: Instant after which this payload should be treated as stale. Null whenever expected_update_cadence is null.
        freshness_status:
          $ref: '#/components/schemas/FreshnessStatus'
          description: fresh | aging | stale | session_closed | static | unknown.
      type: object
      required:
      - evaluated_at
      - generated_at
      - market_session_status
      - cadence_profile
      - freshness_status
      title: Freshness
      description: The v2 freshness envelope. Present on every ``/api/v2/*`` response.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    FreshnessStatus:
      type: string
      enum:
      - fresh
      - aging
      - stale
      - session_closed
      - static
      - unknown
      title: FreshnessStatus
      description: "The rolled-up freshness verdict for one response.\n\n``fresh``\n    ``source_timestamp`` is within one expected update cadence.\n``aging``\n    Past one cadence but not yet past ``stale_after`` — the grace band\n    that absorbs normal cycle jitter.  Not an error; a client that\n    polls faster than the cadence sees this routinely.\n``stale``\n    Past ``stale_after`` while updates *were* expected.  This is the\n    actionable state: the feed behind this endpoint is late.\n``session_closed``\n    A feed-backed endpoint whose feed is not due to produce anything\n    right now (weekend, holiday, or a feed that only runs during the\n    session).  The payload is the last good value — deliberately NOT\n    reported as ``stale``, because an overnight consumer polling a\n    closed market is not observing a fault and should not page on it.\n``static``\n    The endpoint is not feed-backed at all: completed history, or a\n    result computed from the caller's own inputs.  Age here carries no\n    health meaning and never becomes a fault.\n``unknown``\n    No source timestamp could be resolved from the payload (e.g. a\n    pure calculator, an admin endpoint, or an empty result set).  A\n    consumer should fall back to ``evaluated_at`` for endpoint health\n    and make no claim about data age."
    Envelope_Any_:
      properties:
        data:
          title: Data
        freshness:
          $ref: '#/components/schemas/Freshness'
      type: object
      required:
      - data
      - freshness
      title: Envelope[Any]
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
      bearerFormat: API-Key