Global Orderbook Module Websocket
Real-time orderbook streaming using Socket.IO. Get live updates from multiple exchanges with aggregated global orderbook view.Connection
Authentication
No authentication required - Orderbook data is publicly available market data.Connection Keepalive
Socket.IO handles keepalive automatically via ping/pong:
No client-side action required - the Socket.IO client library handles ping/pong responses automatically. As long as the connection is open and the network is stable, the connection stays alive.
If you need to detect connection health in your app:
Events
Client → Server Events
Server → Client Events
Subscribing to Orderbooks
Subscribe to Single Exchange
Subscribe to Multiple Exchanges + Global Book
Subscribe to All Exchanges
Subscription Parameters
Supported Venues
Message Formats
Per-Venue Update (orderbook_update)
Sent for each exchange when the orderbook changes:
Global Book (global_book)
Aggregated view showing best prices across all subscribed venues:
Initial Snapshot (orderbook_snapshot)
Sent immediately after subscribing:
Quality Metrics
Quality Levels
Confidence Score (0.0 - 1.0)
Confidence is calculated based on:- Staleness: Up to -0.4 penalty for old data
- Spread: Up to -0.2 penalty for wide spreads
- Sequence gaps: -0.05 per gap (max -0.3)
- If
UNAVAILABLE: confidence = 0
Complete Example (React)
Unsubscribing
Error Handling
Performance Tips
- Limit depth - Use
depth: 5unless you need more levels - Filter venues - Only subscribe to venues you’ll display
- Throttle UI updates - Don’t re-render on every update (10-20/sec)
- Use
include_global: falseif you only need raw venue data - Unsubscribe when components unmount

