Streams guide

Server-side filtering

Every stream filters at our edge, not in your client. Messages you didn't subscribe to never cross the wire, so you only pay bandwidth for what you asked for.

What each stream can filter on

Filter options differ by stream family. The matrix below is the authoritative list; each stream's guide repeats its own row.

StreamServer-side filter options
Trades / Swaps
  • coins[]: one or more markets
  • wallets[]: one or more trader addresses
  • market_type: ALL / SPOT / PERP
  • replay from a block height
L2 Order Book
  • coin: required, one market per subscription
  • n_levels: 1 to 100
L4 Order Book
  • coin: required, one market per subscription
  • replay from a block height
Order lifecycle
  • coins[]
  • wallets[]
  • replay from a block height
Raw book diffs
  • coins[]
  • replay from a block height
TWAP algos
  • coins[]
  • wallets[]
  • replay from a block height
Events
  • coins[]
  • wallets[]
  • replay from a block height
Blocks
  • replay from a block height
Dedicated BTC price
  • none (the stream is pre-filtered to BTC by design)
Dwellir-compatible gateway
  • per the gateway request messages (coin, height), identical to Dwellir's

Native streams: coins, wallets, market_type

The swaps stream takes flat, repeated filter fields directly on the request. All three are optional and combine with AND semantics: values within one field are OR'd, fields are AND'd.

FieldTypeDescription
coinsstring[]One or more market symbols. Empty means every market.
walletsstring[]One or more trader addresses. Only their fills are delivered.
market_typeenumALL, SPOT, or PERP.
start_blockuint64Replay from this height first, then continue live.See Replay & backfill.
# HYPE perp fills from two specific wallets (nothing else is sent)grpcurl -H 'x-api-key: YOUR_KEY' \  -d '{"coins":["HYPE"],"wallets":["0x7c4ee0c0c5d3ab91f7f0f3c2a3d6b18452e9a3f9","0x91b3c07a4de2f6cc185a0fd2b94e7a30c8d1572e"],"market_type":"PERP"}' \  stream.hyperliquidrpc.com:443 \  hyperliquid_swaps.v1.SwapStreaming/StreamSwaps

StreamData family: the filters map

Orders, raw book diffs, TWAP, and events share the QuickNode-compatible StreamData subscription. Filtering is a generic map from event field to allowed values, matched against each event server-side. coin and user are the common keys, and the events stream additionally matches on type.

# Order lifecycle for one wallet on two marketsgrpcurl -H 'x-api-key: YOUR_KEY' \  -d '{"subscribe":{"stream_type":"ORDERS","filters":{"coin":{"values":["BTC","ETH"]},"user":{"values":["0x91b3c07a4de2f6cc185a0fd2b94e7a30c8d1572e"]}}}}' \  stream.hyperliquidrpc.com:443 \  hyperliquid.Streaming/StreamData # Liquidation events only, platform-widegrpcurl -H 'x-api-key: YOUR_KEY' \  -d '{"subscribe":{"stream_type":"EVENTS","filters":{"type":{"values":["liquidation"]}}}}' \  stream.hyperliquidrpc.com:443 \  hyperliquid.Streaming/StreamData

Within one filter, fields AND together and values within a field OR together. To express OR across field combinations, say “all of wallet A's orders, plus everything on BTC”, attach a filter_name to each subscription and send several; named filters run independently on the same stream.

Order-book streams: one coin per subscription

StreamL2Book and StreamL4Book take a required coin (exactly one market per subscription), and L2 adds n_levels (1–100) to size the depth you receive. Track several markets by opening one stream per coin; book updates are per-block, so subscriptions stay predictable.

# 10 levels of BTC depth; run one subscription per market you trackgrpcurl -H 'x-api-key: YOUR_KEY' \  -d '{"coin":"BTC","n_levels":10}' \  stream.hyperliquidrpc.com:443 \  hyperliquid.OrderBookStreaming/StreamL2Book

The BTC price ticker is the degenerate case: pre-filtered to BTC by design, no filter parameters at all.

Market symbols

  • Perps: the bare symbol: BTC, ETH, HYPE.
  • Spot: index form @N (e.g. @107), as used across Hyperliquid's spot markets.
  • HIP-3 / pre-market: namespaced dex:SYMBOL. New listings appear on the streams automatically; filters on other coins are unaffected.

Bandwidth: why filtering is the pricing model

A practical default: start with the tightest filter that answers your question, and widen only when the question changes. Quotas and per-tier egress allowances are on Rate limits & tiers.

Related