> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sx.bet/llms.txt
> Use this file to discover all available pages before exploring further.

# Websocket Channels

> Real-time data via the SX Bet WebSocket API

SX Bet's real-time API uses [Centrifugo](https://centrifugal.dev/) for WebSocket connections. You can subscribe to channels for live updates on order books, markets, trades, scores, and more.

You must have a valid API key to connect. See [API Key](/api-reference/api-key) for details.

<Note>Migrating from the legacy Ably API? See the [Migration Guide →](/api-reference/centrifugo-migration)</Note>

## Reference

### Namespace history capabilities

Server-side history powers the recovery feature — see [Real-time Data → Recovery & reliability](/developers/real-time#recovery--reliability) for how to use it.

| Namespace                    | History enabled | Max messages | Retention window |
| ---------------------------- | --------------- | ------------ | ---------------- |
| `order_book`                 | Yes             | 5,000        | 5 minutes        |
| `recent_trades`              | Yes             | 2,000        | 5 minutes        |
| `recent_trades_consolidated` | Yes             | 1,000        | 5 minutes        |
| `markets`                    | Yes             | 1,000        | 5 minutes        |
| `main_line`                  | Yes             | 500          | 5 minutes        |
| `active_orders`              | Yes             | 100          | 5 minutes        |
| `fixtures`                   | Yes             | 100          | 5 minutes        |
| `ce_refunds`                 | Yes             | 100          | 5 minutes        |
| `best_odds`                  | No              | —            | —                |
| `parlay_markets`             | No              | —            | —                |

The 5-minute retention means messages are available for up to 5 minutes, but may become unavailable sooner if the namespace's message limit is reached first — newer messages push out older ones once the cap is hit. Recovery only works for publications still present in the history window at the time of reconnect.

### Limits

| Parameter                                | Value      |
| ---------------------------------------- | ---------- |
| Max channel subscriptions per connection | 512        |
| Max history items returned per request   | 1,000      |
| Max messages recoverable per reconnect   | 1,000      |
| Ping interval                            | 30 seconds |
| Pong timeout                             | 8 seconds  |
| Outbound queue limit                     | 1 MB       |
