nautechsystems/nautilus_trader · error
Binance US supports Spot clients only
Error message
Binance US supports Spot clients only
What it means
When us=True the data client config requires product_type to be Spot, because binance.us (the US-regulated endpoint set) offers spot markets only. The check runs in BinanceDataClientConfig.validate before the client is built, together with the Live-environment and Json market-data-mode requirements.
Source
Thrown at crates/adapters/binance/src/config.rs:254
impl Default for BinanceDataClientConfig {
fn default() -> Self {
Self::builder().build()
}
}
impl BinanceDataClientConfig {
/// Validates Binance data client configuration.
///
/// # Errors
///
/// Returns an error for invalid receive-window, provider, or Binance US settings.
pub fn validate(&self) -> anyhow::Result<()> {
validate_recv_window(self.recv_window_ms)?;
self.instrument_provider.validate(self.product_type)?;
if self.us {
anyhow::ensure!(
self.product_type == BinanceProductType::Spot,
"Binance US supports Spot clients only"
);
anyhow::ensure!(
self.environment == BinanceEnvironment::Live,
"Binance US supports the Live environment only"
);
anyhow::ensure!(
self.spot_market_data_mode == BinanceSpotMarketDataMode::Json,
"Binance US market data requires spot_market_data_mode=Json"
);
}
Ok(())
}
}
impl ClientConfig for BinanceDataClientConfig {View on GitHub (pinned to a4b06ed870)
Solutions
- Set product_type='SPOT' (the default) for the binance.us client.
- For futures/margin markets, drop the US routing: us=False and use the global exchange (subject to your jurisdiction/access).
- Split US and global clients into separate nodes/configs so the us flag only applies to the spot client.
Example fix
# before BinanceDataClientConfig(us=True, product_type=BinanceProductType.USDM_FUTURES) # after BinanceDataClientConfig(us=True, product_type=BinanceProductType.SPOT)
Defensive patterns
Strategy: validation
Validate before calling
if config.us:
assert config.product_type == BinanceProductType.SPOT, \
'binance.us supports SPOT only'
config.validate() Prevention
- Scope the us flag to a single Spot client config rather than a shared template.
- Keep futures clients on separate, us=False configs.
- Call validate() at config build time, before the node starts.
When it happens
Trigger: BinanceDataClientConfig(us=True, product_type='USDM_FUTURES' or 'MARGIN') passed to BinanceDataClientFactory, i.e. registering a US-routed futures/margin data client in a TradingNode.
Common situations: Reusing a global config template with us=True across all clients in a node; enabling us for compliance reasons then adding a futures strategy to the same node; copy-pasting a US spot example and changing only product_type.
Related errors
- Binance US supports the Live environment only
- Binance US market data requires spot_market_data_mode=Json
- Binance v2 does not support instrument filter_callable {filt
- invalid Binance load_ids value {raw:?}: {e}
- unsupported Binance instrument filter {key:?} for {product_t
AI-assisted analysis of nautechsystems/nautilus_trader@a4b06ed870 (2026-08-16).
Data as JSON: /api/errors/bdfbdc48c493d01d.
Report an issue: GitHub.