{"record":{"id":"33992bf1aa598cc8","repo":"nautechsystems/nautilus_trader","slug":"e-33992b","errorCode":null,"errorMessage":"{e}","messagePattern":"\\{e\\}","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/binance/src/spot/execution.rs","lineNumber":1417,"sourceCode":"\n        let ts_now = self.clock.get_time_ns();\n\n        let start = if let Some(mins) = lookback_mins {\n            let lookback_ns = checked_mins_to_nanos(mins)\n                .context(\"lookback minutes exceed the nanosecond range\")?;\n            Some(UnixNanos::from(ts_now.as_u64().saturating_sub(lookback_ns)))\n        } else {\n            None\n        };\n\n        // Binance requires instrument_id for historical orders (open_only=false).\n        // Use open_only=true for mass status to get all open orders across instruments.\n        let order_cmd = GenerateOrderStatusReportsBuilder::default()\n            .ts_init(ts_now)\n            .open_only(true)\n            .start(start)\n            .build()\n            .map_err(|e| anyhow::anyhow!(\"{e}\"))?;\n\n        let position_cmd = GeneratePositionStatusReportsBuilder::default()\n            .ts_init(ts_now)\n            .start(start)\n            .build()\n            .map_err(|e| anyhow::anyhow!(\"{e}\"))?;\n\n        let (order_reports, position_reports) = tokio::try_join!(\n            self.generate_order_status_reports(&order_cmd),\n            self.generate_position_status_reports(&position_cmd),\n        )?;\n\n        let mut instrument_ids: Vec<_> = order_reports\n            .iter()\n            .map(|report| report.instrument_id)\n            .collect();\n        {\n            let cache = self.core.cache();","sourceCodeStart":1399,"sourceCodeEnd":1435,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/a4b06ed870971b5671d12754ea138a3ab99b1dec/crates/adapters/binance/src/spot/execution.rs#L1399-L1435","documentation":"During mass status generation the adapter builds a GenerateOrderStatusReports command with its builder (open_only=true, optional lookback start). If the builder's own validation rejects the input — e.g. an invalid ts_init/start combination — the error is re-wrapped into anyhow via map_err(|e| anyhow!(\"{e}\")) at spot/execution.rs:1417.","triggerScenarios":"generate_mass_status invoked with a start/lookback the GenerateOrderStatusReportsBuilder rejects; in practice this signals a malformed command or version skew between nautilus crates rather than a venue error.","commonSituations":"Mixed crate versions after a partial upgrade changing command validation rules; custom code driving the Rust execution client with hand-built lookbacks; regressions in command construction.","solutions":["Check the start/lookback values passed to mass status are valid unix nanosecond timestamps","Ensure all nautilus crates in the workspace resolve to the same version (cargo tree -d)","If inputs look valid, capture the builder error text and report it to the NautilusTrader maintainers"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// sanity-check the lookback before triggering mass status\nlet start = UnixNanos::from((now_ms - lookback_ms) * 1_000_000);\nanyhow::ensure!(start.as_u64() < ts_now.as_u64(), \"lookback start must precede now\");","typeGuard":null,"tryCatchPattern":"match generate_mass_status(cmd).await {\n    Err(e) => {\n        // builder validation failure: log e, verify crate versions (cargo tree -d),\n        // do not retry with identical inputs\n    }\n}","preventionTips":["Keep all nautilus crates on one version; check cargo tree -d after upgrades","Let the adapter build report commands from validated lookbacks instead of hand-building them","Add an integration test that runs mass status against test containers in CI"],"tags":["binance","spot","mass-status","builder","validation","version-skew"],"backgroundTag":"invalid-request-parameter","analyzedSha":"a4b06ed870971b5671d12754ea138a3ab99b1dec","analyzedAt":"2026-08-16T22:54:50.089Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}