{"record":{"id":"1ea306dd5fbae69b","repo":"nautechsystems/nautilus_trader","slug":"cannot-resolve-perm-target-perm-id-no-matching","errorCode":null,"errorMessage":"Cannot resolve PERM-{target_perm_id}: no matching open order found","messagePattern":"Cannot resolve PERM-(.+?): no matching open order found","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/interactive_brokers/src/execution/core.rs","lineNumber":2253,"sourceCode":"\n            if !data.order.account.is_empty() && data.order.account != raw_account_id {\n                continue;\n            }\n\n            if data.order.perm_id != target_perm_id {\n                continue;\n            }\n\n            if data.order_id == 0 {\n                anyhow::bail!(\n                    \"Cannot resolve PERM-{target_perm_id}: matching open order has no IB order_id\"\n                );\n            }\n\n            return Ok(data.order_id);\n        }\n\n        anyhow::bail!(\"Cannot resolve PERM-{target_perm_id}: no matching open order found\")\n    }\n\n    fn is_active_open_order(order: &ibapi::orders::Order) -> bool {\n        !order.deactivate\n    }\n\n    fn is_definitive_order_submit_error(error: &ibapi::Error) -> bool {\n        matches!(\n            error,\n            ibapi::Error::InvalidArgument(_) | ibapi::Error::ServerVersion(_, _, _)\n        )\n    }\n\n    fn classify_order_submit_error(error: &ibapi::Error) -> CommandFailure {\n        let reason = error.to_string();\n\n        if Self::is_definitive_order_submit_error(error) {\n            CommandFailure::not_sent(reason)","sourceCodeStart":2235,"sourceCodeEnd":2271,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/interactive_brokers/src/execution/core.rs#L2235-L2271","documentation":"Order-resolution failure in the IB execution client: after scanning open orders (optionally filtered by account) no entry matched the requested perm_id, so the IB order_id needed for a subsequent action cannot be determined.","triggerScenarios":"Thrown at crates/adapters/interactive_brokers/src/execution/core.rs:2253 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the perm_id is correct and the order is still open","Check that the account filter does not exclude the order's account","Trigger an open-orders refresh and retry resolution"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}