Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.allium.so/llms.txt

Use this file to discover all available pages before exploring further.

The lighter.dex.liquidations table contains liquidation events only. The taker is the liquidated account, and the maker is the counterparty.

Table Details

PropertyValue
Clustering Key(s)to_date("timestamp") (base table)

Table Columns

Market Information

Column NameDescription
market_type’perpetuals’ or ‘spot’
coinMarket symbol
token_a_symbolBase token symbol
token_b_symbolQuote token symbol

Liquidation Details

Column NameDescription
amountLiquidation size in base asset units
priceExecution price
usd_amountUSD value of the liquidation
liquidated_account_idAccount ID of the liquidated party
counterparty_account_idAccount ID of the counterparty (maker)
liquidated_l1_addressEVM wallet address of the liquidated party. NULL if no mapping exists
counterparty_l1_addressEVM wallet address of the counterparty. NULL if no mapping exists
buyerAccount ID of the buyer (bid side)
sellerAccount ID of the seller (ask side)
buyer_l1_addressEVM wallet address of the buyer. NULL if no mapping exists
seller_l1_addressEVM wallet address of the seller. NULL if no mapping exists

Transaction Information

Column NameDescription
timestampUTC timestamp of the event
transaction_hashOn-chain transaction hash
trade_idUnique trade identifier
unique_idAlias of trade_id

Fees & Margins

Column NameDescription
liquidation_fee_rateLiquidation fee as decimal fraction
liquidation_fee_amountLiquidation fee in USD
liquidated_position_size_beforeLiquidated account’s position before event
liquidated_max_leverageLiquidated account’s max leverage
market_max_leverageMaximum leverage for this market
maintenance_margin_fractionMarket maintenance margin fraction
closeout_margin_fractionMarket closeout margin fraction

Sample Query

SELECT
    timestamp,
    coin,
    amount,
    price,
    usd_amount,
    liquidated_account_id,
    counterparty_account_id,
    liquidation_fee_amount
FROM lighter.dex.liquidations
WHERE timestamp >= CURRENT_DATE - 7
ORDER BY timestamp DESC
LIMIT 100