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

# CLOB Rewards

> Stream CLOB reward changes for markets.

<Note>
  **Room ID:** `polymarket_clob_rewards` \
  **Endpoint:** `wss://api.struct.to/ws` \
  **Rate:** 0.01 credits per message
</Note>

Stream CLOB reward changes for Polymarket markets. You can subscribe to specific markets by condition ID. If `condition_ids` is omitted or empty, the room subscribes to all markets by default. A maximum of 500 filters is allowed per client.

<Tip>
  **Related guide:** [Ranking markets by CLOB rewards](/guides/clob-liquidity-markets-dashboard) combines this room with the markets list to surface markets paying the highest daily rates.
</Tip>

## Subscribe

All filters are optional. If `condition_ids` is omitted or empty, the room subscribes to all markets by default.

### Filters

| Filter          | Type       | Required | Description                                                                         |
| --------------- | ---------- | -------- | ----------------------------------------------------------------------------------- |
| `condition_ids` | `string[]` | No       | Specific markets to track by condition ID                                           |
| `subscribe_all` | `boolean`  | No       | Firehose: receive all reward changes across every market. Overrides `condition_ids` |

### Example

```json theme={null}
{
  "type": "join_room",
  "payload": {
    "room_id": "polymarket_clob_rewards"
  }
}
```

```json theme={null}
{
  "type": "room_message",
  "payload": {
    "room_id": "polymarket_clob_rewards",
    "message": {
      "action": "subscribe"
    }
  }
}
```

### Response

```json theme={null}
{
  "type": "clob_rewards_stream_subscribe_response",
  "room_id": "polymarket_clob_rewards",
  "data": {
    "condition_ids": [],
    "rejected": []
  }
}
```

## Events

### `clob_rewards_update`

The event includes an `event_type` field indicating whether a reward was `added`, `removed`, or `updated`.

```json theme={null}
{
  "type": "clob_rewards_update",
  "room_id": "polymarket_clob_rewards",
  "data": {
    "event_type": "updated",
    "condition_id": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "reward": {
      "condition_id": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
      "rewards_config": [
        {
          "id": 1,
          "asset_address": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
          "start_date": "2025-01-01",
          "end_date": "2025-12-31",
          "rate_per_day": 50.0,
          "total_rewards": 18250.0
        }
      ],
      "rewards_max_spread": 0.04,
      "rewards_min_size": 20.0,
      "native_daily_rate": 100.0,
      "sponsored_daily_rate": 50.0,
      "total_daily_rate": 150.0,
      "sponsors_count": 1
    },
    "timestamp_ms": 1743500000000
  }
}
```

For `removed` events, the `reward` field is `null`.
