Live Data WebSocket API
liquidations
Liquidation events aggregated per liquidated user and block
Subscribe with
{"method":"subscribe","subscription":{"type":"liquidations"}}. The server first replays the latest cached events, then streams new ones in real time. Frames match LiquidationsUpdate in components/schemas of the same OpenAPI file.
Aggregation model
Hyperliquid emits one fill per counterparty when liquidating a position. This stream rolls those fills back into a single event per liquidated user, per block:- Fills are grouped by
(liquidatedUser, time_ms). Within a group, the victim’s fills (whereuser_addr == liquidatedUser) are aggregated; the other addresses becomeliquidators. size_total,notional_total, andfee_total_liquidatedare summed across the victim’s fills.fill_px_vwap = notional_total / size_total(volume-weighted).liq_diris derived from the victim’sdirfield (Close Long⇒long,Close Short⇒short).liquidatorsis deduplicated and lowercased;liquidator_countis its length.tidis the largest trade ID in the group (a liquidation may span severaltids, one per counterparty).
One or more liquidation events aggregated from the latest block(s). Broadcast to all liquidations subscribers, and also sent as the initial payload right after subscribing (with count: 0 and an empty data array if no recent events are cached).