Private order, fill, and account-state reconciliation is covered in Reconcile
Trade State.
- TypeScript
- Python
- API
Subscribe from a The stream yields typed events for each subscription and can be closed when the
live view no longer needs updates.
PublicClient and iterate over the merged event stream.Best Bid and Offer
Use best bid and offer updates for top-of-book quotes.- TypeScript
- Python
- API
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.- TypeScript
- Python
- API
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.- TypeScript
- Python
- API
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.- TypeScript
- Python
- API
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.- TypeScript
- Python
- API
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.- TypeScript
- Python
- API
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.