跳到主要内容

Docs/Market Structure API (GEX)

API reference

Market Structure API (GEX)

GET /api/v1/market-structure/:symbol reference: structural Gamma Exposure, intraday GEX, Gamma Flip, walls, Max Pain, IV context, session flow, and symbol metadata.

Open productMarkdown
On this page

The Market Structure API returns a precomputed, symbol-level snapshot of full-chain dealer-positioning structure (GEX), open interest walls, Max Pain, volatility context, and five-minute session flow plus intraday GEX summaries.

Text
GET https://www.optiondata.io/api/v1/market-structure/:symbol

Included with the realtime plan (trialing or active). Authenticate with a signed API key.

Authentication

Send your API key as:

HTTP
Authorization: Bearer YOUR_API_KEY

YOUR_API_KEY may be a raw Stripe customer id (cus_...) or a portal-minted apikey_... token.

Path parameters

NameRequiredDescription
symbolYesUnderlying option root (e.g. SPY, SPXW, AAPL). Uppercased server-side.

Query parameters

NameRequiredDescription
dateNoYYYY-MM-DD retained historical snapshot. Omit for the active/latest snapshot.

Example

Shell
curl "https://www.optiondata.io/api/v1/market-structure/SPY" \
  -H "Authorization: Bearer YOUR_API_KEY"

curl "https://www.optiondata.io/api/v1/market-structure/SPY?date=2026-07-24" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response shape

Top-level:

FieldTypeDescription
data.symbolstringExact option root requested
data.symbol_metaobjectUnderlying metadata and volatility context
data.flowobjectLightweight traded-flow overlay for the symbol
data.intraday_gexobject | nullLatest full-chain summary GEX and spot
data.structureobjectFull-chain GEX, OI, levels, strike-by-expiration aggregates
meta.effective_datestringSnapshot trading date (YYYY-MM-DD)
meta.structure_as_ofstringUTC time when structure metrics were produced
meta.flow_as_ofstringUTC time of the flow overlay
meta.intraday_gex_as_ofstring | nullUTC time of the intraday GEX summary

symbol_meta highlights

FieldTypeDescription
underlying_typeSTOCK | ETF | INDEX | nullUnderlying classification
descriptionstringCompany, fund, or index name
open / high / low / close / lastnumberSnapshot-date underlying prices
iv30number | nullInterpolated 30-day ATM implied volatility (decimal)
iv_rank_1y / iv_percentile_1ynumber | nullOne-year IV rank / percentile as 0–1 fractions
skew_25d_30dnumber | null30-day 25-delta put/call skew
iv_term_slope_30_90number | null30-to-90-day IV term slope

structure highlights

FieldTypeDescription
spotnumberUnderlying price used for exposure calculations
call_oi / put_oinumberAll-scope open-interest contract totals
call_gex / put_gexnumberAll-scope dollar GEX for a 1% move; put GEX is signed negative
scopes.all / zero_dte / weekly / monthlyobject | nullLevels scoped by DTE bucket
gamma_flipnumber | nullNearest repriced zero-net-GEX underlying level
max_painnumber | nullStrike with lowest multiplier-adjusted aggregate payout
call_gex_wall / put_gex_wallnumber | nullStrongest call/put GEX strike on the corresponding side of spot
call_oi_wall / put_oi_wallnumber | nullHighest call/put OI strike on the corresponding side of spot
expirationsarrayFull-chain strike aggregates grouped by expiration

flow highlights

FieldTypeDescription
call_premium / put_premiumnumberSession option premium by side (USD)
bullish_dex / bearish_dexnumberBullish and bearish delta-exposure flow totals
trade_countnumberOption trades represented by the overlay
traded_contract_countnumberDistinct contracts with trades

intraday_gex highlights

FieldTypeDescription
spotnumberLatest positive underlying price used for the summary
call_gexnumberFull-chain positive call dollar GEX, including zero-trade contracts
put_gexnumberFull-chain signed-negative put dollar GEX, including zero-trade contracts

Semantics notes

  • Dealer positioning is a model, not reported dealer inventory. Put GEX uses a documented dealer-short-put signing convention.
  • Net GEX can be derived as call_gex + put_gex (put already signed).
  • data.intraday_gex and meta.intraday_gex_as_of can refresh every five minutes during the regular session. Structural strike GEX, walls, Gamma Flip, Max Pain, OI, expirations, and meta.structure_as_of change only during structural builds.
  • Put/call OI ratio can be derived as put_oi / call_oi when call_oi > 0.
  • Prefer Market Structure for positioning dashboards; use the Option Chain API when you need filterable contract-level quotes and Greeks.

Errors

StatusMeaning
400Invalid symbol or date
401Missing or invalid API key
403No active/trialing realtime entitlement
404Snapshot not found for symbol/date
429Rate limited
500Unexpected server error

FAQ

Q: Rate limits and access?
A: Requires trialing or active Pro + API key. The current default is about 60 requests / 60 seconds per customer on this endpoint, for trial and paid users, enforced on a best-effort basis. HTTP 429 includes Retry-After.

Planned, not yet active: trial 30/minute and 1,200/hour; paid Pro 60/minute and 3,600/hour. Once enabled, both limits apply per customer across their keys and IPs; reaching either triggers rate limiting. No effective date has been announced. Enterprise limits are contract-specific. See API rate limits for the complete policy. Subscription access remains the same as Option Chain and Historical SQL.

Q: Freshness?
A: Structural levels update on builds (structure_as_of). Some intraday GEX fields can refresh about every five minutes in session—use response meta timestamps.

Q: History range?
A: Snapshot history aligns with chain-style sessions from about 2026-02-20. Deep trade history: Historical SQL from 2025-02-18.

Q: Free trial / extension?
A: Complete qualification, then explicitly activate the 14-day Pro trial when you are ready. Eligible trial users can receive 50% off the first year, with next steps shown inside the authenticated portal. Trials are not auto-extended.

Q: Market Structure vs Option Chain?
A: Structure for GEX/walls/max pain dashboards; Option Chain for filterable contract quotes/Greeks.

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)
- Markdown: https://www.optiondata.io/md/market-structure-api/
- HTML docs: https://www.optiondata.io/docs/market-structure-api/

My question:

Search OptionData documentation

Search guides, API fields, examples, and troubleshooting steps.