nautechsystems/nautilus_trader · error · anyhow::Error
Hyperliquid only supports L2_MBP order book depth10
Error message
Hyperliquid only supports L2_MBP order book depth10
What it means
Identical constraint as for deltas, applied to depth10 subscriptions: the Hyperliquid adapter can only build depth10 books of type L2_MBP because that is what the venue feed supports. Any other BookType in a SubscribeBookDepth10 request is rejected with this bail!.
Source
Thrown at crates/adapters/hyperliquid/src/data.rs:917
let (n_sig_figs, mantissa) = parse_book_precision_params(subscription.params.as_ref())?;
self.register_stream_health(MarketDataChannel::Deltas, instrument_id);
self.spawn_task("subscribe_book_deltas", async move {
ws.subscribe_book_with_options(instrument_id, n_sig_figs, mantissa)
.await
});
Ok(())
}
fn subscribe_book_depth10(&mut self, subscription: SubscribeBookDepth10) -> anyhow::Result<()> {
log::debug!(
"Subscribing to book depth10: {}",
subscription.instrument_id
);
if subscription.book_type != BookType::L2_MBP {
anyhow::bail!("Hyperliquid only supports L2_MBP order book depth10");
}
let ws = self.ws_client.clone();
let instrument_id = subscription.instrument_id;
let (n_sig_figs, mantissa) = parse_book_precision_params(subscription.params.as_ref())?;
self.register_stream_health(MarketDataChannel::Depth10, instrument_id);
self.spawn_task("subscribe_book_depth10", async move {
ws.subscribe_book_depth10_with_options(instrument_id, n_sig_figs, mantissa)
.await
});
Ok(())
}
fn subscribe_quotes(&mut self, subscription: SubscribeQuotes) -> anyhow::Result<()> {
let ws = self.ws_client.clone();
let instrument_id = subscription.instrument_id;View on GitHub (pinned to 18893faf8b)
Solutions
- Set book_type=BookType::L2_MBP for depth10 subscriptions on Hyperliquid.
- Align the depth10 subscription config generation so it always emits L2_MBP for this venue.
- Verify the config file/strategy code that sets the book type for Hyperliquid instruments.
Example fix
// before book_type="L1_MBP" // after book_type="L2_MBP"
Defensive patterns
Strategy: validation
Validate before calling
assert_eq!(sub.book_type, BookType::L2_MBP, "Hyperliquid depth10 requires L2_MBP");
Prevention
- Set book_type=L2_MBP for depth10 requests on Hyperliquid.
- Do not copy depth10 configs from venues supporting L1/L3 books.
- Add a startup config check per venue.
When it happens
Trigger: Calling subscribe_book_depth10 with subscription.book_type != BookType::L2_MBP — e.g. requesting an L1_MBP depth10 snapshot config for a Hyperliquid instrument.
Common situations: Reusing depth10 subscription templates from Binance or other venues that allow L1 top-of-book depth; misconfigured backtest vs live data configs differing in book type.
Related errors
- Hyperliquid only supports L2_MBP order book deltas
- Binance Futures supports L1_MBP and L2_MBP order book subscr
- BitMEX only supports L2_MBP order book deltas
- Only depth=10 is currently supported for order book depths
- Deribit only supports L2_MBP order book deltas
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/05138f94149e3e5d.
Report an issue: GitHub.