WebSocket API migrating from Ably to Centrifugo
The new Centrifugo-based WebSocket API is now live. The legacy Ably-based API will continue to run in parallel until July 1, 2026, when it will be shut down. All clients must migrate before that date.What’s changing
- SDK: Replace
ablywithcentrifuge - Auth endpoint:
GET /user/token→GET /user/realtime-token/api-key - WebSocket URL: Now explicit —
wss://realtime.sx.bet/connection/websocket - Channel names: All channel names have changed (see table below)
- Subscription API:
channel.subscribe(message => ...)→ event-basedsub.on("publication", ctx => ...) - Gap recovery: Time-based
rewindreplaced by the snapshot + subscribe pattern usingpositioned: trueandrecoverable: true
Channel name changes
| Old (Ably) | New (Centrifugo) |
|---|---|
active_orders_v2:{baseToken}:{maker} | active_orders:{maker} |
order_book_v2:{baseToken}:{marketHash} | order_book:market_{marketHash} |
best_odds:{baseToken} | best_odds:global |
markets | markets:global |
recent_trades | recent_trades:global |
recent_trades_consolidated | recent_trades_consolidated:global |
main_line | main_line:global |
fixtures:fixture_update | fixtures:global |
live_scores:{sportXEventId} | fixtures:live_scores (now global — filter client-side) |
ce_refunds:{user} | ce_refunds:{bettor} |
markets:parlay | parlay_markets:global |
order_book:event_{sportXEventId} — subscribes to all markets in an event with a single subscription.What’s improving
- Channel capacity: 512 channels per connection (up from 200)
- Throughput: No per-channel message rate cap (previously 200 msg/sec)
- Delivery reliability: Exact gap recovery using message IDs and server-side history, replacing imprecise time-based rewind
