hyperliquid-websocket

Subscribe to live Hyperliquid market and account data over WebSocket for monitoring and alerts.

Updated Sep 7, 2026
One-click install
npx skills add https://github.com/swcstudiospace/hypergrok-autonomous-desk --skill hyperliquid-websocket-swcstudiospace
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: hyperliquid-websocket
Source: https://github.com/swcstudiospace/hypergrok-autonomous-desk/tree/main/skills/hyperliquid-websocket
Command: npx skills add https://github.com/swcstudiospace/hypergrok-autonomous-desk --skill hyperliquid-websocket-swcstudiospace

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires hyperliquid, @nktkas/hyperliquid.

What problem does it solve? Polling Hyperliquid's REST API for fills, order updates, and price movements is slow and rate-limited; this Skill provides read-only WebSocket subscriptions that stream mids, order books, trades, candles, and per-account events in real time. ## Core Features & Use Cases - Market Data Streams: Subscribe to allMids, l2Book order books, trades, candles, BBO, and asset context for any coin on mainnet or testnet. - Account Event Streams: Receive userFills, orderUpdates, userEvents, funding payments, and clearinghouse state for a given account address without any API key. - Supervised Watch Pattern: Run a background watch process that logs every message to a file, evaluates an alert condition, and posts a single alert with value, threshold, and UTC timestamp. - Use Case: You want to be notified the moment one of your desk's orders fills. Run the Python SDK example subscribing to userFills for your account address, log to watch/ws.log, and alert on each non-snapshot fill. ## Quick Start Ask the assistant to set up a WebSocket watch that subscribes to userFills and orderUpdates for your Hyperliquid account address on testnet and logs every event to a file.

Frequently Asked Questions about hyperliquid-websocket

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I subscribe to Hyperliquid WebSocket fills for my account?▼

Send a subscribe message with subscription type userFills and your account address, or call info.subscribe({"type": "userFills", "user": address}, callback) with the Python SDK. The first message is a snapshot with isSnapshot true; only later messages are new fills.

What subscription types does the Hyperliquid WebSocket API support?▼

Supported types include allMids, l2Book, trades, candle, bbo, activeAssetCtx, userFills, orderUpdates, userEvents, userFundings, activeAssetData, clearinghouseState, openOrders, twapStates, and webData3. Each takes a JSON subscription object with fields like coin, user, or interval.

Does the Hyperliquid Python SDK reconnect after a WebSocket disconnect?▼

No, the official Python SDK pings automatically but does not reconnect on drop. Run the watch under a supervisor, log a heartbeat, and restart the process if the log goes stale for more than a few minutes.

Why is my Hyperliquid WebSocket subscription acknowledged but no data arrives?▼

The Python SDK only routes certain subscription types to callbacks; types like clearinghouseState, openOrders, twapStates, and webData3 are acknowledged by the server but silently dropped by the SDK. Use the raw socket or the TypeScript client for those.

What are the Hyperliquid WebSocket rate limits per IP?▼

Limits are up to 10 connections, 30 new connections per minute, 1000 subscriptions, 10 distinct users across user subscriptions, and 2000 messages per minute. The server closes any connection silent for 60 seconds, so send pings or expect activity within that window.

Can I use the Hyperliquid WebSocket without an API key?▼

Yes, all WebSocket subscriptions are read-only and require no key or signature. Account streams like userFills and orderUpdates only need the public account address, and the skill never calls the /exchange endpoint.