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

# Subscriptions

> Subscribe, unsubscribe, and manage your stream

## Subscribe

Send a subscribe message to start receiving events:

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

Response:

```json theme={null}
{"action": "subscribed", "id": "default", "sub_id": 1, "total_subs": 1}
```

## Subscribe with custom ID

Give your subscription a name for easier management:

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

## Multiple subscriptions

You can have multiple active subscriptions on one connection. Each gets its own ID:

```json theme={null}
{"action": "subscribe", "id": "orders", "filters": {"action_types": ["order", "fill"]}}
{"action": "subscribe", "id": "btc-cancels", "filters": {"action_types": ["cancel"], "assets": ["BTC"]}}
```

An event matching multiple subscriptions is sent once (deduplicated per connection).

## Unsubscribe

```json theme={null}
{"action": "unsubscribe", "id": "btc-cancels"}
```

## Ping/pong

The server sends WebSocket ping frames every 30 seconds. Most libraries handle this automatically. You can also send application-level pings:

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

Response:

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

## Common subscription patterns

**Everything (firehose):**

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

\~6,500 events/sec on mainnet. Both pre-consensus and confirmed.

**Orders and fills only (recommended for most users):**

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

\~200 events/sec. Every order placement and trade execution.

**Track a specific wallet:**

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

Only events from this address. Works across all asset types.

**BTC only:**

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

All event types but only for Bitcoin.

**Pre-consensus signals:**

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

Cancel and modify actions before they are committed. Arrives \~1 second early.

**Confirmed orders only (no noise):**

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

The `"order"` umbrella matches: `order`, `order_filled`, `order_canceled`, `order_rejected`. New resting orders have type `order` with `data.status: "open"`.

**Prediction markets:**

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

Track a specific outcome token.

## Subscription limits

| Tier       | Max connections | Max subscriptions |
| ---------- | --------------- | ----------------- |
| free       | 1               | 1                 |
| starter    | 5               | 50                |
| growth     | 10              | 500               |
| pro        | 150             | 5,000             |
| enterprise | 500             | 100,000           |

Exceeding your subscription limit returns an error:

```json theme={null}
{"error": "subscription limit reached for growth tier (max 500)"}
```

## HyperEVM transactions

Subscribe to pre-block HyperEVM smart contract transactions using the `evmRawTx` action type:

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

Events arrive with `consensus: "pre"` and a `data` field containing the raw RLP-encoded signed transaction as a hex string. See [Event Types](/api/events#evmrawtx-example-pre-block-hyperevm) for the full decoding example.
