Subscribe to Market Data
Request
Response
Error Response
Message Types
SNAPSHOT Message
The initial message after subscription contains the full order book state:UPDATE Message
Incremental changes to the order book:Processing Updates
Update Rules
- When
amount = 0
: Remove the price level from the order book - When
amount > 0
: Add or update the price level with the new amount - Bids are sorted in descending price order
- Asks are sorted in ascending price order
Snapshot Synchronization
The API uses timestamp-based synchronization to ensure order book consistency:➊ Initial Subscription
Upon subscribing, you immediately receive UPDATE messages with timestamps while the server prepares the SNAPSHOT.➋ Buffer Updates
Buffer all received UPDATE messages until the SNAPSHOT arrives.➌ Process Snapshot
When the SNAPSHOT arrives with timestamp T:- Build the order book from the SNAPSHOT
- Apply buffered UPDATEs where
UPDATE.time > SNAPSHOT.time
- Discard UPDATEs where
UPDATE.time <= SNAPSHOT.time
➍ Continue Processing
Apply subsequent UPDATE messages incrementally to maintain the order book.A SNAPSHOT message is sent exactly once after subscribing to a channel.
Example Implementation
Unsubscribe
To stop receiving market data updates:Questions? Contact Support.