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
| Property | Value |
|---|
| Clustering Key(s) | to_date("timestamp") (base table) |
Table Columns
| Column Name | Description |
|---|
| market_type | ’perpetuals’ or ‘spot’ |
| coin | Market symbol |
| token_a_symbol | Base token symbol |
| token_b_symbol | Quote token symbol |
Liquidation Details
| Column Name | Description |
|---|
| amount | Liquidation size in base asset units |
| price | Execution price |
| usd_amount | USD value of the liquidation |
| liquidated_account_id | Account ID of the liquidated party |
| counterparty_account_id | Account ID of the counterparty (maker) |
| liquidated_l1_address | EVM wallet address of the liquidated party. NULL if no mapping exists |
| counterparty_l1_address | EVM wallet address of the counterparty. NULL if no mapping exists |
| buyer | Account ID of the buyer (bid side) |
| seller | Account ID of the seller (ask side) |
| buyer_l1_address | EVM wallet address of the buyer. NULL if no mapping exists |
| seller_l1_address | EVM wallet address of the seller. NULL if no mapping exists |
| Column Name | Description |
|---|
| timestamp | UTC timestamp of the event |
| transaction_hash | On-chain transaction hash |
| trade_id | Unique trade identifier |
| unique_id | Alias of trade_id |
Fees & Margins
| Column Name | Description |
|---|
| liquidation_fee_rate | Liquidation fee as decimal fraction |
| liquidation_fee_amount | Liquidation fee in USD |
| liquidated_position_size_before | Liquidated account’s position before event |
| liquidated_max_leverage | Liquidated account’s max leverage |
| market_max_leverage | Maximum leverage for this market |
| maintenance_margin_fraction | Market maintenance margin fraction |
| closeout_margin_fraction | Market 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