Skip to main content

hl_subscribe JSON-RPC Method

Subscribes to real-time updates from specified Hyperliquid streams via WebSocket.

Updated on
Oct 09, 2026
Access to /hypercore JSON-RPC methods requires a Build plan or higher. View pricing to upgrade. For complete stream type definitions and filtering options, see the datasets documentation. For concurrent stream caps and filter limits by plan, see the Streaming Limits table.

Need Low Latency?

For latency-sensitive applications, use HyperCore gRPC instead of WebSocket subscriptions. Quicknode's gRPC streaming API delivers market data with significantly lower overhead and is purpose-built for high-frequency trading and time-critical use cases.

Always send the full JSON-RPC envelope

Subscribe messages on /hypercore/ws must include the complete JSON-RPC envelope: jsonrpc, method, params, and id. If jsonrpc or id is omitted, the message is routed to a different internal parser and rejected with errors such as Invalid message: missing field 'type' or -32604.

Parameters

streamType
string
REQUIRED

Stream type to subscribe to: 'trades' (executed trades), 'orders' (order statuses - high volume), 'book_updates' (order book updates), 'twap' (TWAP history), 'events' (transfers, ledger updates including ledgerLiquidation records), 'writer_actions' (writer action events)

filters
object

Optional filters to apply to the stream. Each field maps directly to an array of filter values.

filterName
string

Optional name for this filter set (enables OR logic and named unsubscribe). To unsubscribe a named filter later, pass both streamType and filterName to hl_unsubscribe.

Returns

result
object

On subscribe: a confirmation object with a subscribed key. Afterwards, the server pushes data messages with the following shape for each new block containing stream events

type
string

Message type; always "data" for stream events

stream
string

Stream identifier for the subscribed stream. One of: "hl.trades", "hl.orders", "hl.book_updates", "hl.twap", "hl.events", "hl.writer_actions"

block
object

Block envelope containing stream events for this block

local_time
string

Server-side receive timestamp in ISO 8601 format with nanosecond precision

block_time
string

Chain block timestamp in ISO 8601 format with nanosecond precision

block_number
integer

Hyperliquid block height

events
array

Stream events for this block. Event format varies by stream type: see the datasets documentation for per-stream field definitions

Request
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free