nautechsystems/nautilus_trader · error · anyhow::Error
Binance Futures open order request has unresolved instrument
Error message
Binance Futures open order request has unresolved instrument {instrument_id} What it means
While generating open-order status reports, an open order request references an instrument_id that could not be resolved in the instrument cache (and is not confirmed out-of-scope). Since a report cannot be built without symbol/symbol metadata, the adapter fails with this error instead of silently dropping.
Source
Thrown at crates/adapters/binance/src/futures/execution.rs:1113
async fn generate_open_order_status_reports(
&self,
instrument_id: Option<InstrumentId>,
ts_init: UnixNanos,
) -> anyhow::Result<Vec<OpenOrderStatusReport>> {
if let Some(instrument_id) = instrument_id
&& self
.http_client
.instrument_reconciliation(&instrument_id)
.is_none()
{
if self.is_instrument_out_of_scope(instrument_id) {
log::debug!(
"Dropping out-of-scope Binance Futures order request for instrument {instrument_id}"
);
return Ok(Vec::new());
}
anyhow::bail!(
"Binance Futures open order request has unresolved instrument {instrument_id}"
);
}
let symbol = instrument_id.map(|id| format_binance_symbol(&id));
let mut builder = BinanceOpenOrdersParamsBuilder::default();
if let Some(symbol) = symbol {
builder.symbol(symbol);
}
let params = builder.build().map_err(|e| anyhow::anyhow!("{e}"))?;
let (orders, algo_orders) = tokio::try_join!(
self.http_client.query_open_orders(¶ms),
self.http_client.query_open_algo_orders(instrument_id),
)?;
let mut reports = Vec::with_capacity(orders.len() + algo_orders.len());
View on GitHub (pinned to 18893faf8b)
Solutions
- Load/register the missing instrument into the cache before generating status reports.
- Widen the client's instrument scope so the open order's symbol is in scope.
- Reconcile the account's open orders: cancel stale exchange-side orders for instruments you don't track.
Defensive patterns
Strategy: validation
Validate before calling
for instrument_id in open_order_instrument_ids {
if cache.instrument(&instrument_id).is_none() {
log::warn!("missing instrument in cache: {instrument_id}");
}
}
// load all missing instruments before generate_order_status_reports Prevention
- Populate the instrument cache for every symbol with open orders at startup.
- Keep client instrument scope aligned with the exchange account universe.
- Periodically reconcile cache vs account open orders.
When it happens
Trigger: generate_order_status_reports finds an open order whose instrument is missing from the cache and is_instrument_out_of_scope returns false, so neither filtering nor report generation can proceed.
Common situations: Account holds orders for instruments never loaded into the cache (e.g. newly listed symbols, COIN-M vs USD-M mismatch with configured product scope); client restarted with a narrower instrument universe than the exchange account.
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
- Binance Futures open order has unresolved instrument {instru
- Binance Futures open algo order has unresolved instrument {i
- Instrument not found in cache: {symbol}
- Binance Futures position has unresolved instrument {instrume
- `close_position` cannot be combined with `reduce_only` on Bi
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/d65903e4b77de43e.
Report an issue: GitHub.