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

# clob

> The Polymarket CLOB order-book feed — book, prices, last trade, midpoint, tick size, and best bid/ask — proxied over the Radion WebSocket.

The `clob.*` channels carry the Polymarket CLOB (central limit order book) live feed. Radion proxies it over the same WebSocket as the on-chain channels, so you get order-book state, prices, and trades next to the confirmed chain events, on one connection.

This is a **separate channel family** from the topic channels ([`trading`](/websockets/channels/trading), [`positions`](/websockets/channels/positions), and the rest). It differs in three ways:

* **Every clob channel requires a `token_ids` filter.** You subscribe per outcome token. With no `token_ids`, the subscribe fails.
* **The `data` payload has no `type` discriminator.** Each clob channel has one fixed payload shape. Topic channels put a snake\_case `type` inside `data`; clob channels do not.
* **There is no pending feed.** CLOB channels have no pending/confirmed concept — `confirmed: false` does not apply. The CLOB feed is off-chain order-book state, not pending transactions.

## Channels

| Channel             | Sends                                                               |
| ------------------- | ------------------------------------------------------------------- |
| `clob.book`         | Full order-book snapshot: all bid and ask levels.                   |
| `clob.prices`       | Price-change batches: which levels moved, and the new best bid/ask. |
| `clob.last_trade`   | The last trade price and size for the token.                        |
| `clob.midpoint`     | The midpoint between best bid and best ask.                         |
| `clob.tick_size`    | Tick-size changes for the token.                                    |
| `clob.best_bid_ask` | The best bid and best ask.                                          |

<Note>
  `clob.prices` is the CLOB price-change feed. It is not the removed derived
  `prices` topic channel — that one carried last-trade price ticks and no longer
  exists. `clob.prices` is unrelated and stays.
</Note>

## Subscribe

Every clob channel requires at least one `token_ids` value:

```json theme={null}
{
  "action": "subscribe",
  "id": "s1",
  "channel": "clob.book",
  "filters": {
    "token_ids": [
      "71321045679252212594626385532706912750332728571942532289631379312455583992563"
    ]
  }
}
```

## Filters

| Filter      | Type       | Required | Description                                                                 |
| ----------- | ---------- | -------- | --------------------------------------------------------------------------- |
| `token_ids` | `string[]` | Yes      | Outcome token IDs as decimal strings. At least one, or the subscribe fails. |

Clob channels accept only `token_ids`. `wallets`, `market_ids`, and `min_usd` are ignored here. See [Filters](/websockets/filters) for the combination rule.

## Payloads

Each frame is a standard event frame: `type: "event"`, your `id`, the `channel` name, and a `data` object. Unlike the topic channels, `data` carries **no** `type` field — the channel name already tells you the shape.

In every payload, ids are strings (`asset_id` is a U256 decimal string, `market` is a `0x` hex string), `timestamp` is a number, and prices and sizes are numbers. Fields marked optional may be absent.

### `clob.book`

Full order-book snapshot for the token.

```json theme={null}
{
  "type": "event",
  "id": "s1",
  "channel": "clob.book",
  "data": {
    "asset_id": "71321045…992563",
    "market": "0x…",
    "timestamp": 1730000000,
    "bids": [{ "price": 0.52, "size": 1200 }],
    "asks": [{ "price": 0.54, "size": 800 }]
  }
}
```

| Field       | Type      | Description                                              |
| ----------- | --------- | -------------------------------------------------------- |
| `asset_id`  | string    | Outcome token id (U256 decimal string).                  |
| `market`    | string    | Market id (`0x` hex string).                             |
| `timestamp` | number    | Feed timestamp.                                          |
| `bids`      | `Level[]` | Bid levels. Each `Level` is `{ price, size }` (numbers). |
| `asks`      | `Level[]` | Ask levels. Each `Level` is `{ price, size }` (numbers). |

### `clob.prices`

A batch of level changes for a market, with the new best bid/ask per token.

```json theme={null}
{
  "type": "event",
  "id": "s1",
  "channel": "clob.prices",
  "data": {
    "market": "0x…",
    "timestamp": 1730000000,
    "changes": [
      {
        "asset_id": "71321045…992563",
        "price": 0.53,
        "size": 500,
        "best_bid": 0.52,
        "best_ask": 0.54
      }
    ]
  }
}
```

| Field       | Type            | Description                    |
| ----------- | --------------- | ------------------------------ |
| `market`    | string          | Market id (`0x` hex string).   |
| `timestamp` | number          | Feed timestamp.                |
| `changes`   | `PriceChange[]` | The changed levels. See below. |

Each `PriceChange`:

| Field      | Type   | Optional | Description                 |
| ---------- | ------ | -------- | --------------------------- |
| `asset_id` | string | No       | Outcome token id.           |
| `price`    | number | No       | The changed price level.    |
| `size`     | number | Yes      | New size at the level.      |
| `best_bid` | number | Yes      | New best bid for the token. |
| `best_ask` | number | Yes      | New best ask for the token. |

### `clob.last_trade`

The last trade for the token.

```json theme={null}
{
  "type": "event",
  "id": "s1",
  "channel": "clob.last_trade",
  "data": {
    "asset_id": "71321045…992563",
    "market": "0x…",
    "price": 0.53,
    "size": 250,
    "timestamp": 1730000000
  }
}
```

| Field       | Type   | Optional | Description                  |
| ----------- | ------ | -------- | ---------------------------- |
| `asset_id`  | string | No       | Outcome token id.            |
| `market`    | string | No       | Market id (`0x` hex string). |
| `price`     | number | No       | Last trade price.            |
| `size`      | number | Yes      | Last trade size.             |
| `timestamp` | number | No       | Feed timestamp.              |

### `clob.midpoint`

The midpoint between best bid and best ask.

```json theme={null}
{
  "type": "event",
  "id": "s1",
  "channel": "clob.midpoint",
  "data": {
    "asset_id": "71321045…992563",
    "market": "0x…",
    "midpoint": 0.53,
    "timestamp": 1730000000
  }
}
```

| Field       | Type   | Description                  |
| ----------- | ------ | ---------------------------- |
| `asset_id`  | string | Outcome token id.            |
| `market`    | string | Market id (`0x` hex string). |
| `midpoint`  | number | Midpoint price.              |
| `timestamp` | number | Feed timestamp.              |

### `clob.tick_size`

A tick-size change for the token.

```json theme={null}
{
  "type": "event",
  "id": "s1",
  "channel": "clob.tick_size",
  "data": {
    "asset_id": "71321045…992563",
    "market": "0x…",
    "timestamp": 1730000000
  }
}
```

| Field       | Type   | Description                  |
| ----------- | ------ | ---------------------------- |
| `asset_id`  | string | Outcome token id.            |
| `market`    | string | Market id (`0x` hex string). |
| `timestamp` | number | Feed timestamp.              |

### `clob.best_bid_ask`

The best bid and best ask for the token.

```json theme={null}
{
  "type": "event",
  "id": "s1",
  "channel": "clob.best_bid_ask",
  "data": {
    "asset_id": "71321045…992563",
    "market": "0x…",
    "best_bid": 0.52,
    "best_ask": 0.54,
    "timestamp": 1730000000
  }
}
```

| Field       | Type   | Description                  |
| ----------- | ------ | ---------------------------- |
| `asset_id`  | string | Outcome token id.            |
| `market`    | string | Market id (`0x` hex string). |
| `best_bid`  | number | Best bid price.              |
| `best_ask`  | number | Best ask price.              |
| `timestamp` | number | Feed timestamp.              |

## No pending feed

Clob channels have no pending/confirmed concept — `confirmed: false` does not apply. The pending feed streams pending on-chain transactions; the CLOB feed is off-chain order-book state, so there is nothing to mirror. See [Mempool](/websockets/mempool) for the channels that do have a pending feed.
