{"record":{"id":"d1bb6b8f9c27bcc9","repo":"nautechsystems/nautilus_trader","slug":"instrument-instrument-id-not-found-and-auto-lo","errorCode":null,"errorMessage":"Instrument {instrument_id} not found, and `auto_load_missing_instruments` is disabled","messagePattern":"Instrument (.+?) not found, and `auto_load_missing_instruments` is disabled","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/polymarket/src/data/mod.rs","lineNumber":461,"sourceCode":"        }\n        remove_data_resolve_watch_entry(\n            &self.resolve_poll_watchlist,\n            instrument_id,\n            has_data_subscription,\n        );\n        token_id\n    }\n\n    fn subscribe_resolution(\n        &self,\n        instrument_id: InstrumentId,\n        subscriptions: &Arc<AtomicSet<InstrumentId>>,\n    ) -> anyhow::Result<()> {\n        // Expiration bounds recovery; it does not disqualify metadata needed for settlement\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_resolution_subscription_intent(instrument_id, subscriptions) {\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 add_live_subscription_intent_with_state(","sourceCodeStart":443,"sourceCodeEnd":479,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/polymarket/src/data/mod.rs#L443-L479","documentation":"subscribe_resolution (used by subscribe_instrument_status and subscribe_instrument_close) requires the instrument to be present in the adapter's cache, because resolution/status streams are keyed off known instruments. If the instrument is not cached and config option `auto_load_missing_instruments` is false, the adapter cannot resolve it and bails out instead of silently subscribing to nothing.","triggerScenarios":"Calling subscribe_instrument_status or subscribe_instrument_close with an InstrumentId never loaded into self.instruments while `auto_load_missing_instruments` is disabled in the PolymarketDataClientConfig.","commonSituations":"Users relying on instruments loaded in a previous session whose cache was rebuilt; configs that disable auto-loading for determinism but reference instruments that were never explicitly added; typos in instrument IDs that don't match any cached instrument.","solutions":["Set `auto_load_missing_instruments: true` in the Polymarket data client config.","Explicitly load the instrument (via the instrument provider / load_instruments) before subscribing to its status/close events.","Verify the instrument_id string matches a Polymarket market that exists and was loaded."],"exampleFix":"// before\nPolymarketDataClientConfig { auto_load_missing_instruments: false, .. }\n\n// after\nPolymarketDataClientConfig { auto_load_missing_instruments: true, .. }","handlingStrategy":"validation","validationCode":"if !instruments_cache.contains_key(&instrument_id) && !config.auto_load_missing_instruments {\n    load_instrument(&instrument_id)?; // or enable auto_load_missing_instruments\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Enable auto_load_missing_instruments unless you intentionally manage loading manually.","Always run the instrument provider covering all markets referenced by strategies."],"tags":["polymarket","instrument-not-found","config","subscription"],"backgroundTag":"resource-not-found","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}