Skip to main content
Stream live data over a WebSocket connection. Requires the Advanced tier or above. You can find fully-functional streaming examples here: If you are an AI agent or working with an AI agent there is a websocket Skill available at: https://unusualwhales.com/skills/websocket.md

Connecting

Connect to the socket with your API token on the query string, then join a channel.
Join a channel by sending:
A successful join is acknowledged with:
Data frames then arrive as ["<channel>", { ... }]. Send a real User-Agent on the handshake. Scope a channel to a ticker with a colon, for example gex_strike:SPY. See Channels for every channel.

Connect with websocat

For a python example script that streams gex by ticker (gex:TICKER), flow alerts (flow-alerts), and all TSLA option trades (option_trades:TSLA), see our “examples” repo on Github: https://github.com/unusual-whales/api-examples/tree/main/examples/ws-multi-channel-multi-output We will use websocat to demonstrate how to connect to the WebSocket server.
The server will then reply with
indicating that the connection was successful. You will then receive data in the following format:
during market hours. To receive the trades only for a specific ticker, use the following command:
You can join multiple channels with the same websocket connection:

Channels

The following channels are available: The option_trades channel will stream all 6,000,000 option trades in real-time, option_trades:<TICKER> will stream all option trades for the given ticker in real-time. flow-alerts will stream from the alerts page

Using a client

If you are using Python, you can use the websocket-client library to connect to the server.

Connections

Connect each API token from a single machine. The same token connected from more than one machine at a time is not supported and results in dropped connections. Use a separate token per host.

Buffering

Buffer incoming messages and write them on an interval rather than once per message. A consumer that writes to storage on every payload will fall behind on high-volume channels and be dropped as a slow client. Flush on a timer, for example once per second, or after a set number of records, whichever comes first. Reference consumers:

Recovery

The stream has no replay, resume, or sequence numbers. Messages missed during a disconnect are not redelivered on reconnect. For delivery guaranteed across gaps, use Kafka which has a retention period of 72h. The gex_strike data has no intraday REST backfill, so capture it live.

Historic data

To download/access historic data, use the endpoint /api/option-trades/full-tape

The price channel

Subscribe to price with no ticker to receive live prices for all tickers on one connection. price:{TICKER} streams a single ticker. To follow many tickers, subscribe once to price rather than opening a price:{TICKER} subscription per symbol.

Periscope values

On the periscope channels, the streamed gamma, charm, and vanna are net Market Maker greek exposure, not the dollarized *_per_one_percent_move_oi values returned by the REST spot-exposures endpoints. They are on different scales, so do not compare them directly.
Last modified on September 28, 2026