{"record":{"id":"f4882356820f8b9c","repo":"nautechsystems/nautilus_trader","slug":"execution-mass-status-venue-did-not-match-sourc","errorCode":null,"errorMessage":"Execution mass status venue {} did not match source venue {}","messagePattern":"Execution mass status venue (.+?) did not match source venue (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/execution/src/client/mod.rs","lineNumber":183,"sourceCode":"        &self,\n        lookback_mins: Option<u64>,\n    ) -> anyhow::Result<Option<ExecutionMassStatus>> {\n        let mass_status = self.client.generate_mass_status(lookback_mins).await?;\n\n        if let Some(mass_status) = &mass_status {\n            anyhow::ensure!(\n                mass_status.client_id == self.client_id,\n                \"Execution mass status client ID {} did not match source client {}\",\n                mass_status.client_id,\n                self.client_id,\n            );\n            anyhow::ensure!(\n                mass_status.account_id == self.account_id,\n                \"Execution mass status account ID {} did not match source account {}\",\n                mass_status.account_id,\n                self.account_id,\n            );\n            anyhow::ensure!(\n                mass_status.venue == self.venue,\n                \"Execution mass status venue {} did not match source venue {}\",\n                mass_status.venue,\n                self.venue,\n            );\n        }\n\n        Ok(mass_status)\n    }\n\n    /// Forwards an instrument update to the underlying execution client.\n    pub fn on_instrument(&mut self, instrument: InstrumentAny) {\n        self.client.on_instrument(instrument);\n    }\n\n    /// Registers an external order for tracking by the execution client.\n    ///\n    /// This is called after reconciliation creates an external order, allowing the","sourceCodeStart":165,"sourceCodeEnd":201,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/execution/src/client/mod.rs#L165-L201","documentation":"The execution client adapter also checks that the ExecutionMassStatus venue equals the adapter's own venue. A mismatch means the mass status describes orders on a different venue than this client source, so it cannot be used for reconciliation against this client's state.","triggerScenarios":"Calling generate_mass_status(lookback_mins) when the returned mass_status.venue differs from self.venue (after client_id and account_id checks passed).","commonSituations":"Adapter registered under one Venue but the underlying client reports another (e.g. testnet vs mainnet venue suffix, or SIM vs live); misrouted client registration in the execution engine config; copied adapter configs across venues.","solutions":["Align the Venue configured on the adapter with the venue the broker adapter stamps into its mass status.","Check environment configs (testnet/mainnet/sim) so the same venue naming is used everywhere.","Ensure each venue's client is registered with its own correct ExecutionClientConfig in the engine.","Log both venue values to identify which configuration side is wrong."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// ensure each venue's client is registered under the matching Venue\nassert_eq!(config.venue, adapter.venue(), \"venue misrouting in execution config\");","typeGuard":null,"tryCatchPattern":"if let Err(e) = client.generate_mass_status(lookback).await {\n    if e.to_string().contains(\"did not match source venue\") {\n        // correct the venue naming/env config, then retry\n    }\n}","preventionTips":["Use consistent venue naming (including live/testnet/sim suffixes) across all configs.","Register one execution client per venue with its own dedicated config.","Diff venue identifiers between engine config and broker adapter output at startup."],"tags":["execution","reconciliation","venue","rust"],"backgroundTag":"internal-invariant-violation","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}