{"record":{"id":"807a7d4a7aeaf4e8","repo":"nautechsystems/nautilus_trader","slug":"invalid-binance-load-ids-value-raw-e","errorCode":null,"errorMessage":"invalid Binance load_ids value {raw:?}: {e}","messagePattern":"invalid Binance load_ids value (.+?): (.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/binance/src/config.rs","lineNumber":100,"sourceCode":"    /// Returns an error for malformed IDs, unsupported filters, or a legacy\n    /// 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            );","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/binance/src/config.rs#L82-L118","documentation":"BinanceDataClientConfig / BinanceExecClientConfig validation failed because a load_ids entry could not be parsed as an InstrumentId at all. Each load_ids value must be a valid instrument ID like \"BTCUSDT.BINANCE\".","triggerScenarios":"request_instruments_with_config calling config.validate() when load_ids contains strings that are not parseable InstrumentIds — missing venue, wrong separator (e.g. \"BTCUSDT\" or \"BTC/USDT\"), whitespace, or typos.","commonSituations":"Config files listing bare symbols instead of symbol.venue form; using trading-pair notation like BTC-USDT or BTC/USDT; YAML/JSON quoting errors adding stray characters.","solutions":["Write each entry as <SYMBOL>.BINANCE, e.g. \"BTCUSDT.BINANCE\"","Remove whitespace and stray characters from the load_ids strings","Use Symbol(Venue) syntax only — not pair notation like BTC/USDT","Check the config file encoding and quoting"],"exampleFix":"// before\nload_ids = [\"BTCUSDT\", \"ETH/USDT\"]\n// after\nload_ids = [\"BTCUSDT.BINANCE\", \"ETHUSDT.BINANCE\"]","handlingStrategy":"validation","validationCode":"raw.parse::<rust_decimal::Decimal>().ok(); // placeholder\nlet ok = raws.iter().all(|r| nautilus_model::identifiers::InstrumentId::from_str(r).map(|i| i.venue.as_str() == \"BINANCE\").unwrap_or(false));","typeGuard":"fn is_valid_load_id(s: &str) -> bool { nautilus_model::identifiers::InstrumentId::from_str(s).map(|i| i.venue.as_str() == \"BINANCE\").unwrap_or(false) }","tryCatchPattern":"config.validate().map_err(|e| { eprintln!(\"config invalid: {e}\"); std::process::exit(1); })?;","preventionTips":["Always format load_ids as SYMBOL.BINANCE","Validate config at startup before connecting","Copy IDs from a working config rather than typing them"],"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-23T08:17:48.524Z"}