nautechsystems/nautilus_trader · error
Lighter does not support historical order book depth request
Error message
Lighter does not support historical order book depth requests for {}; use request_book_snapshot for an L2 snapshot or subscribe_book_depth10 for live depth10 What it means
The Lighter data client does not support historical (streamed/replayed) order book depth requests. Depth is available either as a one-shot L2 snapshot via request_book_snapshot or as live depth10 via subscribe_book_depth10; request_book_depth always bails with this guidance message naming the instrument.
Source
Thrown at crates/adapters/lighter/src/data/mod.rs:1808
ts_init,
params,
));
if let Err(e) = sender.send(DataEvent::Response(response)) {
log::error!("Failed to send book snapshot response: {e}");
}
}
Err(e) => {
log::error!("Lighter book snapshot request failed for {instrument_id}: {e:?}");
}
}
});
Ok(())
}
fn request_book_depth(&self, request: RequestBookDepth) -> anyhow::Result<()> {
anyhow::bail!(
"Lighter does not support historical order book depth requests for {}; \
use request_book_snapshot for an L2 snapshot or subscribe_book_depth10 for live depth10",
request.instrument_id,
)
}
}
fn retain_trade_ticks_in_range(
trades: &mut Vec<TradeTick>,
start_nanos: Option<UnixNanos>,
end_nanos: Option<UnixNanos>,
) {
trades.retain(|trade| trade_tick_in_range(trade.ts_event, start_nanos, end_nanos));
trades.sort_by_key(|trade| trade.ts_event);
}
fn trade_tick_in_range(
ts_event: UnixNanos,View on GitHub (pinned to 18893faf8b)
Solutions
- Use request_book_snapshot for the current L2 snapshot.
- Use subscribe_book_depth10 for continuous live depth10 updates.
- Record depth via the depth10 subscription into your own store if you need history.
- Skip request_book_depth calls for the Lighter venue in venue-agnostic code paths.
Example fix
// before data_engine.request(RequestBookDepth::new(instrument_id, depth, start, end)) // after data_engine.request_book_snapshot(instrument_id, depth)?; // or subscribe_book_depth10(instrument_id, depth)
Defensive patterns
Strategy: fallback
Try / catch
// venue-agnostic path
if request.instrument_id.venue.as_str() == "LIGHTER" {
data_engine.request_book_snapshot(request.instrument_id, request.depth)?;
data_engine.subscribe_book_depth10(request.instrument_id, request.depth)?;
} else {
data_engine.request_book_depth(request)?;
} Prevention
- Use request_book_snapshot or subscribe_book_depth10 for Lighter depth.
- Record depth10 streams yourself if historical depth is required.
- Branch venue-agnostic depth-history code paths per venue capability.
When it happens
Trigger: Calling request_book_depth (or sending a RequestBookDepth through the DataEngine) for a Lighter instrument, e.g. a strategy requesting historical depth between two timestamps.
Common situations: Cross-venue strategies that request depth history elsewhere; assuming replayed book depth exists because L2 snapshots do; backfill pipelines requesting depth ranges.
Related errors
- Lighter does not support historical quote requests for {}; s
- Deribit only supports L2_MBP order book deltas
- unsupported Derive instrument type for trades: {other:?}
- `handle_book_mbo` {IMPL_ERR} `{}`
- NoOrderSide
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/be29218e2292d683.
Report an issue: GitHub.