Level 2 Book
WS
Real-Time: wss://socket.polygon.io/crypto
This API was deprecated on Jul 1, 2024 and is no longer supported.
Stream Level 2 (L2) order book data for specified cryptocurrency pairs via WebSocket. Each update aggregates bids and asks from multiple exchanges, reflecting comprehensive market depth and liquidity at various price levels. With this continuous feed, users can monitor evolving order flow, enhance price discovery, and support advanced trading strategies that rely on detailed market depth information.
Use Cases: Market analysis, liquidity assessment, price discovery, algorithmic trading.
Parameters
ticker
string
required
Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.
You can also use a comma separated list to subscribe to multiple crypto pairs.
You can retrieve active crypto tickers from our Crypto Tickers API.
Response Attributes
ev
enum (XL2)
The event type.
pair
string
The crypto pair.
b
array (array)
An array of bid prices, where each entry contains two elements: the first is the bid price, and the second is the size, with a maximum depth of 100.
a
array (array)
An array of ask prices, where each entry contains two elements: the first is the ask price, and the second is the size, with a maximum depth of 100.
t
integer
The Timestamp in Unix MS.
x
integer
The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.
r
integer
The timestamp that the tick was received by Polygon.