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

# Market Stats

> Hourly perpetual market stats snapshots

The `lighter.raw.market_stats` table contains hourly snapshots of perpetual market statistics.

### Table Details

| Property          | Value                          |
| ----------------- | ------------------------------ |
| Clustering Key(s) | `to_date("funding_timestamp")` |

## Table Columns

| Column Name                 | Description                               |
| --------------------------- | ----------------------------------------- |
| market\_id                  | Market identifier                         |
| symbol                      | Market symbol (e.g., BTC, ETH)            |
| index\_price                | Oracle/index price at snapshot time       |
| mark\_price                 | Mark price for PnL, liquidations, funding |
| last\_trade\_price          | Last traded price at snapshot time        |
| 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\_timestamp          | Snapshot timestamp (hourly)               |
| funding\_clamp\_small       | Funding rate lower clamp parameter        |
| funding\_clamp\_big         | Funding rate upper clamp parameter        |
| daily\_base\_token\_volume  | Rolling 24h volume in base token units    |
| daily\_quote\_token\_volume | Rolling 24h volume in quote token / USD   |
| daily\_price\_low           | Rolling 24h price low                     |
| daily\_price\_high          | Rolling 24h price high                    |
| daily\_price\_change        | Rolling 24h price change percentage       |

## Sample Query

```sql theme={null}
SELECT
    market_id,
    symbol,
    funding_timestamp,
    mark_price,
    open_interest,
    funding_rate
FROM lighter.raw.market_stats
WHERE funding_timestamp >= CURRENT_DATE - 1
ORDER BY funding_timestamp DESC
LIMIT 100
```
