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

# Order Books

> Raw order book snapshots from Lighter

The `lighter.raw.order_books` table contains raw order book snapshots. Each row is one snapshot for one market with bids and asks as arrays.

### Table Details

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

## Table Columns

| Column Name  | Description                                              |
| ------------ | -------------------------------------------------------- |
| market\_id   | Market identifier                                        |
| asks         | Array of ask levels (price, size), ordered best to worst |
| bids         | Array of bid levels (price, size), ordered best to worst |
| nonce        | Global sequence number at snapshot time                  |
| begin\_nonce | Sequence number at the start of the batch                |
| offset       | Per-market incrementing version counter                  |
| code         | Response code                                            |
| timestamp    | UTC timestamp of the snapshot                            |

## Sample Query

```sql theme={null}
SELECT
    market_id,
    timestamp,
    nonce,
    asks,
    bids
FROM lighter.raw.order_books
WHERE timestamp >= CURRENT_DATE
ORDER BY timestamp DESC
LIMIT 100
```
