Skip to main content
Schema: hypercore.core Table: ez_perp_liquidations Type: View

What

Perpetual market liquidation events from the liquidated user’s perspective, with counterparty information. Comparable to Tornado and lending protocol liquidation tables.

Sample queries

-- Liquidation heatmap: when do liquidations spike? (last 14 days)
SELECT
    block_timestamp::DATE AS dt,
    HOUR(block_timestamp) AS hour_utc,
    coin,
    COUNT(*) AS liquidations,
    ROUND(SUM(trade_notional), 0) AS liquidated_usd,
    COUNT(DISTINCT liquidated_address) AS unique_users_liquidated
FROM hypercore.core.ez_perp_liquidations
WHERE block_timestamp >= DATEADD('day', -14, CURRENT_DATE)
    AND coin IN ('BTC', 'ETH')
GROUP BY 1, 2, 3
ORDER BY 1, 2;
-- Largest single liquidations (last 30 days)
SELECT
    block_timestamp,
    coin,
    liquidated_address,
    counterparty_address,
    liquidation_method,
    price,
    trade_size,
    ROUND(trade_notional, 2) AS notional_usd,
    liquidated_direction,
    ROUND(liquidated_closed_pnl, 2) AS realized_loss
FROM hypercore.core.ez_perp_liquidations
WHERE block_timestamp >= DATEADD('day', -30, CURRENT_DATE)
ORDER BY trade_notional DESC
LIMIT 25;

Columns

Column NameData TypeDescription
TRADE_IDNUMBERUnique trade identifier assigned by the Hyperliquid L1 matching engine.
BLOCK_NUMBERNUMBERL1 block number containing this event.
BLOCK_TIMESTAMPTIMESTAMP_NTZBlock production timestamp on the Hyperliquid L1. This is the canonical time for ordering blockchain events.
COINTEXTRaw asset identifier. Perps use plain ticker (e.g. BTC), spot uses @token_index format (e.g. @2), prelaunch uses xyz:name prefix.
SYMBOLTEXTHuman-readable trading symbol. Resolved from token metadata for spot tokens; same as coin for perps.
TRADE_TIMESTAMPTIMESTAMP_NTZExact fill timestamp from the matching engine, may differ slightly from block_timestamp.
TX_HASHTEXTL1 transaction hash uniquely identifying the on-chain transaction.
PRICEFLOATExecution price in USD for this trade.
TRADE_SIZEFLOATSize of the trade in base asset units.
TRADE_NOTIONALFLOATUSD notional value of the trade (price x size), rounded to 2 decimal places.
LIQUIDATED_USERTEXTAddress of the user being liquidated. NULL if this is not a liquidation trade.
LIQUIDATION_MARK_PRICEFLOATMark price at the time of liquidation. NULL if not a liquidation.
LIQUIDATION_METHODTEXTMethod used for the liquidation (e.g. backstop, market). NULL if not a liquidation.
LIQUIDATED_ADDRESSTEXTAddress of the liquidated user on this trade.
COUNTERPARTY_ADDRESSTEXTAddress of the counterparty (liquidator or backstop vault).
LIQUIDATED_DIRECTIONTEXTTrade direction of the liquidated user’s position.
LIQUIDATED_FEEFLOATFee charged to the liquidated user.
LIQUIDATED_CLOSED_PNLFLOATRealized PnL for the liquidated user.
LIQUIDATED_START_POSITIONFLOATLiquidated user’s position size before the liquidation fill.
FEE_TOKENTEXTToken in which trading fees are denominated.
MARKET_TYPETEXTType of market: ‘perp’ for perpetual futures, ‘spot’ for HIP-1 token trading, ‘prelaunch’ for pre-listing futures.
MODIFIED_TIMESTAMPTIMESTAMP_NTZTimestamp when the record was last modified in this table (Snowflake SYSDATE).
FACT_TRADES_IDTEXTSurrogate key for fact_trades, generated as MD5 hash of trade_id.
EZ_PERP_LIQUIDATIONS_IDTEXTSurrogate key for this liquidation record, generated from fact_trades_id and liquidated_user.
_INVOCATION_IDTEXTdbt invocation identifier for tracking which run produced this record.