lighter.raw.trades table contains raw trade data from Lighter.
Table Details
| Property | Value |
|---|---|
| Clustering Key(s) | to_date("timestamp") |
Table Columns
| Column Name | Description |
|---|---|
| trade_id | Unique identifier for the trade |
| tx_hash | On-chain transaction hash |
| type | Trade type: ‘trade’, ‘liquidation’, or ‘deleverage’ |
| market_id | Market this trade belongs to |
| size | Trade size in base asset units |
| price | Execution price |
| usd_amount | USD value |
| ask_account_id | Account ID of the ask (sell) side |
| bid_account_id | Account ID of the bid (buy) side |
| ask_id | Order ID of the ask side |
| bid_id | Order ID of the bid side |
| ask_client_id | Client-assigned order ID for ask side |
| bid_client_id | Client-assigned order ID for bid side |
| is_maker_ask | True if the maker is on the ask side |
| block_height | Block height of the trade |
| timestamp | UTC timestamp of the trade |
| maker_fee | Maker fee in ppm |
| taker_fee | Taker fee in ppm |
| taker_position_size_before | Taker’s position size before this trade |
| maker_position_size_before | Maker’s position size before this trade |
| taker_position_sign_changed | Whether taker’s position sign changed |
| maker_position_sign_changed | Whether maker’s position sign changed |