{"record":{"id":"9066393b8938fecf","repo":"nautechsystems/nautilus_trader","slug":"unable-to-resolve-configured-interactive-brokers-i","errorCode":null,"errorMessage":"Unable to resolve configured Interactive Brokers instruments: {}","messagePattern":"Unable to resolve configured Interactive Brokers instruments: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/interactive_brokers/src/providers/instruments.rs","lineNumber":293,"sourceCode":"        }\n\n        for (index, contract_spec) in self.config.load_contracts.iter().enumerate() {\n            let mut contract_ids =\n                loader.load_contract(contract_spec).await.with_context(|| {\n                    format!(\n                        \"Failed to load configured IB contract at index {index}: {contract_spec}\"\n                    )\n                })?;\n\n            if contract_ids.is_empty() {\n                unresolved.push(format!(\"contract at index {index}: {contract_spec}\"));\n            } else {\n                loaded_ids.append(&mut contract_ids);\n            }\n        }\n\n        if !unresolved.is_empty() {\n            anyhow::bail!(\n                \"Unable to resolve configured Interactive Brokers instruments: {}\",\n                unresolved.join(\", \")\n            );\n        }\n\n        loaded_ids.sort_unstable();\n        loaded_ids.dedup();\n        Ok(loaded_ids)\n    }\n\n    /// Adds instruments already held by the Nautilus cache into the provider cache.\n    ///\n    /// This mirrors the Python provider's use of `client._cache` for venue resolution and for\n    /// recovering stored IB contract metadata from `instrument.info[\"contract\"]`.\n    pub fn add_cached_instruments<I>(&self, instruments: I) -> usize\n    where\n        I: IntoIterator<Item = InstrumentAny>,\n    {","sourceCodeStart":275,"sourceCodeEnd":311,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/interactive_brokers/src/providers/instruments.rs#L275-L311","documentation":"Raised when one or more instruments configured for the Interactive Brokers adapter could not be resolved to IB contracts during initialization. load_configured_instruments aggregates all unresolved instrument IDs and fails fast, listing them, so the adapter never starts with a partially loaded instrument cache.","triggerScenarios":"initialize_with_loader is called with configured instrument IDs that the contract-resolution path cannot map to IB contracts (unknown symbols, wrong security type, expired contracts, or contracts IB returns no details for).","commonSituations":"Typos in instrument config, symbols missing an exchange suffix, requesting instruments from exchanges without IB coverage, or running with stale configs referencing delisted/expired contracts.","solutions":["Read the comma-separated list in the message and fix each listed instrument ID in your configuration (symbol, venue, security type).","Validate each instrument exists on IB by searching it in TWS before adding it to config.","Remove or replace expired/delisted instruments from the configured set.","Ensure the instrument loader's venue config matches IB expectations (e.g. use venue codes IB recognizes like CME, SMART)."],"exampleFix":"// before: config with unresolvable instrument\ninstruments = [\"EQ.NOSUCHTICKER\"]\n// after: corrected, fully qualified instrument\ninstruments = [\"EQ.AAPL\"]  // symbol exists at IB under SMART/NASDAQ","handlingStrategy":"validation","validationCode":"fn validate_configured_instruments(ids: &[String]) -> Result<(), String> {\n    let bad: Vec<_> = ids.iter().filter(|id| !id.contains('.')).collect();\n    if bad.is_empty() { Ok(()) } else { Err(format!(\"not fully qualified: {:?}\", bad)) }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep instrument config lists fully qualified (SYMBOL.VENUE)","Periodically audit config for expired/delisted contracts","Test each new instrument in TWS before adding it to the adapter config"],"tags":["interactive-brokers","instrument-resolution","configuration"],"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-14T05:17:10.506Z"}