Docs/Market Structure Quickstart
Market Structure Quickstart
Request an authenticated OptionData market-structure snapshot and locate GEX, walls, Max Pain, volatility context, and freshness metadata.
Open product page →View as Markdown
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 Quickstart
- Markdown: https://www.optiondata.io/md/market-structure-quickstart/
- HTML docs: https://www.optiondata.io/docs/market-structure-quickstart/
My question:
The Market Structure API returns a precomputed symbol-level snapshot. It combines structural GEX and open-interest levels with volatility context and a lightweight flow overlay.
1. Request the latest snapshot
Store your key in OPTIONDATA_API_KEY, then run:
curl "https://www.optiondata.io/api/v1/market-structure/SPY" \
-H "Authorization: Bearer $OPTIONDATA_API_KEY"
Use the exact option root. For index products, roots such as SPX and SPXW are distinct.

The overview card is the starting point for the symbol-level snapshot request.
2. Request a retained date
Add date=YYYY-MM-DD when you need a retained historical snapshot:
curl "https://www.optiondata.io/api/v1/market-structure/SPY?date=YYYY-MM-DD" \
-H "Authorization: Bearer $OPTIONDATA_API_KEY"
Not every calendar date or exact root has a retained snapshot.
3. Find the main sections
| Response path | Purpose |
|---|---|
data.symbol_meta | Underlying description, prices, IV rank/percentile, skew, and term structure |
data.structure | Spot, GEX/OI totals, Gamma Flip, walls, Max Pain, and expiration aggregates |
data.flow | Lightweight session-flow overlay |
data.intraday_gex | Latest intraday full-chain GEX summary when available |
meta.effective_date | Trading date represented by the snapshot |
meta.*_as_of | Freshness timestamps for the corresponding sections |
Treat walls and Gamma Flip as market-structure context, not guaranteed price targets.
4. Handle missing data correctly
401: bearer key is missing or invalid.403: the customer lacks active/trialing entitlement.404 SYMBOL_NOT_FOUND: the exact option root is unknown.404 SNAPSHOT_NOT_FOUND: the root exists, but no snapshot was retained for that date.429: rate limited; honorRetry-After.
Use Market Structure API for the complete field definitions and nullability contract.