nautechsystems/nautilus_trader · error

Symbol ' ' is not trading (status: )

Error message

Symbol '{}' is not trading (status: {:?})

What it means

The USD-M adapter refuses to build an instrument for a symbol whose trading status is not `TRADING`. Binance marks symbols as SETTLING, PRE_DELIVERING, DELIVERING, BREAK, etc.; such symbols are not tradable, so the adapter treats them as invalid instrument data rather than returning a half-usable instrument.

Solutions

  1. Filter the exchangeInfo symbols to status == 'TRADING' before passing them to the parser
  2. Skip non-trading symbols instead of failing the whole instrument load (wrap parsing per-symbol and continue on error)
  3. Re-fetch exchangeInfo if using a cached snapshot — the symbol's status may have changed
  4. Only subscribe to symbols you have confirmed are actively trading

Example fix

// before: parse all symbols from exchangeInfo
for symbol in response.symbols { instruments.push(parse_usdm_instrument(symbol)?)?; }
// after: filter first
for symbol in response.symbols.into_iter().filter(|s| s.status == BinanceTradingStatus::Trading) {
    instruments.push(parse_usdm_instrument(symbol)?);
}
Defensive patterns

Strategy: validation

Validate before calling

fn is_tradable_usdm(symbol: &BinanceUsdmSymbol) -> bool {
    symbol.status == BinanceTradingStatus::Trading
}
// filter before parsing: symbols.retain(is_tradable_usdm);

Type guard

fn is_trading(status: &BinanceTradingStatus) -> bool {
    matches!(status, BinanceTradingStatus::Trading)
}

Try / catch

match parse_usdm_instrument(symbol) {
    Ok(inst) => instruments.push(inst),
    Err(e) if e.to_string().contains("is not trading") => {
        log::warn!("skipping non-trading symbol {}: {e}", symbol.symbol);
    }
    Err(e) => return Err(e),
}

Prevention

When it happens

Trigger: parse_usdm_instrument / request_instruments_with_config encountering a USD-M symbol whose `status` field is anything other than TRADING — typically a symbol in delivery/settlement (SETTLING, DELIVERING), pre-launch (PRE_LISTING), suspended, or in a trading BREAK.

Common situations: Loading the full exchangeInfo symbol universe which always includes delisted/settling contracts; quarterly futures shortly after expiry; a symbol suspended mid-session; caching an old exchangeInfo where a symbol was later halted.

Understand the failure class

Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.

Related errors


AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08). Data as JSON: /api/errors/682e66d58f80249e. Report an issue: GitHub.

Appendix: source

Thrown at crates/adapters/binance/src/common/parse.rs:296

        Delivery,
    }

    let contract_kind = match symbol.contract_type.as_str() {
        CONTRACT_TYPE_PERPETUAL => ContractKind::CryptoPerpetual,
        CONTRACT_TYPE_TRADIFI_PERPETUAL => ContractKind::TradFi(parse_tradifi_asset_class(symbol)?),
        CONTRACT_TYPE_CURRENT_MONTH
        | CONTRACT_TYPE_NEXT_MONTH
        | CONTRACT_TYPE_CURRENT_QUARTER
        | CONTRACT_TYPE_NEXT_QUARTER => ContractKind::Delivery,
        _ => anyhow::bail!(
            "Unsupported USD-M contract type '{}' for symbol '{}'",
            symbol.contract_type,
            symbol.symbol,
        ),
    };

    if symbol.status != BinanceTradingStatus::Trading {
        anyhow::bail!(
            "Symbol '{}' is not trading (status: {:?})",
            symbol.symbol,
            symbol.status
        );
    }

    let quote_currency = get_currency(symbol.quote_asset.as_str());
    let settlement_currency = get_currency(symbol.margin_asset.as_str());

    let instrument_id = format_instrument_id(&symbol.symbol, BinanceProductType::UsdM);
    let raw_symbol = Symbol::new(symbol.symbol.as_str());

    let price_filter = get_filter(&symbol.filters, "PRICE_FILTER")
        .context("Missing PRICE_FILTER in symbol filters")?;

    let tick_size = parse_filter_price(price_filter, "tickSize")?;
    if tick_size.is_zero() {
        anyhow::bail!(

View on GitHub (pinned to 18893faf8b)