Order Book
Subscribe to order book data updates for a specific instrument.
Subscribe Request
{
"id": 2,
"method": "SUBSCRIBE",
"params": {
"chainId": 143,
"instrument": "0x73ada1ea346cc3908f41cf67a040f0acd7808be0",
"expiry": 4294967295,
"type": "orderBook"
}
}Unsubscribe Request
{
"id": 2,
"method": "UNSUBSCRIBE",
"params": {
"chainId": 143,
"instrument": "0x73ada1ea346cc3908f41cf67a040f0acd7808be0",
"expiry": 4294967295,
"type": "orderBook"
}
}Parameter Description
chainId(required): Chain IDinstrument(required): Instrument address (lowercase)expiry(required): Expiry timestamptype(required): Must be"orderBook"
Data Stream Message
Order Book Data Structure
chainId(top-level): Chain ID of the order book updateinstrument(top-level): Instrument address corresponding to the updateexpiry(top-level): Expiry timestampdata: Map of order book entries, keyed by depth level (string: "1", "10", "100", "200"). Each entry contains:blockInfo: Block informationheight: Block heighttimestamp: Block timestamp
bids: Buy order list (sorted by price from high to low)asks: Sell order list (sorted by price from low to high)Each order item contains:
tick: Price tickprice: Price (string format)baseSize: Base asset quantityquoteSize: Quote asset quantitybaseSum: Cumulative base asset quantityquoteSum: Cumulative quote asset quantity
Depth Levels
The order book provides data at four depth levels:
"1": 1-level depth"10": 10-level depth"100": 100-level depth"200": 200-level depth
Last updated