> ## 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.

# Perpetual Market Stats (Latest)

> Latest market stats per market with real-time OI, funding, and prices

The `lighter.assets.perpetual_market_stats_latest` table provides the most recent snapshot for each market. One row per market.

### 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 | Funding timestamp of the latest snapshot                   |
| 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. NULL for spots                    |
| base\_l1\_address  | L1 contract address of the base asset. NULL for perpetuals |

### Prices

| Column Name        | Description               |
| ------------------ | ------------------------- |
| index\_price       | Latest oracle/index price |
| mark\_price        | Latest mark price         |
| last\_trade\_price | Latest traded price       |

### Open Interest & Funding

| Column Name            | Description                        |
| ---------------------- | ---------------------------------- |
| open\_interest         | Current open interest in USD       |
| current\_funding\_rate | Current live funding rate estimate |
| funding\_rate          | Last settled funding rate          |

### 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                |
| ------------- | -------------------------- |
| \_updated\_at | Row last-updated timestamp |

## Sample Query

```sql theme={null}
SELECT
    symbol,
    mark_price,
    open_interest,
    current_funding_rate,
    daily_quote_token_volume
FROM lighter.assets.perpetual_market_stats_latest
ORDER BY open_interest DESC
```
