{"record":{"id":"a6bed9b46708328f","repo":"nautechsystems/nautilus_trader","slug":"invalid-venue-order-id","errorCode":null,"errorMessage":"Invalid venue order ID","messagePattern":"Invalid venue order ID","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/binance/src/futures/http/client.rs","lineNumber":2310,"sourceCode":"        order_side: OrderSide,\n        quantity: Quantity,\n        price: Price,\n    ) -> anyhow::Result<OrderStatusReport> {\n        anyhow::ensure!(\n            venue_order_id.is_some() || client_order_id.is_some(),\n            \"Either venue_order_id or client_order_id must be provided\"\n        );\n\n        let symbol = format_binance_symbol(&instrument_id);\n        let size_precision = self.get_size_precision(&symbol)?;\n        let price_precision = self.get_price_precision(&symbol)?;\n\n        let binance_side = BinanceSide::try_from(order_side)?;\n\n        let order_id = venue_order_id\n            .map(|id| id.inner().parse::<i64>())\n            .transpose()\n            .map_err(|_| anyhow::anyhow!(\"Invalid venue order ID\"))?;\n\n        let params = BinanceModifyOrderParams {\n            symbol,\n            order_id,\n            orig_client_order_id: client_order_id\n                .map(|id| encode_broker_id(&id, BINANCE_NAUTILUS_FUTURES_BROKER_ID)),\n            side: binance_side,\n            quantity: quantity.to_string(),\n            price: price.to_string(),\n            recv_window: None,\n        };\n\n        let order = self.inner.modify_order(&params).await?;\n        let ts_init = self.clock.get_time_ns();\n        order.to_order_status_report(\n            account_id,\n            instrument_id,\n            price_precision,","sourceCodeStart":2292,"sourceCodeEnd":2328,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/a4b06ed870971b5671d12754ea138a3ab99b1dec/crates/adapters/binance/src/futures/http/client.rs#L2292-L2328","documentation":"modify_order parses venue_order_id into an i64 for the orderId parameter; a non-numeric ID (letters, foreign-venue IDs, corrupted values) fails the parse and aborts the modify. Unlike cancel_order, which falls back to the client ID when the venue ID will not parse, the modify path errors out here even when a client_order_id is available.","triggerScenarios":"ModifyOrder with a venue_order_id whose inner string is not a valid i64, submitted over the REST path (ws trading inactive).","commonSituations":"Cross-venue ID mix-ups; placeholder IDs in tests; cache corruption or manually edited identifiers.","solutions":["Re-derive the correct numeric venue order ID: query order status by client_order_id first","Let reconciliation populate venue_order_id before issuing modifies","Verify IDs originate from Binance Futures order events (they are numeric strings)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before submitting a modify over REST\nif let Some(vid) = venue_order_id.as_ref() {\n    if vid.inner().parse::<i64>().is_err() {\n        // Resolve the numeric venue ID by querying order status first,\n        // then retry the modify with the corrected ID\n    }\n}","typeGuard":"fn venue_id_is_numeric(id: &VenueOrderId) -> bool {\n    id.inner().parse::<i64>().is_ok()\n}","tryCatchPattern":"On an error containing 'Invalid venue order ID', query the order by client_order_id to obtain the numeric venue ID, then resubmit the modify.","preventionTips":["Only modify orders whose venue_order_id came from Binance order events","Run reconciliation after restarts before issuing modifies","Validate IDs in cross-venue strategy code before routing"],"tags":["binance","futures","venue-order-id","order-modify","rust"],"backgroundTag":"invalid-venue-order-id","analyzedSha":"a4b06ed870971b5671d12754ea138a3ab99b1dec","analyzedAt":"2026-08-16T22:54:50.089Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}