Skip to main content
Connect to /ws on the base URL supplied by Spire. This endpoint uses Hyperliquid’s WebSocket wire. It sends no session greeting and requires no book snapshot or per-connection account binding.

Send actions or queries

Wrap the same signed request you would send to POST /exchange:
The empty action/signature above marks where your SDK-generated signed request goes. The response echoes your ID:
For reads, use request.type: "info" and the ordinary /info payload. Match replies by ID; subscription messages may arrive between them.

Subscribe

Use the full master address in place of the placeholder. The server acknowledges on subscriptionResponse. Supported subscriptions are: Unsubscribe by sending the same subscription with method:"unsubscribe". Queries and subscriptions for a user address are public, as on Hyperliquid. Book price aggregation and aggregateByTime:true are unsupported and rejected.

Keep alive and reconnect

Send {"method":"ping"} periodically; the reply is {"channel":"pong"}. The connection closes after 60 seconds without a received message. Limits are 32 subscriptions per connection and 1 MiB per input message. Slow consumers are disconnected when their output queue fills or they fall behind retained events. GTC orders remain open after disconnect. On reconnect, query openOrders and userFills, restore subscriptions, and deduplicate fills by master and tid. The fill snapshot is bounded to the latest 2000 records. Persist your own history; no fill_ack is required. See fills.