{"record":{"id":"bce963f5d9d77284","repo":"nautechsystems/nautilus_trader","slug":"derive-instruments-not-found-missing-ids","errorCode":null,"errorMessage":"Derive instruments not found: {missing_ids:?}","messagePattern":"Derive instruments not found: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/derive/src/providers.rs","lineNumber":199,"sourceCode":"            let existing = self.store.get_all().values().cloned().collect::<Vec<_>>();\n            self.load_all(filters).await?;\n\n            for instrument in existing {\n                if !self.store.contains(&instrument.id()) {\n                    self.store.add(instrument);\n                }\n            }\n        }\n\n        let missing_ids: Vec<_> = instrument_ids\n            .iter()\n            .filter(|id| !self.store.contains(id))\n            .collect();\n\n        if missing_ids.is_empty() {\n            Ok(())\n        } else {\n            anyhow::bail!(\"Derive instruments not found: {missing_ids:?}\")\n        }\n    }\n\n    async fn load(\n        &mut self,\n        instrument_id: &InstrumentId,\n        filters: Option<&HashMap<String, String>>,\n    ) -> anyhow::Result<()> {\n        if self.store.contains(instrument_id) {\n            return Ok(());\n        }\n\n        self.load_ids(&[*instrument_id], filters).await\n    }\n}\n\npub(crate) fn parse_instrument_definitions(\n    definitions: Vec<DeriveInstrument>,","sourceCodeStart":181,"sourceCodeEnd":217,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/derive/src/providers.rs#L181-L217","documentation":"The Derive instrument provider's load_ids checks that every requested InstrumentId is already in the store after loading, and bails listing the missing ones. This means the Derive API did not return instruments matching the requested IDs (or the currency-based lookup missed).","triggerScenarios":"Initializing a data/exec client with instrument_ids that Derive doesn't list (wrong symbol, delisted market, or wrong venue/format); the per-currency instrument fetch failing to cover some IDs.","commonSituations":" Typos in instrument IDs (e.g. wrong case or missing '-PERP' suffix); instruments delisted from Derive; requesting instruments before the provider's instrument refresh completes; config copied from a different venue.","solutions":["Verify each instrument ID against Derive's listed instruments (exact symbol and format)","Remove or correct nonexistent/delisted instrument IDs from the client config","Check logs for the per-currency fetch that failed to return the missing instruments","Confirm the venue on each InstrumentId is Derive, not another adapter's venue"],"exampleFix":"// before\nconfig { instrument_ids: [\"ETH-PERP\", \"BTC-USDC\"] } // BTC-USDC not on Derive\n// after\nconfig { instrument_ids: [\"ETH-PERP\", \"BTC-PERP\"] }","handlingStrategy":"validation","validationCode":"// before client init, verify IDs are in the loaded universe\nlet universe: HashSet<String> = derive_listed_instruments();\nlet bad: Vec<_> = requested.iter().filter(|id| !universe.contains(&id.to_string())).collect();\nif !bad.is_empty() { return Err(format!(\"not on Derive: {bad:?}\")); }","typeGuard":null,"tryCatchPattern":"match provider.load().await {\n    Err(e) if e.to_string().starts_with(\"Derive instruments not found\") => {\n        log::error!(\"check instrument IDs and venue: {e}\");\n    }\n    other => other?,\n}","preventionTips":["Copy instrument IDs directly from Derive's instruments endpoint","Keep client instrument config in sync with delisting notices","Always set venue to the Derive venue constant","Run a dry instrument load at startup before wiring clients"],"tags":["rust","instrument-provider","not-found","instruments"],"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"}