l2Book
Public order-book snapshot, pushed on a fixed server-side tick.
For an Outcome market, set coin to its numeric instrument_id. The book is
the YES book; derive displayed NO prices by taking 1 - price and reversing
the side. Set tick to the market's instrument.price_tick when a specific
aggregation is required.
Channell2Bookserver → client · type
l2BookDrive an order-book widget for one instrument; each push is a full snapshot.
Subscribe
{
"method": "subscribe",
"type": "l2Book",
"subscription": {
"type": "l2Book",
"coin": "4",
"nSigFigs": 5,
"mantissa": 1,
"tick": ""
}
}Try it
Subscription parameters
coinstringrequired
typestringrequired
"l2Book"mantissaintegernullableoptional
nSigFigsintegernullableoptional
Optional significant-figure aggregation.
tickstringnullableoptional
Optional explicit price tick.
Server message
channelstring
"l2Book"dataWsL2BookData
coinstring
Trading pair symbol.
idintegernullable
Instrument id.
levelsWsBookLevel[][]
[bidLevels, askLevels]. Each is a list of WsBookLevel ordered from best to worst price.
timeinteger
Snapshot timestamp, milliseconds.
tickDecimalStringnullable
Effective price tick used for aggregation. Omitted when the default tick is used.
Message example
{
"channel": "l2Book",
"data": {
"coin": "4",
"time": 1700000000000,
"levels": [
[
{
"px": "0",
"sz": "0",
"n": 0
}
]
],
"tick": "",
"id": 0
}
}