The Orderbook WebSocket streams real-time orderbook updates for prediction markets. Subscribe to multiple markets at once to build live trading interfaces with accurate bid/ask spreads and depth visualization.
Endpoint: wss://synthesis.trade/ws/orderbook
Use cases
Subscribe
Subscribe using token IDs (for Polymarket) or market IDs (for Kalshi). You can subscribe to up to 5,000 markets at once:
Initial response
Upon subscribing, you receive the full orderbook for each market:
Real-time updates
After the initial snapshot, you receive delta updates whenever the orderbook changes:
Complete example: Event page
Build a live event page that shows prices for all markets in an event:
For Polymarket, each market has two token IDs (left/right or YES/NO). Subscribe to both to show complete pricing. The best bid on YES roughly equals 1 minus the best ask on NO.