nautechsystems/nautilus_trader · error
Unsupported product type for Binance data client: {product_t
Error message
Unsupported product type for Binance data client: {product_type:?} What it means
BinanceDataClientFactory only implements data clients for Spot (BinanceSpotDataClient) and futures (BinanceFuturesDataClient for UsdM/CoinM). BinanceProductType::Margin and BinanceProductType::Options have no v2 data client implementation, so the factory bails with this error naming the unsupported variant.
Source
Thrown at crates/adapters/binance/src/factories.rs:103
let client_id = ClientId::from(name);
binance_config.validate()?;
let product_type = binance_config.product_type;
match product_type {
BinanceProductType::Spot => {
let client = BinanceSpotDataClient::new(client_id, binance_config)?;
Ok(Box::new(client))
}
BinanceProductType::UsdM | BinanceProductType::CoinM => {
let client =
BinanceFuturesDataClient::new(client_id, binance_config, product_type)?;
Ok(Box::new(client))
}
_ => {
anyhow::bail!("Unsupported product type for Binance data client: {product_type:?}")
}
}
}
fn name(&self) -> &'static str {
BINANCE
}
fn config_type(&self) -> &'static str {
stringify!(BinanceDataClientConfig)
}
}
/// Factory for creating Binance Spot execution clients.
#[derive(Debug, Clone)]
#[cfg_attr(
feature = "python",
pyo3::pyclass(module = "nautilus_trader.adapters.binance", from_py_object)View on GitHub (pinned to a4b06ed870)
Solutions
- Use product_type='SPOT', 'USDM_FUTURES' or 'COINM_FUTURES' for market data.
- For margin market data, note that margin trades on the spot symbols: use the Spot client with a margin exec config.
- Track or contribute the missing product-type client rather than working around the factory.
Example fix
# before BinanceDataClientConfig(product_type=BinanceProductType.OPTIONS) # after BinanceDataClientConfig(product_type=BinanceProductType.SPOT)
Defensive patterns
Strategy: validation
Validate before calling
SUPPORTED_DATA = ('SPOT', 'USDM_FUTURES', 'COINM_FUTURES')
assert config.product_type in SUPPORTED_DATA Type guard
def binance_data_product_supported(pt) -> bool:
return pt in ('SPOT', 'USDM_FUTURES', 'COINM_FUTURES') Prevention
- Treat Margin and Options as unimplemented in the v2 adapter.
- Use the Spot client for margin market data (same symbols).
- Check the factory match arms when upgrading — the supported set may grow.
When it happens
Trigger: BinanceDataClientConfig(product_type='MARGIN' or 'OPTIONS') passed to BinanceDataClientFactory.create / registered in a TradingNode's data client list.
Common situations: Assuming every BinanceProductType variant is implemented because the enum exposes it; configs from the legacy adapter that used Margin; exploring European Options (eapi.binance.com) support that has not been built yet.
Related errors
- Unsupported product type for Binance execution client: {prod
- Binance US supports Spot clients only
- Invalid config type for BinanceDataClientFactory. Expected B
- Invalid config type for BinanceExecutionClientFactory. Expec
- BinanceFuturesDataClient requires UsdM or CoinM product type
AI-assisted analysis of nautechsystems/nautilus_trader@a4b06ed870 (2026-08-16).
Data as JSON: /api/errors/d25b564013c3a248.
Report an issue: GitHub.