Skip to main content
Uniblock’s Hyperliquid WebSocket gives you real-time access to HyperCore data — the native order book, perpetuals, and account event streams — over a single connection authenticated with your Uniblock API key. Because HyperCore isn’t a permissionless chain you can run a node for (see HyperCore vs. HyperEVM), a WebSocket is the way to get live order book data — and routing through Uniblock lifts the public API’s 1000-subscription-per-IP cap.
Streaming is billed in compute units per active subscription per minute. Grab your API key from the Uniblock dashboard.

Endpoint

A single fixed endpoint — no chainId query parameter is required.

Authentication

Two ways to authenticate the connection and validation requests:
  1. Header — include X-API-KEY: YOUR_API_KEY in your request headers (recommended).
  2. URL query parameter — append apiKey=YOUR_API_KEY to the connection string.
Header authentication is recommended to avoid exposing your API key in URLs, server logs, or browser history.
You can confirm your credentials before opening a stream:

Subscribe and unsubscribe

Once connected, send a JSON subscribe message. Each message targets a subscription type, and most types accept an optional coin filter.
  • coin accepts a single asset ("HYPE") or an array (["HYPE", "BTC"]).
  • Omitting coin streams all assets (wildcard) for the types that support it — billed at a much higher per-minute rate.
Stop a stream by sending the matching unsubscribe message with the exact same subscription body. Billing for that subscription stops as soon as it’s removed.

Available channels

Order book streams

Wallet & account activity streams

Connection & rate limits

Unlike the public Hyperliquid WebSocket’s 1000-subscription-per-IP cap, Uniblock imposes no subscription limit. Wildcard subscriptions default to perpetual markets only; specify marketTypes (["spot"], ["*"], …) to widen coverage on the types that support it.

Pricing

Streaming bills credits per minute for each active subscription, converted to compute units at 5,000 CU per credit. Charges accrue for as long as a subscription stays open.

Best practices

  • Security: use the X-API-KEY header where possible to avoid exposing your key.
  • Keep-alive: send a ping every 30–60 seconds to avoid idle timeouts.
  • Reconnect with backoff: on disconnect, re-open and re-send your subscriptions using exponential backoff.
  • Scope your subscriptions: subscribe per coin instead of the wildcard stream when you only need a handful of assets — it’s dramatically cheaper.

Build with the order book

L2 Order Book

Self-contained aggregated snapshots — top-of-book quotes and depth analytics.

L2 Book Diff

Snapshot plus per-block diffs — track live state with bandwidth proportional to changes.

L4 Order Book

Per-order flow with user, order ID, and trigger metadata for attribution.

Resources