Docs/Option Chain Quickstart
Option Chain Quickstart
Request the latest OptionData option chain for one underlying, inspect response freshness, and narrow chains that exceed response guardrails.
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: Option Chain Quickstart
- Markdown: https://www.optiondata.io/md/option-chain-quickstart/
- HTML docs: https://www.optiondata.io/docs/option-chain-quickstart/
My question:
The Option Chain API returns per-contract chain rows for one underlying. Omit date to use the latest available trading session.
1. Request a chain
Store your API key in OPTIONDATA_API_KEY, then run:
curl -X POST https://www.optiondata.io/api/option-chain \
-H "Authorization: Bearer $OPTIONDATA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"symbol": "AAPL",
"put_call": "CALL"
}'
The response contains:
data: per-contract rows such as strike, expiration, bid/ask, open interest, IV, and Greeks.meta.trading_date: the trading session returned.meta.as_of: the latest update represented in the response, ornullwhen unavailable.

The overview card distinguishes one-request full chains from the latest-or-historical session mode.
2. Narrow a large chain
If the request returns HTTP 422, narrow it with one or more supported filters:
{
"symbol": "AAPL",
"expiration_date": "YYYY-MM-DD",
"put_call": "CALL",
"strike_min": 150,
"strike_max": 250
}
Use an expiration date that exists in the current chain. The endpoint rejects over-broad requests instead of silently returning a partial chain.
3. Choose a polling interval
- Broad or full-chain workflows: approximately every five minutes.
- Narrow symbol/expiry/strike workflows: approximately every one to two minutes.
- Honor HTTP
429and itsRetry-Afterheader.
Faster polling rarely improves a chain workflow and can exhaust the per-key rate limit.
4. Understand access errors
401: missing or invalid key.403: recognized customer without active/trialing entitlement.422: request too broad.504: query timed out; narrow the filters.
The Option Chain endpoint returns chain state, not the live trade stream. Use Realtime WebSocket Quickstart for trades and flow.
See Option Chain API for the complete request and response contract.