lighter.raw.order_books table contains order book snapshots with bid and ask levels.
Table Columns
Unique key:timestamp, market_id, nonce
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Order book snapshots with bid and ask levels.
lighter.raw.order_books table contains order book snapshots with bid and ask levels.
timestamp, market_id, nonce
| Column Name | Data Type | Description |
|---|---|---|
market_id | NUMBER(38,0) | Market identifier. |
asks | VARIANT | Array of ask levels (price, size), ordered best to worst. |
bids | VARIANT | Array of bid levels (price, size), ordered best to worst. |
nonce | NUMBER(38,0) | Global sequence number at snapshot time. |
begin_nonce | NUMBER(38,0) | Sequence number at the start of the batch. |
offset | NUMBER(38,0) | Per-market incrementing version counter. |
code | NUMBER(38,0) | Response status code. |
timestamp | TIMESTAMP_NTZ(9) | UTC timestamp of the snapshot. |
_created_at | TIMESTAMP_NTZ(9) | Timestamp when the row was first recorded. |
_updated_at | TIMESTAMP_NTZ(9) | Timestamp when the row was last updated. |
SELECT
market_id,
timestamp,
nonce,
asks,
bids
FROM lighter.raw.order_books
WHERE timestamp >= CURRENT_DATE
ORDER BY timestamp DESC
LIMIT 100;
Was this page helpful?