nautechsystems/nautilus_trader · error · anyhow::Error
{e}
Error message
{e} What it means
While recovering the user data stream, the adapter builds default open-orders REST parameters; this error means BinanceOpenOrdersParamsBuilder's own validation rejected the parameters (the builder's error {e} is wrapped with the context 'failed to build open orders params for recovery reconcile'). Because only defaults are used, hitting it points to an adapter-internal bug or version regression, not user configuration.
Source
Thrown at crates/adapters/binance/src/futures/websocket/streams/recovery.rs:266
/// Emits `OrderStatusReport`s for every open order and open algo order on the
/// venue so the engine can repair any order state missed during the rotation
/// window. Uses the Arc-backed HTTP instruments cache for precision lookups,
/// which does not require `&self` access.
///
/// This does not cover orders that filled or canceled during the rotation
/// gap, because `query_open_orders` returns open orders only. The engine's
/// periodic open-order reconciliation is expected to repair that state.
///
/// # Errors
///
/// Returns an error if both the open-order and open-algo-order REST queries
/// fail, so `recover_with_retry` schedules another attempt instead of
/// silently leaving the gap unrepaired.
async fn emit_open_order_reports(ctx: &RecoveryCtx) -> anyhow::Result<()> {
let params = BinanceOpenOrdersParamsBuilder::default()
.build()
.map_err(|e| anyhow::anyhow!("{e}"))
.context("failed to build open orders params for recovery reconcile")?;
let open_orders_result = ctx.http_client.query_open_orders(¶ms).await;
let algo_orders_result = ctx.http_client.query_open_algo_orders(None).await;
let ts_init = ctx.dispatch_ctx.clock.get_time_ns();
let instruments = ctx.http_client.instruments_cache();
let product_type = ctx.dispatch_ctx.product_type;
let mut emitted = 0usize;
let open_ok = match open_orders_result {
Ok(orders) => {
for order in orders {
let symbol_ustr = order.symbol;
let (instrument_id, price_precision, size_precision) =
resolve_precision(&instruments, &symbol_ustr, product_type);
match order.to_order_status_report(View on GitHub (pinned to a4b06ed870)
Solutions
- Upgrade (or pin back to) a NautilusTrader version where the default open-orders params builder validates cleanly
- If reproducible, open an issue with the full error chain (the context wraps the builder's {e}) and the recovery logs
Defensive patterns
Strategy: retry
Try / catch
Let the recovery driver retry; if the identical builder error recurs on every attempt (it will, since defaults are deterministic), treat it as a version regression: pin a known-good version and report upstream with the full error chain.
Prevention
- Pin dependency versions and test recovery paths in staging after upgrades
- Alert when recovery reconcile failures repeat with identical messages
When it happens
Trigger: emit_open_order_reports during stream recovery runs BinanceOpenOrdersParamsBuilder::default().build() and the builder returns Err from its validation rules.
Common situations: Essentially unreachable via user config; can appear after upgrading to a version where the builder's validation rules regressed or a required-by-default field was added.
Related errors
- recovery reconcile failed: both REST queries returned errors
- Invalid price_match value: {s:?}
- Unsupported underlying type '{underlying_type}' for TRADIFI_
- callbackRate {rate}% out of Binance range [{min_rate}, {max_
- BinanceFuturesDataClient requires UsdM or CoinM product type
AI-assisted analysis of nautechsystems/nautilus_trader@a4b06ed870 (2026-08-16).
Data as JSON: /api/errors/183c5ba4cf8726d4.
Report an issue: GitHub.