Skip to content
Historical options SQL

U.S. Historical Option Trades API

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.

From historical trades to a research result

Select a date range, filter the trade records, and validate a repeatable research rule.

Authenticate

Use cus_… or apikey_… on POST https://www.optiondata.io/api/historical/sql.

Filter RawOptionTrades

Partition on date; filter symbol early. Fields include Greeks, IV, premium, OI.

Backtest rules

Replay large premium, short DTE, or custom UOA logic before going live.

Pair with live flow

Use the WebSocket for alerts; use SQL to validate thresholds historically.

What historical trade queries support

  • Licensed U.S. equity options history without exchange connectivity
  • SQL flexibility vs static file vendors
  • Greeks and IV on stored trades when available
  • Same key as realtime, option chain, and market structure
  • Trial row caps; paid access to the past 15 days
  • Public docs: /docs/historical-option-trades-api/
Example: top AAPL premium prints today
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"
  }'

U.S. options historical data FAQ

What is 美股期权历史数据 on OptionData?

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/.

How far back does history go?

Paid access covers the past 15 days (360 elapsed hours), with a 15-minute delay. Trial access is unchanged.

Is historical data RAW or aggregated?

Historical SQL is raw trade prints (not AGGREGATED mode). Aggregate in SQL with GROUP BY when needed.

How do I get started?

Open the historical workspace to inspect a sample, then complete qualification and explicitly activate an eligible trial for authenticated queries.