{"record":{"id":"0b99a4343a08be27","repo":"nautechsystems/nautilus_trader","slug":"unsupported-coin-m-contract-type-for-symbol","errorCode":null,"errorMessage":"Unsupported COIN-M contract type '{}' for symbol '{}'","messagePattern":"Unsupported COIN-M contract type '(.+?)' for symbol '(.+?)'","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/binance/src/common/parse.rs","lineNumber":465,"sourceCode":") -> anyhow::Result<InstrumentAny> {\n    parse_coinm_instrument_with_fees(symbol, None, None, ts_event, ts_init)\n}\n\npub(crate) fn parse_coinm_instrument_with_fees(\n    symbol: &BinanceFuturesCoinSymbol,\n    maker_fee: Option<Decimal>,\n    taker_fee: Option<Decimal>,\n    ts_event: UnixNanos,\n    ts_init: UnixNanos,\n) -> anyhow::Result<InstrumentAny> {\n    let is_perpetual = symbol.contract_type == CONTRACT_TYPE_PERPETUAL;\n    let is_delivery = matches!(\n        symbol.contract_type.as_str(),\n        CONTRACT_TYPE_CURRENT_QUARTER | CONTRACT_TYPE_NEXT_QUARTER\n    );\n\n    if !is_perpetual && !is_delivery {\n        anyhow::bail!(\n            \"Unsupported COIN-M contract type '{}' for symbol '{}'\",\n            symbol.contract_type,\n            symbol.symbol,\n        );\n    }\n\n    if symbol.contract_status != Some(BinanceContractStatus::Trading) {\n        anyhow::bail!(\n            \"Symbol '{}' is not trading (status: {:?})\",\n            symbol.symbol,\n            symbol.contract_status\n        );\n    }\n\n    let base_currency = get_currency(symbol.base_asset.as_str());\n    let quote_currency = get_currency(symbol.quote_asset.as_str());\n\n    // COIN-M contracts are settled in the base currency (inverse)","sourceCodeStart":447,"sourceCodeEnd":483,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/a4b06ed870971b5671d12754ea138a3ab99b1dec/crates/adapters/binance/src/common/parse.rs#L447-L483","documentation":"parse_coinm_instrument_with_fees accepts only three COIN-M contract types: PERPETUAL, CURRENT_QUARTER and NEXT_QUARTER (coin-margined contracts have no monthly delivery cycle). Any other contract_type string bails with the symbol and the unsupported value.","triggerScenarios":"Loading the COIN-M exchangeInfo when a symbol's contractType is outside {PERPETUAL, CURRENT_QUARTER, NEXT_QUARTER} — for example a new contract family the adapter version predates.","commonSituations":"Binance introduces a new COIN-M contract type; running an older adapter against the live venue; fixtures with hand-written contractType values copied from USD-M payloads (which include monthly types COIN-M does not support).","solutions":["Check the reported symbol's contractType in the live COIN-M exchangeInfo.","Update NautilusTrader to a release that recognizes the new type, or open an issue including the symbol and raw string.","Exclude the symbol from COIN-M instrument loading until supported.","In tests, use only PERPETUAL / CURRENT_QUARTER / NEXT_QUARTER for COIN-M fixtures."],"exampleFix":"// before (COIN-M fixture copied from USD-M)\n// \"contract_type\": \"CURRENT_MONTH\"     -> Unsupported COIN-M contract type\n// after\n// \"contract_type\": \"CURRENT_QUARTER\"   // supported on COIN-M","handlingStrategy":"try-catch","validationCode":"fn coinm_contract_type_supported(ct: &str) -> bool {\n    matches!(ct, \"PERPETUAL\" | \"CURRENT_QUARTER\" | \"NEXT_QUARTER\")\n}","typeGuard":"fn is_supported_coinm_contract_type(ct: &str) -> bool {\n    matches!(ct, \"PERPETUAL\" | \"CURRENT_QUARTER\" | \"NEXT_QUARTER\")\n}","tryCatchPattern":"match parse_coinm_instrument(&symbol, ts_event, ts_init) {\n    Ok(inst) => instruments.push(inst),\n    Err(e) if e.to_string().contains(\"Unsupported COIN-M contract type\") => {\n        tracing::warn!(symbol = %symbol.symbol, \"skipping: {e}\")\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Remember COIN-M supports only PERPETUAL and quarterly types; never copy monthly types from USD-M fixtures.","Filter COIN-M symbols by contract type before bulk instrument loads.","Track adapter updates when Binance announces new COIN-M contract families."],"tags":["binance","coinm-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"}