{"record":{"id":"8fe79c7df5e7ea17","repo":"nautechsystems/nautilus_trader","slug":"unsupported-usd-m-contract-type-for-symbol","errorCode":null,"errorMessage":"Unsupported USD-M contract type '{}' for symbol '{}'","messagePattern":"Unsupported USD-M contract type '(.+?)' for symbol '(.+?)'","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/binance/src/common/parse.rs","lineNumber":288,"sourceCode":"    maker_fee: Option<Decimal>,\n    taker_fee: Option<Decimal>,\n    ts_event: UnixNanos,\n    ts_init: UnixNanos,\n) -> anyhow::Result<InstrumentAny> {\n    enum ContractKind {\n        CryptoPerpetual,\n        TradFi(AssetClass),\n        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);","sourceCodeStart":270,"sourceCodeEnd":306,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/a4b06ed870971b5671d12754ea138a3ab99b1dec/crates/adapters/binance/src/common/parse.rs#L270-L306","documentation":"During USD-M futures instrument parsing (parse_usdm_instrument_with_fees), each symbol's contractType string is mapped to an instrument kind. Only PERPETUAL, TRADIFI_PERPETUAL, CURRENT_MONTH, NEXT_MONTH, CURRENT_QUARTER and NEXT_QUARTER are recognized; any other contractType bails with this error, naming the symbol and the unrecognized type.","triggerScenarios":"Loading the USD-M exchangeInfo when it contains a symbol whose contractType falls outside the six supported constants — for example a newly introduced delivery cycle or contract family that the adapter version predates.","commonSituations":"Binance launches a new contract type (as when TRADIFI_PERPETUAL was added); an older NautilusTrader build runs against a live venue that has since extended contractType; test fixtures hand-write an unknown contractType.","solutions":["Look up the reported symbol in the live USD-M exchangeInfo and note its contractType value.","Update NautilusTrader to a release supporting the new contract type, or open an issue with the symbol and the raw type string.","Filter that symbol out of instrument loading until the adapter supports it.","In tests, use one of the six recognized contractType strings."],"exampleFix":"// before (fixture)\n// \"contractType\": \"SOME_NEW_TYPE\"      -> Unsupported USD-M contract type\n// after\n// \"contractType\": \"CURRENT_QUARTER\"   // one of the six supported values","handlingStrategy":"try-catch","validationCode":"const SUPPORTED_USDM: [&str; 6] = [\n    \"PERPETUAL\", \"TRADIFI_PERPETUAL\", \"CURRENT_MONTH\",\n    \"NEXT_MONTH\", \"CURRENT_QUARTER\", \"NEXT_QUARTER\",\n];\n\nfn usdm_contract_type_supported(ct: &str) -> bool {\n    SUPPORTED_USDM.contains(&ct)\n}","typeGuard":"fn is_supported_usdm_contract_type(ct: &str) -> bool {\n    matches!(\n        ct,\n        \"PERPETUAL\" | \"TRADIFI_PERPETUAL\" | \"CURRENT_MONTH\" | \"NEXT_MONTH\"\n            | \"CURRENT_QUARTER\" | \"NEXT_QUARTER\"\n    )\n}","tryCatchPattern":"match parse_usdm_instrument(&symbol, ts_event, ts_init) {\n    Ok(inst) => instruments.push(inst),\n    Err(e) if e.to_string().contains(\"Unsupported USD-M contract type\") => {\n        tracing::warn!(symbol = %symbol.symbol, \"new contract type, skipping: {e}\")\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Pre-filter the exchangeInfo symbol list against the supported contract types before instrument loading.","Watch NautilusTrader release notes when Binance announces new contract families.","Alert on unknown contractType strings so new venue launches are noticed instead of silently failing."],"tags":["binance","usdm-futures","contract-type","exchange-info","rust"],"backgroundTag":"unsupported-contract-type","analyzedSha":"a4b06ed870971b5671d12754ea138a3ab99b1dec","analyzedAt":"2026-08-16T22:54:50.089Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}