{"record":{"id":"369ab02148e9ab75","repo":"nautechsystems/nautilus_trader","slug":"order-overfill-rejected-potential-overfill","errorCode":null,"errorMessage":"Order overfill rejected: {} potential_overfill={}, current_filled={}, last_qty={}, quantity={}. Set `allow_overfills=true` in ExecutionEngineConfig to allow overfills.","messagePattern":"Order overfill rejected: (.+?) potential_overfill=(.+?), current_filled=(.+?), last_qty=(.+?), quantity=(.+?)\\. Set `allow_overfills=true` in ExecutionEngineConfig to allow overfills\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/execution/src/engine/mod.rs","lineNumber":3746,"sourceCode":"                log::warn!(\n                    \"Order overfill detected: {} potential_overfill={}, current_filled={}, last_qty={}, quantity={}\",\n                    order.client_order_id(),\n                    potential_overfill,\n                    order.filled_qty(),\n                    fill.last_qty,\n                    order.quantity()\n                );\n            } else {\n                let msg = format!(\n                    \"Order overfill rejected: {} potential_overfill={}, current_filled={}, last_qty={}, quantity={}. \\\n                Set `allow_overfills=true` in ExecutionEngineConfig to allow overfills.\",\n                    order.client_order_id(),\n                    potential_overfill,\n                    order.filled_qty(),\n                    fill.last_qty,\n                    order.quantity()\n                );\n                anyhow::bail!(\"{msg}\");\n            }\n        }\n\n        Ok(())\n    }\n\n    fn handle_order_fill(\n        &mut self,\n        order: &OrderAny,\n        fill: OrderFilled,\n        oms_type: OmsType,\n    ) -> Vec<PositionEvent> {\n        let instrument =\n            if let Some(instrument) = self.cache.borrow().instrument(&fill.instrument_id) {\n                instrument.clone()\n            } else {\n                log::error!(\n                    \"Cannot handle order fill: no instrument found for {}, {fill}\",","sourceCodeStart":3728,"sourceCodeEnd":3764,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/execution/src/engine/mod.rs#L3728-L3764","documentation":"Error \"Order overfill rejected: {} potential_overfill={}, current_filled={}, last_qty={}, quantity={}. Set `allow_overfills=true` in ExecutionEngineConfig to allow overfills.\" thrown in nautechsystems/nautilus_trader.","triggerScenarios":"Thrown at crates/execution/src/engine/mod.rs:3746 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set allow_overfills=true in ExecutionEngineConfig if the venue legitimately overfills and that should be tolerated","Investigate the fill stream for duplicated or oversized fills (reconciliation or latency issues) before allowing overfills"],"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"}