nautechsystems/nautilus_trader · error · anyhow::Error
BinanceFuturesWebSocketClient requires UsdM or CoinM product
Error message
BinanceFuturesWebSocketClient requires UsdM or CoinM product type, was {product_type:?} What it means
Error "BinanceFuturesWebSocketClient requires UsdM or CoinM product type, was {product_type:?}" thrown in nautechsystems/nautilus_trader.
Source
Thrown at crates/adapters/binance/src/futures/websocket/streams/client.rs:139
///
/// # Errors
///
/// Returns an error if:
/// - `product_type` is not a futures type (UsdM or CoinM).
/// - Credential creation fails.
pub fn new(
product_type: BinanceProductType,
environment: BinanceEnvironment,
api_key: Option<String>,
api_secret: Option<String>,
url_override: Option<String>,
heartbeat: Option<u64>,
transport_backend: TransportBackend,
) -> anyhow::Result<Self> {
match product_type {
BinanceProductType::UsdM | BinanceProductType::CoinM => {}
_ => {
anyhow::bail!(
"BinanceFuturesWebSocketClient requires UsdM or CoinM product type, was {product_type:?}"
);
}
}
let url =
url_override.unwrap_or_else(|| get_ws_base_url(product_type, environment).to_string());
let credential = match (api_key, api_secret) {
(Some(key), Some(secret)) => Some(Arc::new(SigningCredential::new(key, secret))),
_ => None,
};
Ok(Self {
url,
product_type,
credential,
heartbeat,View on GitHub (pinned to a4b06ed870)
When it happens
Trigger: Thrown at crates/adapters/binance/src/futures/websocket/streams/client.rs:139 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of nautechsystems/nautilus_trader@a4b06ed870 (2026-08-16).
Data as JSON: /api/errors/4d91f649b3ec18a3.
Report an issue: GitHub.