Wire-compatible with wss://api.hyperliquid.xyz/wsl2Book subscriptions - same channel name, same levels shape.
coin is optional on GoldRush. Omit it to stream the entire L2 order book across every asset on a single subscription. The public Hyperliquid API requires coin and locks each subscription to one asset at a time.
When coin is omitted, the optional marketTypes filter selects which market families to include. It defaults to ["perp"] only.
Pass "marketTypes": ["spot"], or "marketTypes":["outcome"], or a mix (e.g. "marketTypes": ["perp","spot"]), or use the wildcard "marketTypes": ["*"] to opt into spot, perps, outcome, and any future market types.
No 1000-subscription-per-IP cap - multiplex hundreds of l2Book subscriptions on a single connection.
Asset symbol - e.g. "BTC", "ETH", "@107" for spot pairs. For HIP-3 markets, include the deployer prefix. Omit to receive snapshots for all perp assets (the default; see marketTypes to include spot or outcome markets).
Optional. Selects which market families a wildcard subscription includes. Only valid when coin is omitted.Defaults to ["perp"] - when omitted, only perp markets stream. Spot and outcome markets require explicit opt-in.Accepted values:
"spot" - @<index> spot markets and legacy spot pairs (e.g. @1, @107 for HYPE spot, PURR/USDC). Not included by default.
"outcome" - HIP-4 prediction-market outcomes (e.g. #700, #710, #741). Not included by default.
"*" - every current type ("perp" + "spot" + "outcome") and auto-opt-in to any future types the server adds.
Mix and match in one subscription, e.g. ["perp", "outcome"]. A second subscribe with a different marketTypes value replaces the previous filter rather than coexisting with it.
Unsubscribe matches subscriptions by exact body. A subscription created with coin: ["BTC", "ETH"] is a different subscription from one created with coin: "BTC" or coin: "ETH".You cannot unsubscribe a partial set of coins from an existing multi-coin subscription. To narrow the set, unsubscribe the original coin array in full, then resubscribe with the smaller list:
// Drop ETH from a ["BTC","ETH"] subscription:{ "method": "unsubscribe", "subscription": { "type": "l2Book", "coin": ["BTC", "ETH"] } }{ "method": "subscribe", "subscription": { "type": "l2Book", "coin": ["BTC"] } }