nautechsystems/nautilus_trader · error
BinanceFuturesExecutionClient requires UsdM or CoinM…
Error message
BinanceFuturesExecutionClient requires UsdM or CoinM product type, was {product_type:?} What it means
BinanceFuturesExecutionClient::new validates the config's product_type after running config.validate(). Only UsdM (USD-Margined) and CoinM (Coin-Margined) futures are supported by this execution client; other Binance product types (e.g. Spot or Options) are rejected.
Solutions
- Set product_type to BinanceProductType::UsdM for USD-M futures.
- Set product_type to BinanceProductType::CoinM for COIN-M futures.
- If you need spot, use the Binance spot execution client instead of the futures one.
Example fix
// before
let config = BinanceExecutionClientConfig { product_type: BinanceProductType::Options, .. };
// after
let config = BinanceExecutionClientConfig { product_type: BinanceProductType::UsdM, .. }; Defensive patterns
Strategy: validation
Validate before calling
match config.product_type {
BinanceProductType::UsdM | BinanceProductType::CoinM => {},
other => return Err(anyhow::anyhow!("unsupported product type {other:?} for futures execution client")),
} Prevention
- Validate product_type in your config loader before constructing the client.
- Use separate config structs for spot vs futures adapters.
- Never share one Binance config file across adapter types.
When it happens
Trigger: Constructing BinanceFuturesExecutionClient with a BinanceProductType other than UsdM or CoinM (e.g. Options, Spot), passed via BinanceExecutionClientConfig.
Common situations: Reusing a shared Binance config across spot/futures adapters; typo or default product type not set; swapping API endpoints without updating product_type.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- BinanceFuturesDataClient requires UsdM or CoinM product…
- Binance Futures account state request failed
- Binance Futures aggregate trade history is limited to the…
- Binance Futures open algo order has unresolved instrument
- Binance Futures open order has unresolved instrument
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/a27f4bfbcc0fefd0.
Report an issue: GitHub.
Appendix: source
Thrown at crates/adapters/binance/src/futures/execution.rs:212
}
impl BinanceFuturesExecutionClient {
/// Creates a new [`BinanceFuturesExecutionClient`].
///
/// # Errors
///
/// Returns an error if the HTTP client fails to initialize, credentials are
/// missing, or the product type is not a futures type (UsdM or CoinM).
pub fn new(
core: ExecutionClientCore,
config: BinanceExecutionClientConfig,
) -> anyhow::Result<Self> {
config.validate()?;
let product_type = config.product_type;
match product_type {
BinanceProductType::UsdM | BinanceProductType::CoinM => {}
_ => {
anyhow::bail!(
"BinanceFuturesExecutionClient requires UsdM or CoinM product type, was {product_type:?}"
);
}
}
let (api_key, api_secret) = resolve_credentials(
config
.api_key
.as_ref()
.map(|value| value.expose_secret().to_owned()),
config
.api_secret
.as_ref()
.map(|value| value.expose_secret().to_owned()),
config.environment,
product_type,
)?;
let proxy_url = configView on GitHub (pinned to 18893faf8b)