nautechsystems/nautilus_trader · error · anyhow::Error

Order not found for modify in IB open orders: client_order_i

Error message

Order not found for modify in IB open orders: client_order_id={}, venue_order_id={:?}

What it means

Modify-path failure in handle_modify_open_order_async: the order was not found in the local cache and the subsequent open-orders request also failed to surface a matching order, so no modification target could be resolved.

Source

Thrown at crates/adapters/interactive_brokers/src/execution/core_orders.rs:394

                        return Ok(());
                    }

                    tracing::debug!(
                        "Modified open order {} (IB order ID: {}) after cache miss",
                        cmd.client_order_id,
                        ib_order_id
                    );

                    return Ok(());
                }
                Ok(_) => {}
                Err(e) => {
                    tracing::warn!("Error receiving open order data for modify: {e}");
                }
            }
        }

        anyhow::bail!(
            "Order not found for modify in IB open orders: client_order_id={}, venue_order_id={:?}",
            cmd.client_order_id,
            cmd.venue_order_id,
        )
    }

    #[allow(clippy::too_many_arguments)]
    pub(super) async fn handle_submit_order_list_async(
        cmd: &SubmitOrderList,
        orders: &[OrderAny],
        client: &Arc<Client>,
        order_id_map: &Arc<Mutex<AHashMap<ClientOrderId, i32>>>,
        venue_order_id_map: &Arc<Mutex<AHashMap<i32, ClientOrderId>>>,
        instrument_id_map: &Arc<Mutex<AHashMap<i32, InstrumentId>>>,
        trader_id_map: &Arc<Mutex<AHashMap<i32, TraderId>>>,
        strategy_id_map: &Arc<Mutex<AHashMap<i32, StrategyId>>>,
        active_order_contexts: &Arc<Mutex<AHashMap<i32, TrackedOrderContext>>>,
        terminal_order_contexts: &Arc<Mutex<FifoCacheMap<i32, TrackedOrderContext, 10_000>>>,

View on GitHub (pinned to 18893faf8b)

Solutions

  1. Verify the client_order_id/venue_order_id are correct
  2. Trigger an open-order reconciliation to refresh the cache and retry
  3. Confirm the order has not already been filled or cancelled
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/adapters/interactive_brokers/src/execution/core_orders.rs:394 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08). Data as JSON: /api/errors/d0402eb72f51e9e3. Report an issue: GitHub.