This WebSocket API streams real-time options trade data, fetching the latest records every minute from an API. The WebSocket supports symbol filtering and manages timestamps to avoid data overlap.
wss://bigquery-worker.engineering-601.workers.dev/
Example with symbol filter:
wss://bigquery-worker.engineering-601.workers.dev/?symbols=NVDA
symbols
(optional): Comma-separated option symbols to filter the data (e.g.,symbols=AAPL,GOOG
).
wss://bigquery-worker.engineering-601.workers.dev/?symbols=AAPL wss://bigquery-worker.engineering-601.workers.dev/?symbols=AAPL,GOOG
- Upon first connection, the WebSocket fetches the most recent trade data (up to 10,000 records).
- If no timestamp is provided, it fetches the most recent records.
- The
next_timestamp
is returned by the API and used for subsequent data fetches.
- The WebSocket fetches new trade data every minute after the latest timestamp (returned in the initial call).
- If no new data is available, an empty data frame is returned, and the timestamp remains unchanged until new data arrives.
- If no new data is available, the WebSocket sends back an empty data frame and does not update the timestamp.
- The WebSocket can query specific option symbols via query parameters (e.g.,
symbols=AAPL
). - You can specify multiple symbols separated by commas.
The WebSocket sends JSON-formatted data for each fetch cycle. Here is the format:
{
"data": [
{
"id": "m1157cyp",
"symbol": "AAPL",
"strike": 150,
"put_call": "CALL",
"date": "2024-09-13",
"time": "16:03:02",
"price": 5.55,
"size": 10,
"premium": 5550,
"bid": 5.50,
"ask": 5.60,
"oi": 200,
"option_activity_type": "TRADE",
"underlying_price": 153.40,
"delta": 0.45,
"gamma": 0.12,
"daily_volume": 1200
}
]
}
If no new trades are available, the response will look like:
{
"data": [],
"next_timestamp": "1726486800"
}