> ## 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.

# Firehose

> Subscribe to the full, unfiltered stream of any room with subscribe_all.

Most rooms accept a `subscribe_all` boolean on the subscribe message to receive **every** update on that stream instead of a targeted subset. Reach for it when you want the full feed and intend to filter or fan out downstream, for example to warm a cache, drive an analytics pipeline, or mirror a room into your own store.

## Enabling firehose

Set `subscribe_all: true` on the `subscribe` message after joining the room:

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

In firehose mode, `polymarket_order_book` conflates the full stream into `order_book_batch` envelopes emitted every 50ms rather than a message per book change, so you receive periodic batched snapshots instead of a raw per-update feed.

Behaviour is consistent across rooms:

* **Targeting filters are ignored** while `subscribe_all` is set. This is the id/slug/address selector each room uses to scope the stream, for example `condition_ids`, `event_slugs`, `position_ids`, `tags`, `traders`, or `wallets`.
* **Secondary filters still apply.** Modifiers that shape the payload rather than pick a target keep working, for example `timeframes` on the metrics rooms, `reasons` on `polymarket_trader_exit_markers`, and the `include_*` flags on `polymarket_accounts`.
* **Some rooms firehose implicitly.** `polymarket_trades` and `polymarket_oracle_events` treat an empty filter set as a firehose, so `subscribe_all: true` there is just the explicit form of "no filters".

## Per-room behaviour

| Room                                                                        | Targeting filter (ignored)                                                               | Filters that still apply | Notes                                                           |
| --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ------------------------ | --------------------------------------------------------------- |
| [`polymarket_trades`](/websockets/rooms/trades)                             | `condition_ids`, `market_slugs`, `event_slugs`, `position_ids`, `traders`, `trade_types` | `status`                 | Empty filters imply firehose.                                   |
| [`polymarket_oracle_events`](/websockets/rooms/oracle-events)               | all filters                                                                              | `status`, `rejected`     | Empty filters imply firehose.                                   |
| [`polymarket_asset_window_updates`](/websockets/rooms/asset-window-updates) | `asset_symbols`, `timeframes`                                                            | —                        |                                                                 |
| [`polymarket_market_metrics`](/websockets/rooms/market-metrics)             | `condition_ids`                                                                          | `timeframes`             |                                                                 |
| [`polymarket_event_metrics`](/websockets/rooms/event-metrics)               | `event_slugs`                                                                            | `timeframes`             |                                                                 |
| [`polymarket_tag_metrics`](/websockets/rooms/tag-metrics)                   | `tags`                                                                                   | `timeframes`             |                                                                 |
| [`polymarket_position_metrics`](/websockets/rooms/position-metrics)         | `position_ids`                                                                           | `timeframes`             |                                                                 |
| [`polymarket_holder_metrics`](/websockets/rooms/holder-metrics)             | `position_ids`, `condition_ids`, `event_slugs`                                           | —                        |                                                                 |
| [`polymarket_trader_exit_markers`](/websockets/rooms/trader-exit-markers)   | `traders`                                                                                | `reasons`                |                                                                 |
| [`polymarket_accounts`](/websockets/rooms/accounts)                         | `wallets`                                                                                | `include_*` flags        |                                                                 |
| [`polymarket_order_book`](/websockets/rooms/order-book)                     | `condition_ids`, `position_ids`                                                          | —                        | Delivered as conflated `order_book_batch` envelopes every 50ms. |
| [`polymarket_clob_rewards`](/websockets/rooms/clob-rewards)                 | `condition_ids`                                                                          | —                        |                                                                 |
| [Liquidity rooms](/websockets/rooms/liquidity)                              | `id` filters                                                                             | —                        | Omitting filters also firehoses.                                |

<Warning>
  Firehose subscriptions are billed per message like any other, and the full stream can be high volume. Check the room's rate on [WebSocket Pricing](/websockets/pricing) before turning it on, and prefer server-side targeting filters when you only need a slice.
</Warning>

## Confirming the subscription

The room's `*_subscribe_response` echoes `subscribe_all` so you can confirm the firehose is active:

```json theme={null}
{
  "type": "order_book_stream_subscribe_response",
  "message": { "subscribe_all": true }
}
```

## Practical tips

* **Compress the firehose.** The full stream is exactly where [zstd compression](/websockets/compression) earns its keep. Turn it on at the handshake before subscribing.
* **Filter downstream, not by reconnecting.** A firehose plus server-side fan-out is cheaper to operate than churning targeted subscriptions, but you still pay per message, so only firehose what you'll actually consume.
* **Order book is pre-batched.** `polymarket_order_book` conflates its firehose into `order_book_batch` envelopes every 50ms, so you get periodic batched snapshots rather than a message per book change.

<Tip>
  The [dashboard websockets playground](https://www.struct.to/dashboard/websockets) exposes `subscribe_all` as a per-room toggle, so you can preview a room's firehose volume and payload before committing to it in code.
</Tip>

## Next steps

* [Compression](/websockets/compression) — zstd delivery for the high-volume streams firehose produces.
* [Rooms](/websockets/rooms/trades) — every stream and its filters.
* [WebSocket Pricing](/websockets/pricing) — per-message rates per room.
