Skip to content
Flow for quant research

Options Flow API for Quant Research

Develop flow features on WebSocket trades and validate them on historical RAW trades. Map derived fields and aggregation modes explicitly before comparing results.

For quant researchers who need both a live options tape (~10M/day) and a SQL warehouse (rolling 15-day window, ~100M trades) with consistent Greeks/IV/premium semantics.

Research loop
15 days
SQL validation window
Live
WebSocket features
Field mapping
RAW ↔ stream

Live feature → historical proof → production

Keep one definition of premium, delta bands, and DTE filters across stream and SQL.

Prototype on the stream

Use server-side filters to sample high-premium or short-dated flow without drowning notebooks in every print.

Log feature vectors

Persist minute bars or event features (premium, |delta|, IV) with the same formulas you will run live.

Backtest in ClickHouse

Replay multi-week windows via historical SQL with row/timeout guardrails appropriate to research jobs.

Deploy unchanged thresholds

Promote filters to production WebSocket params and monitor drift against the SQL baseline.

Quant-specific flow concerns

  • Explicit mapping between historical RAW rows and WebSocket payloads
  • AGGREGATED vs RAW choice affects sweep statistics
  • Trial SQL row caps. use full plan for serious backtests
  • Chain snapshots for surface context at event time
  • OPRA-licensed prints for professional research use under plan terms
  • See also: options data API for quant hub
Example: validate a live premium/sentiment feature in SQL
SELECT
  toStartOfMinute(time) AS minute,
  sumIf(toFloat64(price) * size * 100, put_call = 'CALL') AS call_premium,
  sumIf(toFloat64(price) * size * 100, put_call = 'PUT') AS put_premium,
  avg(abs(delta)) AS avg_abs_delta
FROM RawOptionTrades
WHERE date = (
  SELECT max(date) FROM RawOptionTrades
  WHERE symbol = 'AAPL' AND date >= today() - 7
)
  AND symbol = 'SPY'
  AND toFloat64(price) * size * 100 >= 50000
GROUP BY minute
ORDER BY minute
LIMIT 1000

Options flow for quants FAQ

Can I research only on historical SQL without the live feed?

Yes. Many studies start in SQL. Map derived fields and RAW versus AGGREGATED semantics before deploying those features on WebSocket.

Does AGGREGATED mode change research results?

Yes. AGGREGATED merges same-contract same-instant prints; RAW keeps every exchange print. Pick one mode and keep it consistent from backtest to prod.

How far back does history go?

Paid Historical SQL covers the past 15 days of option trades (a rolling 360-hour window, on the order of 100M rows), queryable via ClickHouse SQL over REST.

Are Greeks model-based?

Greeks and IV are analytics estimates under model assumptions. Use them as features, not as guaranteed P&L.