{"record":{"id":"682e66d58f80249e","repo":"nautechsystems/nautilus_trader","slug":"symbol-is-not-trading-status","errorCode":null,"errorMessage":"Symbol '{}' is not trading (status: {:?})","messagePattern":"Symbol '(.+?)' is not trading \\(status: (.+?)\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/binance/src/common/parse.rs","lineNumber":296,"sourceCode":"        Delivery,\n    }\n\n    let contract_kind = match symbol.contract_type.as_str() {\n        CONTRACT_TYPE_PERPETUAL => ContractKind::CryptoPerpetual,\n        CONTRACT_TYPE_TRADIFI_PERPETUAL => ContractKind::TradFi(parse_tradifi_asset_class(symbol)?),\n        CONTRACT_TYPE_CURRENT_MONTH\n        | CONTRACT_TYPE_NEXT_MONTH\n        | CONTRACT_TYPE_CURRENT_QUARTER\n        | CONTRACT_TYPE_NEXT_QUARTER => ContractKind::Delivery,\n        _ => anyhow::bail!(\n            \"Unsupported USD-M contract type '{}' for symbol '{}'\",\n            symbol.contract_type,\n            symbol.symbol,\n        ),\n    };\n\n    if symbol.status != BinanceTradingStatus::Trading {\n        anyhow::bail!(\n            \"Symbol '{}' is not trading (status: {:?})\",\n            symbol.symbol,\n            symbol.status\n        );\n    }\n\n    let quote_currency = get_currency(symbol.quote_asset.as_str());\n    let settlement_currency = get_currency(symbol.margin_asset.as_str());\n\n    let instrument_id = format_instrument_id(&symbol.symbol, BinanceProductType::UsdM);\n    let raw_symbol = Symbol::new(symbol.symbol.as_str());\n\n    let price_filter = get_filter(&symbol.filters, \"PRICE_FILTER\")\n        .context(\"Missing PRICE_FILTER in symbol filters\")?;\n\n    let tick_size = parse_filter_price(price_filter, \"tickSize\")?;\n    if tick_size.is_zero() {\n        anyhow::bail!(","sourceCodeStart":278,"sourceCodeEnd":314,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/binance/src/common/parse.rs#L278-L314","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Filter the exchangeInfo symbols to status == 'TRADING' before passing them to the parser","Skip non-trading symbols instead of failing the whole instrument load (wrap parsing per-symbol and continue on error)","Re-fetch exchangeInfo if using a cached snapshot — the symbol's status may have changed","Only subscribe to symbols you have confirmed are actively trading"],"exampleFix":"// before: parse all symbols from exchangeInfo\nfor symbol in response.symbols { instruments.push(parse_usdm_instrument(symbol)?)?; }\n// after: filter first\nfor symbol in response.symbols.into_iter().filter(|s| s.status == BinanceTradingStatus::Trading) {\n    instruments.push(parse_usdm_instrument(symbol)?);\n}","handlingStrategy":"validation","validationCode":"fn is_tradable_usdm(symbol: &BinanceUsdmSymbol) -> bool {\n    symbol.status == BinanceTradingStatus::Trading\n}\n// filter before parsing: symbols.retain(is_tradable_usdm);","typeGuard":"fn is_trading(status: &BinanceTradingStatus) -> bool {\n    matches!(status, BinanceTradingStatus::Trading)\n}","tryCatchPattern":"match parse_usdm_instrument(symbol) {\n    Ok(inst) => instruments.push(inst),\n    Err(e) if e.to_string().contains(\"is not trading\") => {\n        log::warn!(\"skipping non-trading symbol {}: {e}\", symbol.symbol);\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Always filter exchangeInfo symbols to status TRADING before instrument loading","Refresh cached instrument lists regularly — statuses change with expiries and incidents","Skip rather than fail on non-trading symbols when loading the full universe"],"tags":["binance","usdm-futures","instrument-parsing","trading-status","rust"],"backgroundTag":"invalid-state-transition","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}