nautechsystems/nautilus_trader · error
order {} reports order-list ID {:?}, expected {}
Error message
order {} reports order-list ID {:?}, expected {} What it means
When preparing cancels for an order list, every child cancel report must reference the parent list via its orderListId. This error fires when a report's order_list_id is None or a different list ID than the response's top-level order_list_id, meaning the report cannot be attributed to the list being canceled.
Source
Thrown at crates/adapters/binance/src/spot/execution.rs:2572
let mut list_orders = AHashMap::with_capacity(response.orders.len());
for order in response.orders {
anyhow::ensure!(
order.symbol == response.symbol,
"order list {} contains order {} for symbol {}, expected {}",
response.order_list_id,
order.order_id,
order.symbol,
response.symbol,
);
anyhow::ensure!(
list_orders.insert(order.order_id, order).is_none(),
"order list {} contains a duplicate order ID",
response.order_list_id,
);
}
for report in response.order_reports {
anyhow::ensure!(
report.order_list_id == Some(response.order_list_id),
"order {} reports order-list ID {:?}, expected {}",
report.order_id,
report.order_list_id,
response.order_list_id,
);
let order = list_orders.remove(&report.order_id).with_context(|| {
format!(
"order-list report {} is absent from list {}",
report.order_id, response.order_list_id
)
})?;
anyhow::ensure!(
report.symbol == response.symbol
&& report.symbol == order.symbol
&& report.orig_client_order_id == order.client_order_id,
"order-list report {} does not match its order identity",
report.order_id,View on GitHub (pinned to 18893faf8b)
Solutions
- Update the nautilus_binance adapter and nautilus_trader to versions matching the current Binance SBE schema
- Log report.order_id and the reported order_list_id alongside the expected ID and report upstream if reproducible
- Retry the request to rule out transient payload corruption
- Avoid issuing overlapping cancel-all requests for the same account concurrently
Defensive patterns
Strategy: validation
Validate before calling
if let Some(bad) = response.order_reports.iter().find(|r| r.order_list_id != Some(response.order_list_id)) {
return Err(anyhow!("report {} has list id {:?}", bad.order_id, bad.order_list_id));
} Type guard
fn reports_belong_to_list(resp: &BinanceCancelOrderListResponse) -> bool {
resp.order_reports.iter().all(|r| r.order_list_id == Some(resp.order_list_id))
} Try / catch
match prepare_cancel_all_orders(...) {
Ok(p) => handle(p),
Err(e) if e.to_string().contains("order-list ID") => log::error!("report attribution failure: {e}"),
Err(e) => return Err(e),
} Prevention
- Update the adapter when Binance ships SBE schema changes
- Do not run overlapping cancel-all requests on the same account
- Verify optional orderListId fields decode non-None with your adapter version
When it happens
Trigger: Binance cancel-open-orders OrderList response contains an order_report whose orderListId field is missing (None) or points to a different order list than response.order_list_id — e.g. from schema decode drift, truncated SBE fields, or an exchange-side anomaly.
Common situations: Adapter version lagging a Binance SBE schema change so optional fields decode as None; corrupted/partial payload delivery; mixing responses from concurrent cancel requests.
Understand the failure class
Background: "invalid response format", "malformed payload", "missing data field": when an API returns 200 but the response shape is wrong — this error's family across 23 libraries.
Related errors
- order list {} contains order {} for symbol {}, expected {}
- order list {} contains a duplicate order ID
- order-list report {} is absent from list {}
- order-list report {} does not match its order identity
- Unsupported `OrderSide` for Binance: {value:?}
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/96fccf6844757f29.
Report an issue: GitHub.