🔗 WebSocket DS API

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 typeDescription
book_l4Full Hyperliquid L4 order book snapshots and updates. Each order includes an order id, price, size, update type, and Hyperliquid user address.
trade_l4Hyperliquid L4 executed transactions. Each trade includes price, size, taker side, and the taker and maker user addresses.
hl_oracle_pricesHyperliquid oracle and mark price enrichment per coin, including daily values and input price components.
hl_twap_statusesHyperliquid TWAP status updates per TWAP id and coin, including progress metrics and execution status.
hl_misc_eventsHyperliquid raw node misc events with block number, event type, and raw JSON payload.
hl_system_eventsHyperliquid 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_KEY

Subscribe

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:

FieldDescription
idExchange-provided order identifier.
priceOrder price.
sizeOrder size.
userUser or account identifier associated with the order, as provided by the exchange.
cloidClient order identifier, when provided by the exchange.
order_typeOrder type. Examples: Limit, Market, Take Profit Limit, Take Profit Market, Stop Market, Stop Limit.
orig_sizeOriginal order size at placement.
update_typeType of order book update. Present on incremental updates only.
hl4_statusHyperliquid L4 order status. Present on incremental updates only. See the full enum in Messages.
tifTime-in-force value, when provided by the exchange.
reduce_onlyIndicates whether the order is reduce-only, when provided by the exchange.
trigger_conditionHuman-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_triggerIndicates 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_pxPrice at which a trigger order activates. 0.0 for non-trigger orders.
is_position_tpslIndicates whether the order is a take-profit or stop-loss that applies to an entire position, rather than a specific order.
is_childIndicates whether the order is a child order in a bracket. Present on snapshot messages only.
childrenArray of nested child orders attached to the parent order. Present on snapshot messages only.
children_oidsComma-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:

FieldDescription
time_exchangeExchange time of the transaction execution.
time_coinapiCoinAPI time when the transaction was received from the exchange.
uuidExchange-provided unique identifier for the transaction.
priceTransaction execution price.
sizeExecuted transaction size.
taker_sideAggressor side of the transaction. Possible values are BUY and SELL.
user_takerUser or account identifier associated with the taker side, as provided by the exchange.
user_makerUser or account identifier associated with the maker side, as provided by the exchange.
symbol_idOur symbol identifier for the traded pair. For this data type, symbols belong to the HYPERLIQUIDL4 exchange.
sequenceSequence number per pair (type, symbol_id) which is valid only for the lifespan of the connection.
typeMessage 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_class and 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.

Service StatusGitHub SDK