curl --request GET \
--url https://api.0xarchive.io/v1/lighter/orderbook/{symbol}/history \
--header 'X-API-Key: <api-key>'{
"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"
}
],
"meta": {
"count": 123,
"next_cursor": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}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 (tier restrictions apply).
Tick-Level Data (Enterprise tier only):
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 rangedeltas: Array of incremental changes to apply to the checkpointThis is the most efficient format for reconstructing high-frequency orderbook states. Use the SDK’s OrderBookReconstructor class for client-side reconstruction.
curl --request GET \
--url https://api.0xarchive.io/v1/lighter/orderbook/{symbol}/history \
--header 'X-API-Key: <api-key>'{
"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"
}
],
"meta": {
"count": 123,
"next_cursor": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Documentation Index
Fetch the complete documentation index at: https://docs.0xarchive.io/llms.txt
Use this file to discover all available pages before exploring further.
API key for authentication. Get yours at https://www.0xarchive.io/dashboard/
Trading pair symbol (e.g., ETH, BTC)
"ETH"
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)
x <= 1000Number of price levels per side. Tier limits: Free=20, Build=200, Pro=Full Depth, Enterprise=Full Depth
Data resolution: checkpoint (1min, default), 30s, 10s, 1s, tick. Checkpoint history starts January 29, 2026; 30s/10s/1s start January 30, 2026. Higher resolutions require higher tier plans. Credit multiplier: checkpoint=1x, 30s=2x, 10s=3x, 1s=10x, tick=20x. Note: When granularity=tick (Enterprise tier only), the response format changes to return checkpoint and deltas instead of a data array.
checkpoint, 30s, 10s, 1s, tick List of order book snapshots
true
Hide child attributes
Trading pair symbol
"BTC"
Trading pair symbol (deprecated, use symbol instead)
"BTC"
Snapshot timestamp (UTC)
"2025-01-21T10:30:45.123Z"
Mid price (best bid + best ask) / 2
"42150.50"
Spread in absolute terms (best ask - best bid)
"1.00"
Spread in basis points
"2.37"
Was this page helpful?