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

# Filters

> Filter the event stream by type, asset, address, or consensus layer

Filters narrow the event stream to only matching events. All filter dimensions use **AND** logic: if multiple filters are specified, an event must match all of them.

## Filter fields

| Field               | Type       | Match Logic                                          | Case             |
| ------------------- | ---------- | ---------------------------------------------------- | ---------------- |
| `action_types`      | `string[]` | Match on event `type`                                | Case-sensitive   |
| `addresses`         | `string[]` | Match on event `user`                                | Case-insensitive |
| `assets`            | `string[]` | Match on event `asset`                               | Case-insensitive |
| `asset_ids`         | `number[]` | Match on event `asset_id`                            | Exact numeric    |
| `builders`          | `string[]` | Match on fill `data.builder` (HIP-3 builder address) | Case-insensitive |
| `liquidations_only` | `boolean`  | Match fills where `data.liquidation` is present      | N/A              |

## Behavior

* **Omitted filter** = matches everything (no restriction on that dimension)
* **Empty array** `[]` = matches nothing
* **No `filters` field** = firehose (all events)

## Umbrella types

Some type names match a group of related events:

| Filter value      | Matches                                                     |
| ----------------- | ----------------------------------------------------------- |
| `"order"`         | `order`, `order_filled`, `order_canceled`, `order_rejected` |
| `"fill"`          | `fill`                                                      |
| `"cancel"`        | `cancel`                                                    |
| `"cancelByCloid"` | `cancelByCloid`                                             |
| `"batchModify"`   | `batchModify`                                               |

Use exact type names like `"order_filled"` or `"order_rejected"` to match a single event type.

<Note>
  There is no `order_open` type. New resting orders use the type `"order"` with `data.status: "open"`. To get only new resting orders, subscribe to `"order"` and filter client-side by `data.status`.
</Note>

## Examples

**All orders and fills (most common):**

```json theme={null}
{"action": "subscribe", "filters": {"action_types": ["order", "fill"]}}
```

Returns: every new order, filled order, canceled order, rejected order, and every trade execution.

**Only BTC orders:**

```json theme={null}
{"action": "subscribe", "filters": {"action_types": ["order"], "assets": ["BTC"]}}
```

**Track a specific wallet:**

```json theme={null}
{"action": "subscribe", "filters": {"addresses": ["0xd071d6d6ea52f5aa34b79e47f908ee48c8215837"]}}
```

Returns all events from this address across both consensus layers.

**Pre-consensus cancels only:**

```json theme={null}
{"action": "subscribe", "filters": {"action_types": ["cancel", "cancelByCloid"]}}
```

These arrive before the cancel is committed to a block.

**Full firehose (everything):**

```json theme={null}
{"action": "subscribe"}
```

\~6,500 events per second on mainnet. Includes both pre-consensus and confirmed events.

**Prediction market activity:**

```json theme={null}
{"action": "subscribe", "filters": {"assets": ["#39890"]}}
```

Track a specific outcome token. Use the `#` coin name format.

**All fills across every market (allFills firehose):**

```json theme={null}
{"action": "subscribe", "filters": {"action_types": ["fill"]}}
```

Every trade execution network-wide. Useful for analytics, VWAP calculations, and market-wide tracking.

**Liquidations only:**

```json theme={null}
{"action": "subscribe", "filters": {"action_types": ["fill"], "liquidations_only": true}}
```

Only fills that were part of a liquidation event. Each matching fill carries a `data.liquidation` object with `liquidatedUser`, `markPx`, and `method`. Both sides of the liquidation (liquidated user and liquidator) appear as separate fills with the same `tid`.

**Fills for a specific builder (HIP-3):**

```json theme={null}
{
  "action": "subscribe",
  "filters": {
    "action_types": ["fill"],
    "builders": ["0x1924b8561eef20e70ede628a296175d358be80e5"]
  }
}
```

Only fills attributed to the given builder address via HIP-3. Useful for builder DEX operators tracking their own flow in real-time.

**Monitor liquidations for a specific wallet:**

```json theme={null}
{
  "action": "subscribe",
  "filters": {
    "action_types": ["fill"],
    "addresses": ["0xabc..."],
    "liquidations_only": true
  }
}
```

Alert-style feed for when a specific wallet is liquidated.
