{"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":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/binance/src/common/parse.rs","lineNumber":459,"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":441,"sourceCodeEnd":477,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/binance/src/common/parse.rs#L441-L477","documentation":"The COIN-M futures adapter supports only PERPETUAL and quarterly delivery contract types (CURRENT_QUARTER, NEXT_QUARTER). This error is thrown when a COIN-M symbol's `contractType` is neither, so the adapter cannot classify it as perpetual or delivery and cannot construct a ContractKind.","triggerScenarios":"parse_coinm_instrument / request_instruments_with_config encountering a COIN-M (dapi) symbol whose contract_type is not PERPETUAL, CURRENT_QUARTER, or NEXT_QUARTER — e.g. a new Binance COIN-M contract type or unexpected payload data.","commonSituations":"Binance adds a new COIN-M contract category; outdated adapter against a changed dapi exchangeInfo; synthetic test fixtures with an unusual contractType value.","solutions":["Inspect the symbol's contractType in GET /dapi/v1/exchangeInfo","Upgrade the binance adapter to a version that handles the new contract type","Filter out unsupported contract types before instrument loading","Extend the matches! check in parse_coinm_instrument_with_fees (crates/adapters/binance/src/common/parse.rs) to accept the new type"],"exampleFix":"// before\nlet is_delivery = matches!(symbol.contract_type.as_str(),\n    CONTRACT_TYPE_CURRENT_QUARTER | CONTRACT_TYPE_NEXT_QUARTER);\n// after\nlet is_delivery = matches!(symbol.contract_type.as_str(),\n    CONTRACT_TYPE_CURRENT_QUARTER | CONTRACT_TYPE_NEXT_QUARTER | CONTRACT_TYPE_CURRENT_QUARTER_DELIVERING);","handlingStrategy":"validation","validationCode":"fn is_supported_coinm_contract(ct: &str) -> bool {\n    matches!(ct, \"PERPETUAL\" | \"CURRENT_QUARTER\" | \"NEXT_QUARTER\")\n}\n// filter before parsing: symbols.retain(|s| is_supported_coinm_contract(&s.contract_type));","typeGuard":"fn is_perp_or_delivery(ct: &str) -> bool {\n    ct == \"PERPETUAL\" || ct == \"CURRENT_QUARTER\" || ct == \"NEXT_QUARTER\"\n}","tryCatchPattern":null,"preventionTips":["Check the /dapi/v1/exchangeInfo contractType values whenever Binance adds new COIN-M products","Pre-filter symbols by contract type before instrument loading","Keep the COIN-M adapter updated for new contract categories"],"tags":["binance","coinm-futures","instrument-parsing","unsupported-value","rust"],"backgroundTag":"unsupported-enum-value","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"}