lighter.assets.perpetual_market_stats table provides hourly snapshots of perpetual market data including prices, open interest, and funding rates.
Table Details
| Property | Value |
|---|---|
| Clustering Key(s) | to_date("funding_timestamp") (base table) |
Table Columns
Market Information
| Column Name | Description |
|---|---|
| market_id | Market identifier |
| funding_timestamp | Snapshot timestamp (hourly) |
| symbol | Market symbol (e.g., BTC, ETH) |
| market_type | ’perp’ or ‘spot’ |
| base_symbol | Base asset symbol |
| quote_symbol | Quote asset symbol |
| collateral_symbol | Collateral asset symbol (e.g., USDC). NULL for spots |
| base_l1_address | L1 contract address of the base asset. NULL for perpetuals |
Prices
| Column Name | Description |
|---|---|
| index_price | Oracle/index price at snapshot time |
| mark_price | Mark price used for PnL, liquidations, and funding |
| last_trade_price | Last traded price at snapshot time |
Open Interest & Funding
| Column Name | Description |
|---|---|
| open_interest | Open interest in USD at snapshot time |
| open_interest_limit | Maximum OI allowed |
| current_funding_rate | Live funding rate at snapshot time |
| funding_rate | Last settled funding rate |
| funding_clamp_small | Funding rate lower clamp parameter |
| funding_clamp_big | Funding rate upper clamp parameter |
Rolling 24h Metrics
| Column Name | Description |
|---|---|
| daily_base_token_volume | Rolling 24h volume in base units |
| daily_quote_token_volume | Rolling 24h volume in quote/USD |
| daily_price_low | Rolling 24h price low |
| daily_price_high | Rolling 24h price high |
| daily_price_change | Rolling 24h price change percentage |
Metadata
| Column Name | Description |
|---|---|
| _created_at | Row creation timestamp |
| _updated_at | Row last-updated timestamp |