nautechsystems/nautilus_trader · error

Unsupported product type for Binance execution client

Error message

Unsupported product type for Binance execution client: {product_type:?}

What it means

The Binance execution client factory only supports specific product types (futures execution via BinanceFuturesExecutionClient). A BinanceProductType outside the handled match arms cannot be turned into an execution client and bails with this error.

Solutions

  1. Set product_type to a variant supported by the execution factory (futures: UsdM or CoinM, per the factory match arms)
  2. Confirm the execution adapter for your product type exists; spot execution may need a different client path
  3. Validate the BinanceProductType string in your node config against the enum definitions

Example fix

// before
product_type: BinanceProductType::Options
// after
product_type: BinanceProductType::CoinM
Defensive patterns

Strategy: validation

Validate before calling

fn is_supported_execution_product(pt: BinanceProductType) -> bool {
    matches!(pt, BinanceProductType::UsdM | BinanceProductType::CoinM)
}

Type guard

fn is_supported_execution_product(pt: BinanceProductType) -> bool {
    matches!(pt, BinanceProductType::UsdM | BinanceProductType::CoinM)
}

Try / catch

match exec_factory.create(client_id, &config) {
    Err(e) if e.to_string().contains("Unsupported product type for Binance execution client") => {
        eprintln!("Execution is only supported for futures product types: {e}");
    }
    r => r?,
}

Prevention

When it happens

Trigger: Creating a Binance execution (live trading) client through the factory with an unhandled BinanceProductType in the client config.

Common situations: Configuring a live execution node against a product type the v2 Binance adapter does not implement (e.g. options or an unsupported variant); copying a data-client config into an execution-client slot.

Related errors


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

Appendix: source

Thrown at crates/adapters/binance/src/factories.rs:204

                let account_type = AccountType::Margin;
                let oms_type = binance_config.oms_type.unwrap_or(OmsType::Netting);

                let core = ExecutionClientCore::new(
                    trader_id,
                    ClientId::from(name),
                    *BINANCE_VENUE,
                    oms_type,
                    binance_config.account_id,
                    account_type,
                    None, // base_currency
                    cache,
                );

                let client = BinanceFuturesExecutionClient::new(core, binance_config)?;
                Ok(Box::new(client))
            }
            _ => {
                anyhow::bail!(
                    "Unsupported product type for Binance execution client: {product_type:?}"
                )
            }
        }
    }

    fn name(&self) -> &'static str {
        BINANCE
    }

    fn config_type(&self) -> &'static str {
        stringify!(BinanceExecutionClientConfig)
    }
}

#[cfg(test)]
mod tests {
    use std::{cell::RefCell, rc::Rc};

View on GitHub (pinned to 18893faf8b)