Skip to main content
Stream public market data as prices, books, trades, candles, tickers, and market statistics change.
Private order, fill, and account-state reconciliation is covered in Reconcile Trade State.
Start with the stream that matches the view you are building. Subscribe to the updates you need, read events while the view is active, then stop the stream when the view no longer needs live data.
Subscribe from a PublicClient and iterate over the merged event stream.
The stream yields typed events for each subscription and can be closed when the live view no longer needs updates.

Best Bid and Offer

Use best bid and offer updates for top-of-book quotes.
Subscribe to best bid and offer updates for one instrument.
After subscribing, the stream yields PerpsBboEvent objects like this.

Order Book

Use order book updates for depth across bid and ask price levels.
Subscribe to order book updates for one instrument.
After subscribing, the stream yields PerpsBookEvent objects like this.

Trades

Use trades to update recent-print lists, last-trade displays, or execution-based analytics.
Subscribe to public trade updates for one instrument.
After subscribing, the stream yields PerpsTradeEvent objects like this.

Tickers

Use ticker updates for the current mark, index, last price, open interest, and funding state.
Subscribe to ticker updates for one instrument or all active instruments.
Omit instrumentId to subscribe to ticker updates for all active instruments.After subscribing, the stream yields PerpsTickerEvent objects like this.

Statistics

Use statistics for 24-hour volume, opening price, and the rolling kline window.
Subscribe to 24-hour statistics for one instrument or all active instruments.
Omit instrumentId to subscribe to statistics updates for all active instruments.After subscribing, the stream yields PerpsStatisticEvent objects like this.

Candles

Use candles to update charts with live OHLCV data.
Subscribe to candle updates for one instrument and interval.
The public stream supports 1m, 5m, 15m, 1h, 4h, 1d, and 1w candle intervals.After subscribing, the stream yields PerpsCandleEvent objects like this.