Skip to content
OptionData
50% Off First Year
Save 50% on your first year after a 14-day free trial. Create an account to begin; an invitation is required to qualify.

Market Structure API (GEX)

Preparing your API workspace…

API overview and examples
Market structure API

Market Structure API for GEX and Dealer Positioning

Analyze the full option chain through one symbol-level snapshot: Gamma Exposure by strike and expiration, Gamma Flip, call and put walls, Max Pain, IV Rank, IV Percentile, skew, term structure, session flow, and underlying metadata.

gamma exposure apigex apidealer positioning apigamma flipoptions market structure

Ask ChatGPT or Claude Code

Copy this prompt, paste it into ChatGPT, Claude, Claude Code, Cursor, or Codex, then add your question. It tells the model to read our public docs first — no API key needed for that step.

You are helping me use OptionData (https://www.optiondata.io/), an OPRA-licensed U.S. equity options data API.

Before answering, fetch these public files (no login required) and treat them as the source of truth:
- https://www.optiondata.io/llms.txt — short product map (same content as https://www.optiondata.io/llm.txt)
- https://www.optiondata.io/llms-full.txt — full API reference
- https://www.optiondata.io/openapi.json — HTTP OpenAPI

Do not invent endpoints, fields, tables, or limits. Prefer `Authorization: Bearer apikey_…` for HTTP APIs. Realtime uses `wss://ws.optiondata.io` with a `token` query parameter.

Products:
- Realtime trades WebSocket: wss://ws.optiondata.io
- Historical SQL: POST https://www.optiondata.io/api/historical/sql
- Option chain: POST https://www.optiondata.io/api/option-chain
- Market structure: GET https://www.optiondata.io/api/v1/market-structure/{symbol}

I am asking about: Market Structure API (GEX)
- Product / playground page: https://www.optiondata.io/market_structure/
- Markdown: https://www.optiondata.io/md/market-structure-api/
- HTML docs: https://www.optiondata.io/docs/market-structure-api/

My question:

GEX by strike and expiration

Use signed call and put Gamma Exposure across the full chain without rebuilding strike aggregates in every client.

Positioning levels and volatility context

Read Gamma Flip, GEX and OI walls, Max Pain, IV Rank, IV Percentile, skew, butterfly, and term slope together.

Self-contained symbol snapshots

Each response includes prices, volume, market cap, underlying classification, session flow, freshness timestamps, and structure.

Best for

  • GEX maps and dealer-positioning dashboards
  • Flyagonal, iron-condor, and butterfly research
  • 0DTE and weekly structure monitoring
  • Volatility-regime and level screens

Common API questions

How is Market Structure different from Option Chain?

Option Chain returns contract-level quotes and Greeks with filters. Market Structure returns a precomputed, full-chain symbol snapshot for positioning, volatility, and level analysis.

Does dealer positioning represent reported dealer inventory?

No. The endpoint applies a documented dealer-short-put signing convention to open-interest Gamma Exposure. It is a structural model, not a report of any dealer’s actual book.

Can I request historical market-structure snapshots?

Yes. Add date=YYYY-MM-DD when that retained snapshot is available, or omit date to request the active snapshot.

Can I derive net GEX and put/call OI from the response?

Yes. The market-structure docs show how to derive those from the snapshot. This page does not restate the formulas.

How market structure snapshots work

GET /api/v1/market-structure/:symbol with Authorization: Bearer YOUR_API_KEY. Optional date=YYYY-MM-DD selects a retained historical snapshot; omit date for the active snapshot.

Each response is a symbol-level snapshot: structure levels, volatility context, and a lightweight session-flow overlay, with as-of timestamps. Field-level schema is in the market-structure docs.

Dealer positioning is a signed structural model on open-interest gamma — not a disclosed dealer book. Use Option Chain when you need filterable contract quotes; use Market Structure for precomputed levels.

Market structure (GEX) API reference · All API docs · openapi.json

Example: SPY structure snapshot
curl 'https://www.optiondata.io/api/v1/market-structure/SPY' \
  -H 'Authorization: Bearer YOUR_API_KEY'

Request and response schema

Field names, types, filters, limits, and error codes live in the public API reference. This product page does not keep a second copy of the schema.

Market structure (GEX) API reference · openapi.json