Skip to main content
Hyperliquid exposes a native WebSocket endpoint at wss://api.hyperliquid.xyz/ws. The SDK discovers this URL from the wsUrl field in the GET /providers response. If you’re using the SDK, see Streaming instead. For the full WebSocket protocol specification (message format, keepalive, and subscription channels), see the Hyperliquid WebSocket documentation.

SDK Channel Mapping

The SDK maps between normalized channel names and Hyperliquid-native channels: marketContext subscribes to Hyperliquid’s activeAssetCtx feed for the requested marketId. Each emitted SDK event contains a normalized MarketContext snapshot with mark price, oracle price, previous-day price, 24h volume, open interest, and funding when the venue includes them. marketsContext combines Hyperliquid’s compressed asset-context feeds with fastAssetCtxs, so the SDK can stream the all-market context map while keeping high-frequency mid and mark prices fresh. positions and accountSummary are two normalized views over the same allDexsClearinghouseState wire subscription — subscribing to both for one address opens a single upstream feed.

Rate Limits

Hyperliquid enforces per-connection limits:
  • 1000 total subscriptions per WebSocket connection
  • 10 user-specific subscriptions per connection (orderUpdates, userFills, allDexsClearinghouseState, spotState)