{"record":{"id":"580579f552466ea1","repo":"nautechsystems/nautilus_trader","slug":"polymarket-does-not-support-orderbookdepth10-subsc","errorCode":null,"errorMessage":"Polymarket does not support OrderBookDepth10 subscriptions; use managed L2_MBP order book deltas","messagePattern":"Polymarket does not support OrderBookDepth10 subscriptions; use managed L2_MBP order book deltas","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/polymarket/src/data/mod.rs","lineNumber":679,"sourceCode":"            );\n        }\n\n        // Mark intent before routing so unsubscribe can race-safely clear it.\n        if !self.add_delta_subscription_intent(instrument_id) {\n            return Ok(());\n        }\n\n        if !cached {\n            self.queue_pending_load(instrument_id);\n            return Ok(());\n        }\n\n        self.sync_ws_subscription(instrument_id);\n        Ok(())\n    }\n\n    fn subscribe_book_depth10(&mut self, _cmd: SubscribeBookDepth10) -> anyhow::Result<()> {\n        anyhow::bail!(\n            \"Polymarket does not support OrderBookDepth10 subscriptions; use managed L2_MBP order book deltas\"\n        )\n    }\n\n    fn subscribe_quotes(&mut self, cmd: SubscribeQuotes) -> anyhow::Result<()> {\n        let instrument_id = cmd.instrument_id;\n        self.ensure_live_subscription_allowed(instrument_id)?;\n        let cached = self.instruments.load().contains_key(&instrument_id);\n\n        if !cached && !self.config.auto_load_missing_instruments {\n            anyhow::bail!(\n                \"Instrument {instrument_id} not found, and `auto_load_missing_instruments` is disabled\"\n            );\n        }\n\n        if !self.add_live_subscription_intent(instrument_id, &self.active_quote_subs) {\n            return Ok(());\n        }","sourceCodeStart":661,"sourceCodeEnd":697,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/polymarket/src/data/mod.rs#L661-L697","documentation":"subscribe_book_depth10 is deliberately unimplemented for Polymarket: the venue feed only supports incremental L2 level updates managed by the adapter, not fixed 10-level depth snapshots. The adapter always fails this call and directs users to managed L2_MBP order book deltas instead.","triggerScenarios":"Any call to subscribe_book_depth10 on the Polymarket data client — it is unconditional (no configuration can enable it).","commonSituations":"Porting a strategy written for a crypto exchange adapter (where depth10 snapshots are common) to Polymarket without adjusting the book subscription type; generic subscription code that requests depth10 by default.","solutions":["Switch the data subscription to SubscribeBookDeltas with BookType::L2_MBP and let the adapter manage the book.","If fixed-depth snapshots are required, maintain them locally from the L2 delta stream.","Branch subscription logic per venue so depth10 is only requested where supported."],"exampleFix":"// before\nclient.subscribe_book_depth10(cmd)?;\n\n// after\nlet cmd = SubscribeBookDeltas {\n    instrument_id,\n    book_type: BookType::L2_MBP,\n    ..cmd_as_deltas\n};\nclient.subscribe_book_deltas(cmd)?;","handlingStrategy":"validation","validationCode":"if venue == Venue::POLYMARKET && cmd is depth10 {\n    return Err(anyhow::anyhow!(\"use L2_MBP deltas on Polymarket\"));\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Branch subscription construction on venue capabilities.","Never request depth10 from Polymarket; rely on managed L2 deltas."],"tags":["polymarket","order-book","unsupported","depth10"],"backgroundTag":"unsupported-operation","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"}