跳到主要内容
Developer documentation

Build with OptionData

Go from a public test connection to production-ready U.S. equity options data with focused quickstarts, complete API references, and one shared API key.

Get started
Fastest path: test realtime without an API key
This finite public snapshot validates WebSocket connectivity, parsing, and clean closure.
Text
wss://ws.optiondata.io?test_mode=true&aggregation_mode=AGGREGATED&symbols=AAPL

Choose your first workflow

Each quickstart ends with a real request and points to the complete contract reference.

Stream realtime trades
Validate your client in public test mode, then connect with your API key.
Query historical trades
Run a bounded SQL request and handle query guardrails safely.
Retrieve an option chain
Request current or historical contracts and narrow large chains.
Read market structure
Locate GEX, walls, Max Pain, volatility context, and freshness metadata.

Browse all documentation

Account setup, complete API contracts, options concepts, and troubleshooting.

Getting started

Create an account, complete qualification, explicitly activate the 14-day Pro trial, get an API key, and choose your first OptionData API workflow.

Account & billing

Safely reveal, copy, store, use, and regenerate the OptionData API key shared by the realtime and HTTP data APIs.
Step-by-step guide to adding a payment method securely through the Stripe customer portal before your OptionData free trial ends.
Review your OptionData plan, open the Stripe customer portal, update billing details, view invoices, and understand cancellation timing.
Current HTTP API defaults and planned trial/paid request quotas for Option Chain, Market Structure, and Historical SQL.

API reference

WebSocket API reference for OPRA-licensed U.S. equity option trades: filters, RAW vs AGGREGATED modes, fields, test mode, and connection limits.
POST /api/historical/sql reference: 15-minute-delayed ClickHouse SELECT over RawOptionTrades, schema fields, restrictions, examples, and trial limits.
POST /api/option-chain reference: full U.S. option chains with strikes, expirations, bid/ask, OI, IV, and Greeks.
GET /api/v1/market-structure/:symbol reference: structural Gamma Exposure, intraday GEX, Gamma Flip, walls, Max Pain, IV context, session flow, and symbol metadata.

Concepts & troubleshooting

Core options market-data concepts used across OptionData APIs: trades, chains, Greeks, IV, premium, and flow terminology.
Diagnose OptionData API key, subscription, rate-limit, query-width, timeout, and WebSocket handshake failures without exposing credentials.

Agent and machine-readable resources

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}

Per-page Markdown lives at https://www.optiondata.io/md/{slug} (for example https://www.optiondata.io/md/realtime-option-trades-api/).

My question:
Source-of-truth endpoints
Public resources for coding agents, generated clients, and contract validation.
  • Realtime 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
  • OpenAPI: /openapi.json
  • AI map: /llms.txt
  • Full agent docs: /llms-full.txt

Search OptionData documentation

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