Skip to main content
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

PropertyValue
Clustering Key(s)to_date("timestamp")

Table Columns

Column NameDescription
market_idMarket identifier
asksArray of ask levels (price, size), ordered best to worst
bidsArray of bid levels (price, size), ordered best to worst
nonceGlobal sequence number at snapshot time
begin_nonceSequence number at the start of the batch
offsetPer-market incrementing version counter
codeResponse code
timestampUTC timestamp of the snapshot

Sample Query

SELECT
    market_id,
    timestamp,
    nonce,
    asks,
    bids
FROM lighter.raw.order_books
WHERE timestamp >= CURRENT_DATE
ORDER BY timestamp DESC
LIMIT 100