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

> Market statistics including prices, open interest, and funding.

The `lighter_robinhood.raw.market_stats` table contains market statistics including prices, open interest, and funding.

## Table Columns

**Unique key:** `funding_timestamp`, `market_id`

| Column Name                | Data Type          | Description                                |
| -------------------------- | ------------------ | ------------------------------------------ |
| `market_id`                | `NUMBER(38,0)`     | Market identifier.                         |
| `symbol`                   | `VARCHAR`          | Market symbol (e.g., BTC, ETH).            |
| `index_price`              | `VARCHAR`          | Oracle/index price at snapshot time.       |
| `mark_price`               | `VARCHAR`          | Mark price for PnL, liquidations, funding. |
| `open_interest`            | `VARCHAR`          | Open interest in USD at snapshot time.     |
| `open_interest_limit`      | `VARCHAR`          | Maximum OI allowed.                        |
| `funding_clamp_small`      | `VARCHAR`          | Funding rate lower clamp parameter.        |
| `funding_clamp_big`        | `VARCHAR`          | Funding rate upper clamp parameter.        |
| `last_trade_price`         | `VARCHAR`          | Last traded price at snapshot time.        |
| `current_funding_rate`     | `VARCHAR`          | Live funding rate at snapshot time.        |
| `funding_rate`             | `VARCHAR`          | Last settled funding rate.                 |
| `funding_timestamp`        | `TIMESTAMP_NTZ(9)` | Snapshot timestamp (hourly).               |
| `daily_base_token_volume`  | `VARCHAR`          | Rolling 24h volume in base token units.    |
| `daily_quote_token_volume` | `VARCHAR`          | Rolling 24h volume in quote token / USD.   |
| `daily_price_low`          | `VARCHAR`          | Rolling 24h price low.                     |
| `daily_price_high`         | `VARCHAR`          | Rolling 24h price high.                    |
| `daily_price_change`       | `VARCHAR`          | Rolling 24h price change percentage.       |
| `_created_at`              | `TIMESTAMP_NTZ(9)` | Timestamp when the row was first recorded. |
| `_updated_at`              | `TIMESTAMP_NTZ(9)` | Timestamp when the row was last updated.   |

### Sample Query

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