{"record":{"id":"05138f94149e3e5d","repo":"nautechsystems/nautilus_trader","slug":"hyperliquid-only-supports-l2-mbp-order-book-depth1","errorCode":null,"errorMessage":"Hyperliquid only supports L2_MBP order book depth10","messagePattern":"Hyperliquid only supports L2_MBP order book depth10","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/hyperliquid/src/data.rs","lineNumber":917,"sourceCode":"        let (n_sig_figs, mantissa) = parse_book_precision_params(subscription.params.as_ref())?;\n        self.register_stream_health(MarketDataChannel::Deltas, instrument_id);\n\n        self.spawn_task(\"subscribe_book_deltas\", async move {\n            ws.subscribe_book_with_options(instrument_id, n_sig_figs, mantissa)\n                .await\n        });\n\n        Ok(())\n    }\n\n    fn subscribe_book_depth10(&mut self, subscription: SubscribeBookDepth10) -> anyhow::Result<()> {\n        log::debug!(\n            \"Subscribing to book depth10: {}\",\n            subscription.instrument_id\n        );\n\n        if subscription.book_type != BookType::L2_MBP {\n            anyhow::bail!(\"Hyperliquid only supports L2_MBP order book depth10\");\n        }\n\n        let ws = self.ws_client.clone();\n        let instrument_id = subscription.instrument_id;\n        let (n_sig_figs, mantissa) = parse_book_precision_params(subscription.params.as_ref())?;\n        self.register_stream_health(MarketDataChannel::Depth10, instrument_id);\n\n        self.spawn_task(\"subscribe_book_depth10\", async move {\n            ws.subscribe_book_depth10_with_options(instrument_id, n_sig_figs, mantissa)\n                .await\n        });\n\n        Ok(())\n    }\n\n    fn subscribe_quotes(&mut self, subscription: SubscribeQuotes) -> anyhow::Result<()> {\n        let ws = self.ws_client.clone();\n        let instrument_id = subscription.instrument_id;","sourceCodeStart":899,"sourceCodeEnd":935,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/hyperliquid/src/data.rs#L899-L935","documentation":"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!.","triggerScenarios":"Calling subscribe_book_depth10 with subscription.book_type != BookType::L2_MBP — e.g. requesting an L1_MBP depth10 snapshot config for a Hyperliquid instrument.","commonSituations":"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.","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."],"exampleFix":"// before\nbook_type=\"L1_MBP\"\n// after\nbook_type=\"L2_MBP\"","handlingStrategy":"validation","validationCode":"assert_eq!(sub.book_type, BookType::L2_MBP, \"Hyperliquid depth10 requires L2_MBP\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["order-book","unsupported-feature","subscription","hyperliquid"],"backgroundTag":"unsupported-enum-value","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}