nautechsystems/nautilus_trader · error
Unsupported product type for Binance execution client: {prod
Error message
Unsupported product type for Binance execution client: {product_type:?} What it means
BinanceExecutionClientFactory builds order-routing clients for Spot (cash account, hedging OMS) and futures (BinanceFuturesExecutionClient). BinanceProductType::Margin and ::Options have no execution client in the v2 adapter, so the factory rejects them with this error at creation time.
Source
Thrown at crates/adapters/binance/src/factories.rs:203
let account_type = AccountType::Margin;
let oms_type = binance_config.oms_type.unwrap_or(OmsType::Netting);
let core = ExecutionClientCore::new(
binance_config.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!(BinanceExecClientConfig)
}
}
#[cfg(test)]
mod tests {
use std::{cell::RefCell, rc::Rc};View on GitHub (pinned to a4b06ed870)
Solutions
- Use product_type='SPOT', 'USDM_FUTURES' or 'COINM_FUTURES' for execution.
- For spot-margin trading keep product_type='SPOT' and enable margin features at the order/account level rather than selecting the Margin product type.
- Confirm supported product types against the factory match arms before registering clients.
Example fix
# before BinanceExecClientConfig(product_type=BinanceProductType.MARGIN) # after BinanceExecClientConfig(product_type=BinanceProductType.SPOT)
Defensive patterns
Strategy: validation
Validate before calling
SUPPORTED_EXEC = ('SPOT', 'USDM_FUTURES', 'COINM_FUTURES')
assert exec_config.product_type in SUPPORTED_EXEC Type guard
def binance_exec_product_supported(pt) -> bool:
return pt in ('SPOT', 'USDM_FUTURES', 'COINM_FUTURES') Prevention
- Margin trading runs over the Spot exec client; do not select MARGIN as product type.
- Validate product_type against the supported set before registering exec clients.
- Watch release notes for newly implemented product types.
When it happens
Trigger: BinanceExecClientConfig(product_type='MARGIN' or 'OPTIONS') registered with BinanceExecutionClientFactory — e.g. attempting to trade European options or configuring margin explicitly as the exec product type.
Common situations: Assuming Margin needs its own exec client (margin uses the spot exec paths with margin endpoints); strategy port from the legacy adapter configured with MARGIN; speculative Options trading setups.
Related errors
- Unsupported product type for Binance data client: {product_t
- Invalid config type for AxExecutionClientFactory. Expected A
- Binance US supports Spot clients only
- Invalid config type for BinanceDataClientFactory. Expected B
- Invalid config type for BinanceExecutionClientFactory. Expec
AI-assisted analysis of nautechsystems/nautilus_trader@a4b06ed870 (2026-08-16).
Data as JSON: /api/errors/580806a44dedeade.
Report an issue: GitHub.