Docs/Option Chain Quickstart
API quickstartsOption Chain Quickstart
Request an OptionData option chain for one underlying, read which session it covers, and narrow chains that exceed response guardrails.
On this page
The Option Chain API returns per-contract chain rows for one underlying. Set date to YYYY-MM-DD to request a specific session; if omitted, the most recent available session is returned.
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.
2. Narrow a large chain
If the request returns HTTP 422 REQUEST_TOO_BROAD, the chain has too many contracts for one response. The response's error.hints names the filters your request did not use. Requesting CALL and PUT separately is usually enough, even for the largest chains such as SPXW. Retrying the same request returns the same 422, so change it first. 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 that session's chain. The endpoint rejects over-broad requests instead of silently returning a partial chain.
3. Understand access errors
401: missing or invalid key.403: recognized customer without active/trialing entitlement.422: request too broad; followerror.hintsinstead of retrying unchanged.429: rate limited; honor theRetry-Afterheader.504: query timed out; narrow the filters.
The Option Chain endpoint returns chain state, not individual trades. Use Historical SQL Quickstart for trades and flow.
See Option Chain API for the complete request and response contract.
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/), a historical 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. Products: - Historical SQL: POST https://www.optiondata.io/api/historical/sql - Option chain: POST https://www.optiondata.io/api/option-chain 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: