Streaming is billed in compute units per active subscription per minute. Grab
your API key from the Uniblock dashboard.
Endpoint
chainId query parameter is required.
Authentication
Two ways to authenticate the connection and validation requests:- Header — include
X-API-KEY: YOUR_API_KEYin your request headers (recommended). - URL query parameter — append
apiKey=YOUR_API_KEYto the connection string.
Header authentication is recommended to avoid exposing your API key in URLs,
server logs, or browser history.
Subscribe and unsubscribe
Once connected, send a JSONsubscribe message. Each message targets a subscription type, and most types accept an optional coin filter.
coinaccepts a single asset ("HYPE") or an array (["HYPE", "BTC"]).- Omitting
coinstreams all assets (wildcard) for the types that support it — billed at a much higher per-minute rate.
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; specifymarketTypes (["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-KEYheader 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
coininstead 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
- Connect & migrate — connect and move off the public WebSocket.
- GoldRush provider reference — the provider page with the full type list and CU pricing.
- Streaming Hyperliquid with WebSockets — end-to-end usage guide.