{
"jsonrpc": "2.0",
"method": "subscription",
"params": {
"subscription": "0x1a2b3c4d5e6f...",
"channel": "order_book",
"filters": {
"symbols": [
"BTC"
]
},
"result": {
"type": "snapshot",
"symbol": "BTC",
"bids": [
[
"65000.0",
"0.5"
],
[
"64999.0",
"1.2"
]
],
"asks": [
[
"65001.0",
"0.7"
],
[
"65002.0",
"1.1"
]
],
"timestamp": 1710000000000
}
}
}{
"jsonrpc": "2.0",
"method": "subscription",
"params": {
"subscription": "0x1a2b3c4d5e6f...",
"channel": "order_book",
"filters": {
"symbols": [
"BTC"
]
},
"result": {
"type": "update",
"symbol": "BTC",
"bids": [
[
"65000.5",
"0.0"
],
[
"65001.0",
"2.0"
]
],
"asks": [
[
"65002.0",
"0.0"
],
[
"65003.0",
"1.5"
]
],
"timestamp": 1710000001000
}
}
}Order book updates with snapshots and incremental changes (available on hyperliquid, aster, and lighter servers only)
{
"jsonrpc": "2.0",
"method": "subscription",
"params": {
"subscription": "0x1a2b3c4d5e6f...",
"channel": "order_book",
"filters": {
"symbols": [
"BTC"
]
},
"result": {
"type": "snapshot",
"symbol": "BTC",
"bids": [
[
"65000.0",
"0.5"
],
[
"64999.0",
"1.2"
]
],
"asks": [
[
"65001.0",
"0.7"
],
[
"65002.0",
"1.1"
]
],
"timestamp": 1710000000000
}
}
}{
"jsonrpc": "2.0",
"method": "subscription",
"params": {
"subscription": "0x1a2b3c4d5e6f...",
"channel": "order_book",
"filters": {
"symbols": [
"BTC"
]
},
"result": {
"type": "update",
"symbol": "BTC",
"bids": [
[
"65000.5",
"0.0"
],
[
"65001.0",
"2.0"
]
],
"asks": [
[
"65002.0",
"0.0"
],
[
"65003.0",
"1.5"
]
],
"timestamp": 1710000001000
}
}
}API key for authentication (required for private channels)
Initial order book snapshot
Incremental order book updates