> ## 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 perpetual market snapshot for each market.

The `lighter_robinhood.assets.perpetual_market_stats_latest` table contains the latest perpetual market snapshot for each market.

## Table Columns

**Unique key:** `market_id`

| Column Name                | Data Type          | Description                                                                                 |
| -------------------------- | ------------------ | ------------------------------------------------------------------------------------------- |
| `market_id`                | `NUMBER(38,0)`     | Market identifier.                                                                          |
| `funding_timestamp`        | `TIMESTAMP_NTZ(9)` | Funding timestamp of the latest snapshot.                                                   |
| `symbol`                   | `VARCHAR`          | Market symbol (e.g., BTC, ETH).                                                             |
| `market_type`              | `VARCHAR`          | 'perp' or 'spot'.                                                                           |
| `base_symbol`              | `VARCHAR`          | Base asset symbol.                                                                          |
| `quote_symbol`             | `VARCHAR`          | Quote asset symbol.                                                                         |
| `collateral_symbol`        | `VARCHAR`          | Collateral asset symbol. NULL for spots.                                                    |
| `base_l1_address`          | `VARCHAR`          | L1 contract address of the base asset, when applicable.                                     |
| `index_price`              | `FLOAT`            | Latest oracle/index price.                                                                  |
| `mark_price`               | `FLOAT`            | Latest mark price.                                                                          |
| `last_trade_price`         | `FLOAT`            | Latest traded price.                                                                        |
| `open_interest`            | `FLOAT`            | Current open interest in USD.                                                               |
| `open_interest_limit`      | `NUMBER(38,0)`     | Maximum allowed open interest. The value `72057594037927936` indicates no configured limit. |
| `current_funding_rate`     | `FLOAT`            | Current live funding rate estimate.                                                         |
| `funding_rate`             | `FLOAT`            | Last settled funding rate.                                                                  |
| `funding_clamp_small`      | `FLOAT`            | Funding rate lower clamp parameter.                                                         |
| `funding_clamp_big`        | `FLOAT`            | Funding rate upper clamp parameter.                                                         |
| `daily_base_token_volume`  | `FLOAT`            | Rolling 24h volume in base units.                                                           |
| `daily_quote_token_volume` | `FLOAT`            | Rolling 24h volume in quote/USD.                                                            |
| `daily_price_low`          | `FLOAT`            | Rolling 24h price low.                                                                      |
| `daily_price_high`         | `FLOAT`            | Rolling 24h price high.                                                                     |
| `daily_price_change`       | `FLOAT`            | Rolling 24h price change percentage.                                                        |
| `_updated_at`              | `TIMESTAMP_NTZ(9)` | Timestamp when the row was last updated.                                                    |

### Sample Query

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