{"record":{"id":"8e63f051df6b73ac","repo":"nautechsystems/nautilus_trader","slug":"binance-load-ids-value-raw-must-use-venue-bina","errorCode":null,"errorMessage":"Binance load_ids value {raw:?} must use venue BINANCE","messagePattern":"Binance load_ids value (.+?) must use venue BINANCE","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/binance/src/config.rs","lineNumber":101,"sourceCode":"    /// callable filter that Binance v2 cannot execute safely.\n    pub fn validate(&self, product_type: BinanceProductType) -> anyhow::Result<()> {\n        if let Some(filter_callable) = self\n            .filter_callable\n            .as_deref()\n            .map(str::trim)\n            .filter(|value| !value.is_empty())\n        {\n            anyhow::bail!(\n                \"Binance v2 does not support instrument filter_callable {filter_callable:?}; \\\n                 the legacy Binance provider never applied callable filters\"\n            );\n        }\n\n        if let Some(load_ids) = &self.load_ids {\n            for raw in load_ids {\n                let instrument_id = InstrumentId::from_str(raw)\n                    .map_err(|e| anyhow::anyhow!(\"invalid Binance load_ids value {raw:?}: {e}\"))?;\n                anyhow::ensure!(\n                    instrument_id.venue.as_str() == \"BINANCE\",\n                    \"Binance load_ids value {raw:?} must use venue BINANCE\"\n                );\n            }\n        }\n\n        for (key, value) in &self.filters {\n            let supported = matches!(key.as_str(), \"symbols\" | \"bases\" | \"quotes\")\n                || key == \"contract_types\"\n                    && matches!(\n                        product_type,\n                        BinanceProductType::UsdM | BinanceProductType::CoinM\n                    );\n            anyhow::ensure!(\n                supported,\n                \"unsupported Binance instrument filter {key:?} for {product_type:?}\"\n            );\n            validate_filter_strings(key, value)?;","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/binance/src/config.rs#L83-L119","documentation":"A load_ids entry parsed as an InstrumentId but its venue is not BINANCE (e.g. \"BTCUSDT.BYBIT\" or \"BTCUSDT.BINANCE-FUTURES\"). Binance adapter configs only accept instrument IDs on the BINANCE venue; market selection is done via other config fields, not the venue.","triggerScenarios":"config.validate() during request_instruments_with_config when load_ids contains IDs whose venue portion is anything other than the literal \"BINANCE\".","commonSituations":"Copy-pasting instrument IDs from other adapters; assuming futures needs \"BINANCE-FUTURES\" as venue instead of a market-type config option; multi-venue configs merged incorrectly.","solutions":["Change the venue component to BINANCE (market type like futures is set elsewhere in config)","Remove IDs for other venues and configure those adapters separately","Audit load_ids for cross-adapter copy-paste mistakes"],"exampleFix":"// before\nload_ids = [\"BTCUSDT-PERP.BINANCE-FUTURES\"]\n// after\nload_ids = [\"BTCUSDT-PERP.BINANCE\"]  # futures selected via market-type config","handlingStrategy":"validation","validationCode":"for raw in load_ids { let id = InstrumentId::from_str(raw)?; assert_eq!(id.venue.as_str(), \"BINANCE\", \"{raw} must use BINANCE venue\"); }","typeGuard":"fn is_binance_id(s: &str) -> bool { InstrumentId::from_str(s).map(|i| i.venue.as_str() == \"BINANCE\").unwrap_or(false) }","tryCatchPattern":"if let Err(e) = config.validate() { eprintln!(\"load_ids venue mismatch: {e}\"); return Err(e.into()); }","preventionTips":["Use venue BINANCE for all Binance market types; select futures/spot via config options","Do not share load_ids lists across different exchange adapters","Grep configs for other venue strings before deploying"],"tags":["rust","config","validation","binance"],"backgroundTag":"invalid-config-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"}