Get Lighter order book history
Get historical order book snapshots within a time range with configurable resolution. Checkpoint history starts January 29, 2026; 30s/10s/1s start January 30, 2026. Use 'granularity' parameter to control data resolution.
Tick-Level Data: When granularity=tick, the response format changes. Instead of returning snapshots in the data array, it returns:
- checkpoint: Full orderbook state at the start of the time range
- deltas: Array of incremental changes to apply to the checkpoint
This is the most efficient format for reconstructing high-frequency orderbook states. Use the SDK's OrderBookReconstructor class for client-side reconstruction.
Request
- Base URL: https://api.0xarchive.io
- URL: https://api.0xarchive.io/v1/lighter/orderbook/{symbol}/history
- Auth: API key in header X-API-Key
Path parameters
Trading pair symbol (e.g., ETH, BTC)
Query parameters
Start timestamp in Unix milliseconds. Defaults to 24h ago.
End timestamp in Unix milliseconds. Defaults to now.
Cursor for pagination
Maximum number of results (default: 100, max: 1000)
Requested price levels per side. The Lighter native L2 route includes all served levels.
Data resolution: checkpoint (1min, default), 30s, 10s, 1s, tick. Checkpoint history starts January 29, 2026; 30s/10s/1s start January 30, 2026. Billed per row returned (about 1 credit per 1,000 rows, minimum 1 credit per request). Higher resolutions return more rows. Note: When granularity=tick, the response format changes to return checkpoint and deltas instead of a data array.
Response
List of order book snapshots
Example response
{
"success": true,
"data": [
{
"symbol": "BTC",
"coin": "BTC",
"timestamp": "2025-01-21T10:30:45.123Z",
"bids": [
{
"px": "42150.00",
"sz": "1.5",
"n": 15
}
],
"asks": [
{
"px": "42150.00",
"sz": "1.5",
"n": 15
}
],
"mid_price": "42150.50",
"spread": "1.00",
"spread_bps": "2.37"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.