nautechsystems/nautilus_trader · error · anyhow::Error

Binance Futures open order has unresolved instrument {instru

Error message

Binance Futures open order has unresolved instrument {instrument_id}

What it means

Same resolution failure as [266] but for open (resting) orders themselves: the order's instrument_id is absent from the cache and not deemed out-of-scope, so to_order_status_report cannot be built and the adapter bails.

Source

Thrown at crates/adapters/binance/src/futures/execution.rs:1143

        let (orders, algo_orders) = tokio::try_join!(
            self.http_client.query_open_orders(&params),
            self.http_client.query_open_algo_orders(instrument_id),
        )?;
        let mut reports = Vec::with_capacity(orders.len() + algo_orders.len());

        for order in orders {
            let instrument_id = instrument_id
                .unwrap_or_else(|| format_instrument_id(&order.symbol, self.product_type));
            let Some(instrument) = self.http_client.instrument_reconciliation(&instrument_id)
            else {
                if self.is_instrument_out_of_scope(instrument_id) {
                    log::debug!(
                        "Dropping out-of-scope Binance Futures open order for instrument {instrument_id}"
                    );
                    continue;
                }
                anyhow::bail!(
                    "Binance Futures open order has unresolved instrument {instrument_id}"
                );
            };

            if let Ok(report) = order.to_order_status_report(
                self.core.account_id,
                instrument.id(),
                instrument.price_precision(),
                instrument.size_precision(),
                self.config.treat_expired_as_canceled,
                ts_init,
            ) {
                let venue_position_id = make_venue_position_id(
                    self.config.use_position_ids,
                    instrument.id(),
                    order.position_side,
                )?;
                reports.push(OpenOrderStatusReport {

View on GitHub (pinned to 18893faf8b)

Solutions

  1. Ensure the instrument cache contains every symbol with open orders on the account.
  2. Adjust scope filters (is_instrument_out_of_scope inputs) so untracked instruments are deliberately dropped instead of erroring.
  3. Cancel/clean up foreign open orders on the account before connecting this client.
Defensive patterns

Strategy: validation

Validate before calling

if cache.instrument(&instrument_id).is_none() {
    log::warn!("skipping open order for untracked instrument {instrument_id}");
    continue;
}

Prevention

When it happens

Trigger: generate_open_order_status_reports iterates exchange open orders; one references a symbol whose InstrumentId isn't in the cache and isn't filtered as out-of-scope.

Common situations: Orders placed via another client/UI for instruments outside this client's configured universe; cache not populated for all account symbols at startup.

Understand the failure class

Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.

Related errors


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