WebSocket API
Live order book stream
Subscribe to the order book stream over WebSocket: one snapshot, then incremental updates as levels change.
WSS
/
api
/
v1
/
marketdata
/
orderbook
/
stream
Messages
{
"type": "orderbook",
"meta": {
"exchange": "CXBNCE",
"symbol": "BTC/USDT",
"depth": 3
},
"snapshot": {
"timestamp": "2026-09-22T05:39:24.614Z",
"bids": [
[
"85320.85",
"6.35745"
],
[
"85320.84",
"0.00012"
],
[
"85320.83",
"0.00012"
]
],
"asks": [
[
"85320.86",
"0.20388"
],
[
"85320.87",
"0.00047"
],
[
"85320.88",
"0.00012"
]
]
}
}{
"type": "orderbook",
"meta": {
"exchange": "CXBNCE",
"symbol": "BTC/USDT",
"depth": 3
},
"update": {
"timestamp": "2026-09-22T05:39:24.914Z",
"bids": [],
"asks": [
[
"85320.86",
"0.20274"
],
[
"85320.87",
"0.0004"
]
]
}
}{
"type": "error",
"meta": {
"exchange": "CXBNCE",
"symbol": "UNKNOWN",
"depth": 200
},
"error": {
"code": "not_found",
"message": "security not found"
}
}x-api-key
type:httpApiKey
API key sent on the WebSocket upgrade request. Exactly one header value is required; duplicate or comma-combined values are rejected.
method
type:string
GET
query
type:object
Order book snapshot frame
type:object
The full initial top-depth view of the book; exactly one per connection.
Order book update frame
type:object
Changed levels only; size "0" removes a level.
Error frame
type:object
Terminal error converted from an upstream status; closes the socket.
Was this page helpful?
⌘I
Messages
{
"type": "orderbook",
"meta": {
"exchange": "CXBNCE",
"symbol": "BTC/USDT",
"depth": 3
},
"snapshot": {
"timestamp": "2026-09-22T05:39:24.614Z",
"bids": [
[
"85320.85",
"6.35745"
],
[
"85320.84",
"0.00012"
],
[
"85320.83",
"0.00012"
]
],
"asks": [
[
"85320.86",
"0.20388"
],
[
"85320.87",
"0.00047"
],
[
"85320.88",
"0.00012"
]
]
}
}{
"type": "orderbook",
"meta": {
"exchange": "CXBNCE",
"symbol": "BTC/USDT",
"depth": 3
},
"update": {
"timestamp": "2026-09-22T05:39:24.914Z",
"bids": [],
"asks": [
[
"85320.86",
"0.20274"
],
[
"85320.87",
"0.0004"
]
]
}
}{
"type": "error",
"meta": {
"exchange": "CXBNCE",
"symbol": "UNKNOWN",
"depth": 200
},
"error": {
"code": "not_found",
"message": "security not found"
}
}