{
"op": "subscribe",
"args": [
"orderbook/0x88a70ff..."
],
"req_id": "100001"
}{
"op": "unsubscribe",
"args": [
"orderbook/0x88a70ff..."
],
"req_id": "100002"
}{
"op": "ping",
"ts": 1681234567890123000,
"req_id": "100003"
}{
"op": "subscribed",
"args": [
"orderbook/0x88a70ff..."
],
"req_id": "100001"
}{
"op": "unsubscribed",
"args": [
"orderbook/0x88a70ff..."
],
"req_id": "100002"
}{
"op": "pong",
"req_id": "100003",
"client_ts": 1681234567890123000,
"server_ts": 1681234567890123500
}{
"op": "error",
"message": "INVALID_TOPIC_FOR_PUBLIC_WS: position",
"req_id": "100004"
}{
"op": "event",
"topic": "orderbook/0x88a70ff...",
"data": {
"market_addr": "0x88a70ff...",
"seq": 123,
"bids": [
{
"price": "100.1",
"qty": "5"
}
],
"asks": [
{
"price": "100.2",
"qty": "3"
}
],
"ts": 1681234567890123500
}
}The public channel is used for subscribing to market data.
{
"op": "subscribe",
"args": [
"orderbook/0x88a70ff..."
],
"req_id": "100001"
}{
"op": "unsubscribe",
"args": [
"orderbook/0x88a70ff..."
],
"req_id": "100002"
}{
"op": "ping",
"ts": 1681234567890123000,
"req_id": "100003"
}{
"op": "subscribed",
"args": [
"orderbook/0x88a70ff..."
],
"req_id": "100001"
}{
"op": "unsubscribed",
"args": [
"orderbook/0x88a70ff..."
],
"req_id": "100002"
}{
"op": "pong",
"req_id": "100003",
"client_ts": 1681234567890123000,
"server_ts": 1681234567890123500
}{
"op": "error",
"message": "INVALID_TOPIC_FOR_PUBLIC_WS: position",
"req_id": "100004"
}{
"op": "event",
"topic": "orderbook/0x88a70ff...",
"data": {
"market_addr": "0x88a70ff...",
"seq": 123,
"bids": [
{
"price": "100.1",
"qty": "5"
}
],
"asks": [
{
"price": "100.2",
"qty": "3"
}
],
"ts": 1681234567890123500
}
}Subscribe to a public topics. Server will respond with a Subscribed message.
Unsubscribe from a public topics. Server will respond with an Unsubscribed message.
Ping the server. The server will respond with a Pong message. Client can use ts to measure RTT.
Acknowledgement for a successful Subscribe request. Echoes the list of topics.
Acknowledgement for a successful Unsubscribe request. Echoes the list of topics.
Heartbeat response to a Ping request. Includes the server timestamp in nanoseconds and echoes client_ts to help client measure RTT.
Standard error response for invalid requests, authorization failures, or policy violations (e.g., rate limits).
Unified event envelope. data can be one of public market updates or private user updates.
OrderbookSnapshot, OrderbookDelta, AggregatedTrades, TickerSnapshotOrderResponse, FillResponse, PositionResponse