Skip to content
OptionData

Get 50% off on all plans for the first year – contact sales for a promotional code.

Real-time options data API

Real-Time Options Data API over WebSocket

Real-time options data API for U.S. equity option trades: WebSocket stream with server-side filters, Greeks, implied volatility, premium, sentiment, and RAW or AGGREGATED modes. Use it for options flow scanners, alerts, and dashboards.

real time options dataoptions data apioptions flow apioptions market datastock options api

Server-side option flow filters

Filter by symbols, premium, sentiment, expiry, and contract details before the stream reaches your application.

Trade-level Greeks and IV

Every qualifying print can include Delta, Gamma, Theta, Vega, Rho, implied volatility, premium, and side context.

One key for live products

Use one signed API key for realtime flow monitors, customer-facing dashboards, alerts, and internal trading tools.

Best for

  • Unusual options activity scanners
  • Real-time options flow dashboards
  • Premium and sweep alerts
  • Intraday quant research pipelines

Common API questions

Does OptionData provide real-time options data?

Yes. The realtime API streams U.S. option trades over WebSocket during market hours, with sample responses available for evaluation and docs review.

Can I filter the options stream before receiving data?

Yes. You can apply server-side filters such as symbol, premium, expiry, sentiment, and mode so clients receive only relevant option flow.

What is AGGREGATED mode?

AGGREGATED mode consolidates same-instant, same-contract prints into cleaner events. RAW mode keeps the original trade prints.

How the realtime WebSocket works

Connect to wss://ws.optiondata.io with your API token (cus_… or apikey_…). During U.S. equity options hours the server streams OPRA-licensed trade prints; after the close the socket stays open with heartbeats and resumes automatically next session.

Filter server-side with query params: symbols, premium ranges, put_call, delta, expiry_days, sentiment, side, aggregation_mode (RAW or AGGREGATED), and more. AGGREGATED collapses same-second, same-contract prints for block/sweep visibility; RAW is one message per exchange print.

Each trade can carry 30+ fields including premium, size, Greeks, IV, open interest context, and side. Use test_mode=true for filter validation without live market data.

Realtime option trades API reference · All API docs · openapi.json

Example: stream large AAPL and SPY premium
import WebSocket from 'ws';

const ws = new WebSocket(
  'wss://ws.optiondata.io?token=YOUR_API_KEY&symbols=AAPL,SPY&premium=[100000,null]&aggregation_mode=AGGREGATED'
);

ws.on('message', (raw) => {
  const trade = JSON.parse(raw.toString());
  console.log(trade.symbol, trade.premium, trade.delta);
});

Useful trade fields

symbol / strike / expiration / put_call
Contract identity for the print
premium / size / trade_count
Economic size; trade_count > 1 is common in AGGREGATED mode
delta / gamma / theta / vega / iv
Analytics fields when available
side / sentiment
Price-side and bullish/bearish/neutral context