> For the complete documentation index, see [llms.txt](https://docs.hydromancer.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hydromancer.xyz/readme/websocket/rate-limits-user-limits-and-heartbeats.md).

# Rate limits, user limits and heartbeats

WebSocket connection, subscription and message limits per plan, plus heartbeats.

Websockets

**Connection & message limits:**

<table><thead><tr><th width="84.01959228515625"></th><th width="164.9609375">Max Connections</th><th width="202.1195068359375">Max Total Subscriptions</th><th>Max msgs to Hydromancer per minute</th><th>Orderbooks streamed</th></tr></thead><tbody><tr><td><strong>Starter</strong></td><td>50</td><td>500</td><td>300</td><td>10</td></tr><tr><td><strong>Growth</strong></td><td>500</td><td>5000</td><td>3000</td><td>50</td></tr><tr><td><strong>Scale</strong></td><td>1000</td><td>10000</td><td>6000</td><td>100</td></tr></tbody></table>

**Note**: every address passed in subscription logic counts as 1 subscription for ones where you can pass multiple (applicable to userFills, userOrderUpdates, userTwapStatusUpdates, userNonFundingLedgerEvents, userLeverageUpdates and userIsolatedMarginUpdates).

**Subscription type limits:**

|                                               | Starter                              | Growth                        | Scale                         |
| --------------------------------------------- | ------------------------------------ | ----------------------------- | ----------------------------- |
| **userFills**                                 | unlimited per key                    | unlimited per key             | unlimited per key             |
| **builderFills**                              | 3 builders per key, add-ons possible | 10 builders, add-ons possible | 20 builders, add-ons possible |
| **liquidationFills**                          | 1 sub per key                        | 2 subs per key                | 2 subs per key                |
| **allFills** (per-coin)                       | 20 coins                             | 100 coins                     | 200 coins                     |
| **allFills** (all coins) - *add-on websocket* | 400$ per connection                  | 400$ per connection           | 400$ per connection           |
| **trades** (per-coin)                         | 20 coins                             | 100 coins                     | 200 coins                     |
| **trades** (all coins) - *add-on websocket*   | 400$ per connection                  | 400$ per connection           | 400$ per connection           |
| **userOrderUpdates**                          | unlimited per key                    | unlimited per key             | unlimited per key             |
| **builderOrderUpdates**                       | 3 builders per key, add-ons possible | 10 builders, add-ons possible | 20 builders, add-ons possible |
| **userNonFundingLedgerEvents**                | unlimited per key                    | unlimited per key             | unlimited per key             |
| **allUserNonFundingLedgerEvents**             | 1 sub per key                        | 2 subs per key                | 2 subs per key                |
| **allTwapStatusUpdates**                      | 1 sub per key                        | 2 subs per key                | 2 subs per key                |
| **userTwapStatusUpdates**                     | unlimited per key                    | unlimited per key             | unlimited per key             |
| **activeAssetCtx**                            | unlimited per key                    | unlimited per key             | unlimited per key             |
| **setOracleUpdates**                          | 100 subs per key                     | 100 subs per key              | 100 subs per key              |
| **perpPrices**                                | 10 coins                             | 100 coins                     | 200 coins                     |
| **allPerpPrices** - *add-on websocket*        | 1 sub per add-on grant               | 1 sub per add-on grant        | 1 sub per add-on grant        |
| **l4BookUpdates**                             | 10 coins                             | 100 coins                     | 200 coins                     |
| **tpslUpdates**                               | 5 coins                              | 50 coins                      | 200 coins                     |
| **l2Book**                                    | 10 coins                             | 50 coins                      | 100 coins                     |
| **l2BookDiff**                                | 10 coins                             | 100 coins                     | 200 coins                     |
| **bbo**                                       | 20 coins                             | 100 coins                     | 200 coins                     |
| **candle**                                    | 10 subs per key                      | 50 subs per key               | 100 subs per key              |
| **userLeverageUpdates**                       | unlimited per key                    | unlimited per key             | unlimited per key             |
| **allLeverageUpdates**                        | 1 sub per key                        | 2 subs per key                | 3 subs per key                |
| **userIsolatedMarginUpdates**                 | unlimited per key                    | unlimited per key             | unlimited per key             |
| **allIsolatedMarginUpdates**                  | 1 sub per key                        | 2 subs per key                | 3 subs per key                |
| **fundingRates**                              | 2 subs per key                       | 2 subs per key                | 2 subs per key                |
| **builderCompletedTrades**                    | 3 builders per key, add-ons possible | 10 builders, add-ons possible | 20 builders, add-ons possible |
| **builderLiquidations**                       | 3 builders per key, add-ons possible | 10 builders, add-ons possible | 20 builders, add-ons possible |

All-coins add-ons (`l4BookUpdatesAll`, `tpslUpdatesAll`, `l2BookDiffAll`, `l2BookAll`, `bboAll`, `allFills` with no coin filter, `trades` with no `coins` filter) are separate permission-gated subscriptions. They are not counted as separate per-coin subscriptions.

Need more than the Scale tier allows (e.g. market-making across the full instrument universe)? Bespoke higher limits are available — contact us.

## Handling limits

Connection and subscription cap errors name the limit and usage. Per-type subscription errors include the rejected request in the count, for example `Subscription limit reached for l4BookUpdates (11/10 subscriptions)`. Release unused subscriptions or connections before trying again.

Inbound messages share a fixed-window allowance per API key across its connections. A rejected message is not processed. Its error reports admitted usage, the configured cap/window, and the whole seconds (rounded up) until the current window resets:

```json
{
  "type": "error",
  "message": "Message rate limit exceeded (300/300 messages per 60 seconds); retry in 4 seconds. Further violations will be silently dropped.",
  "code": "message_rate_limit",
  "requestId": "subscribe-btc",
  "operation": "subscribe",
  "subscription": {"type": "bbo", "coin": "BTC"}
}
```

Subscription requests retain their operation, subscription and valid `requestId` in this feedback. Other message types receive the existing generic error envelope without subscription fields or code. Pause outbound messages for the reported delay before retrying; another connection on the same key can consume the refreshed allowance. Errors are best-effort and limited to one per second per key, so further violations can be silently dropped. The SDK does not use this delay to schedule a dedicated WebSocket cap retry; its existing reconnect settings still apply. Pause message production or release subscription usage explicitly.

**Heartbeat:**

* Ping interval: 60 seconds (respond with pong)
