Hyperliquid L4
HYPERLIQUIDL4-only WebSocket DS feeds for L4 order book, L4 trades, oracle enrichment, TWAP statuses, and raw node events.
Hyperliquid L4
The WebSocket DS API provides six HYPERLIQUIDL4-only data types:
| Data type | Description |
|---|---|
book_l4 | Full Hyperliquid L4 order book snapshots and updates. Each order includes an order id, price, size, update type, and Hyperliquid user address. |
trade_l4 | Hyperliquid L4 executed transactions. Each trade includes price, size, taker side, and the taker and maker user addresses. |
hl_oracle_prices | Hyperliquid oracle and mark price enrichment per coin, including daily values and input price components. |
hl_twap_statuses | Hyperliquid TWAP status updates per TWAP id and coin, including progress metrics and execution status. |
hl_misc_events | Hyperliquid raw node misc events with block number, event type, and raw JSON payload. |
hl_system_events | Hyperliquid raw node system action events with block number, action type, and raw JSON payload. |
[!NOTE]
These data types are available only from the Hyperliquid L4 WS DS data source. They are not available on other exchange WS DS streams.
Endpoint
Use the dedicated hyperliquidl4 WS DS data source:
wss://hyperliquidl4.ws-ds.md.coinapi.io/You can authenticate with any WS DS authentication method documented in the Authentication section. For example, using the API key in the URL path:
wscat --connect wss://hyperliquidl4.ws-ds.md.coinapi.io/APIKEY-YOUR_API_KEYSubscribe
After connecting, send a hello message with one or more Hyperliquid data types. For symbol-level feeds (book_l4, trade_l4, hl_oracle_prices, hl_twap_statuses), define a symbol filter for the pairs you want to receive.
{
"type": "hello",
"heartbeat": false,
"subscribe_data_type": ["book_l4", "trade_l4"],
"subscribe_filter_symbol_id": [
"HYPERLIQUIDL4_PERP_BTC_USDC",
"HYPERLIQUIDL4_SPOT_AZTEC_USDC"
]
}To subscribe to all Hyperliquid enrichment and raw event feeds:
{
"type": "hello",
"heartbeat": false,
"subscribe_data_type": [
"hl_oracle_prices",
"hl_twap_statuses",
"hl_misc_events",
"hl_system_events"
],
"subscribe_filter_symbol_id": [
"HYPERLIQUIDL4_PERP_BTC_USDC",
"HYPERLIQUIDL4_PERP_ETH_USDC"
]
}To subscribe only to L4 transactions:
{
"type": "hello",
"subscribe_data_type": ["trade_l4"]
}Use the REST symbol metadata endpoints to discover active symbols, then subscribe to the HYPERLIQUIDL4_* symbols you need. The L4 real-time data itself is delivered through this WS DS stream.
Order Book L4
book_l4 provides order-by-order Hyperliquid book data. Snapshot messages contain the visible orders in the book. Update messages contain only the changed orders since the previous message.
Each ask or bid entry includes:
| Field | Description |
|---|---|
| id | Exchange-provided order identifier. |
| price | Order price. |
| size | Order size. |
| user | User or account identifier associated with the order, as provided by the exchange. |
| cloid | Client order identifier, when provided by the exchange. |
| order_type | Order type. Examples: Limit, Market, Take Profit Limit, Take Profit Market, Stop Market, Stop Limit. |
| orig_size | Original order size at placement. |
| update_type | Type of order book update. Present on incremental updates only. |
| hl4_status | Hyperliquid L4 order status. Present on incremental updates only. See the full enum in Messages. |
| tif | Time-in-force value, when provided by the exchange. |
| reduce_only | Indicates whether the order is reduce-only, when provided by the exchange. |
| trigger_condition | Human-readable trigger condition. N/A for regular orders. Examples: Price above 32886 or Price below 32886 for stop, take-profit, or stop-loss orders. |
| is_trigger | Indicates whether the order is a stop, take-profit, or stop-loss order that will activate when trigger_px is reached. false for regular limit orders. |
| trigger_px | Price at which a trigger order activates. 0.0 for non-trigger orders. |
| is_position_tpsl | Indicates whether the order is a take-profit or stop-loss that applies to an entire position, rather than a specific order. |
| is_child | Indicates whether the order is a child order in a bracket. Present on snapshot messages only. |
| children | Array of nested child orders attached to the parent order. Present on snapshot messages only. |
| children_oids | Comma-separated list of order IDs for bracket child orders attached to the parent order. Empty string or null when no children are attached. Present on snapshot messages only. |
On incremental updates, update_type is set when an order is accepted into the book, rejected when it is rejected, or delete when it is removed. hl4_status indicates the outcome using one of 18 status codes (for example, open, rejected_alo, rejected_margin, or reduce_only_canceled).
See the full book_l4 schema in Messages.
Trades L4
trade_l4 provides executed Hyperliquid transactions with user attribution for both sides of the match.
Each transaction includes:
| Field | Description |
|---|---|
| time_exchange | Exchange time of the transaction execution. |
| time_coinapi | CoinAPI time when the transaction was received from the exchange. |
| uuid | Exchange-provided unique identifier for the transaction. |
| price | Transaction execution price. |
| size | Executed transaction size. |
| taker_side | Aggressor side of the transaction. Possible values are BUY and SELL. |
| user_taker | User or account identifier associated with the taker side, as provided by the exchange. |
| user_maker | User or account identifier associated with the maker side, as provided by the exchange. |
| symbol_id | Our symbol identifier for the traded pair. For this data type, symbols belong to the HYPERLIQUIDL4 exchange. |
| sequence | Sequence number per pair (type, symbol_id) which is valid only for the lifespan of the connection. |
| type | Message type, always trade_l4 |
See the full trade_l4 schema in Messages.
Oracle Prices
hl_oracle_prices provides per-coin oracle and mark price updates derived from Hyperliquid HIP-3 oracle streams.
Each message can include validated prices, daily reference values, and raw input prices used in the update.
Common use cases:
- Real-time mark/oracle monitoring for liquidation and risk models.
- Alerting on mark-oracle divergence.
- Tracking data quality and source behavior through
update_classand input fields.
See the full hl_oracle_prices schema in Messages.
TWAP Statuses
hl_twap_statuses provides per-TWAP lifecycle updates and execution progress metrics.
Messages include execution sizes, notional progress, and additional execution attributes such as randomization and order timestamp.
Common use cases:
- Monitoring TWAP execution progress in real time.
- Detecting completion, termination, and error states.
- Building TWAP execution dashboards per coin and user.
See the full hl_twap_statuses schema in Messages.
Misc Raw Events
hl_misc_events provides raw node misc events as normalized envelopes with:
- exchange identifier,
- source block number,
- event type,
- JSON payload.
This feed is useful when you need low-level exchange-native event payloads in addition to normalized market data.
See the full hl_misc_events schema in Messages.
System Raw Events
hl_system_events provides raw node system action events as normalized envelopes with:
- exchange identifier,
- source block number,
- action type,
- JSON payload.
This feed is useful for monitoring account/system actions and preserving raw action payloads for audit pipelines.
See the full hl_system_events schema in Messages.
High Availability Setup for WebSocket DS
Configure exchange-specific WebSocket DS endpoints for regional resilience and customer-side failover.
Messages
WebSocket endpoint provides real-time market data streaming which works in Subscribe-Publish communication model. After establishing a WebSocket connection with us, you will need to send a Hello message documented below.