Authenticate
Use cus_… or apikey_… on POST https://www.optiondata.io/api/historical/sql.
Query licensed U.S. equity options history with SELECT-only SQL over REST. Ideal when you need 美股期权历史数据 for research, not CSV dumps.
Query individual historical trades for research. For dated full-chain snapshots, use Option Chain; for live trade prints, use the WebSocket API.
Select a date range, filter the trade records, and validate a repeatable research rule.
Use cus_… or apikey_… on POST https://www.optiondata.io/api/historical/sql.
Partition on date; filter symbol early. Fields include Greeks, IV, premium, OI.
Replay large premium, short DTE, or custom UOA logic before going live.
Use the WebSocket for alerts; use SQL to validate thresholds historically.
curl -X POST 'https://www.optiondata.io/api/historical/sql' \
-H 'Content-Type: application/json' \
-d '{
"api_key": "YOUR_API_KEY",
"sql": "SELECT symbol, strike, put_call, size, price, toFloat64(price) * size * 100 AS premium FROM RawOptionTrades WHERE date = (SELECT max(date) FROM RawOptionTrades) AND symbol = '\''AAPL'\'' ORDER BY premium DESC LIMIT 25"
}'Deep docs and product surfaces for historical U.S. options data.
It is OPRA-derived U.S. equity option trade history stored in ClickHouse and queried via POST /api/historical/sql — the same warehouse powering /historical_data/.
Paid access covers the past 15 days (360 elapsed hours), with a 15-minute delay. Trial access is unchanged.
Historical SQL is raw trade prints (not AGGREGATED mode). Aggregate in SQL with GROUP BY when needed.
Open the historical workspace to inspect a sample, then complete qualification and explicitly activate an eligible trial for authenticated queries.