nautechsystems/nautilus_trader · error
Unsupported COIN-M contract type
Error message
Unsupported COIN-M contract type '{}' for symbol '{}' What it means
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.
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
Example fix
// before
let is_delivery = matches!(symbol.contract_type.as_str(),
CONTRACT_TYPE_CURRENT_QUARTER | CONTRACT_TYPE_NEXT_QUARTER);
// after
let is_delivery = matches!(symbol.contract_type.as_str(),
CONTRACT_TYPE_CURRENT_QUARTER | CONTRACT_TYPE_NEXT_QUARTER | CONTRACT_TYPE_CURRENT_QUARTER_DELIVERING); Defensive patterns
Strategy: validation
Validate before calling
fn is_supported_coinm_contract(ct: &str) -> bool {
matches!(ct, "PERPETUAL" | "CURRENT_QUARTER" | "NEXT_QUARTER")
}
// filter before parsing: symbols.retain(|s| is_supported_coinm_contract(&s.contract_type)); Type guard
fn is_perp_or_delivery(ct: &str) -> bool {
ct == "PERPETUAL" || ct == "CURRENT_QUARTER" || ct == "NEXT_QUARTER"
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: Binance adds a new COIN-M contract category; outdated adapter against a changed dapi exchangeInfo; synthetic test fixtures with an unusual contractType value.
Related errors
- Unsupported underlying type
- Unsupported USD-M contract type
- Symbol ' ' is not trading (status: )
- Binance Futures custom data requires BINANCE venue…
- Binance Futures does not support
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/0b99a4343a08be27.
Report an issue: GitHub.
Appendix: source
Thrown at crates/adapters/binance/src/common/parse.rs:459
) -> anyhow::Result<InstrumentAny> {
parse_coinm_instrument_with_fees(symbol, None, None, ts_event, ts_init)
}
pub(crate) fn parse_coinm_instrument_with_fees(
symbol: &BinanceFuturesCoinSymbol,
maker_fee: Option<Decimal>,
taker_fee: Option<Decimal>,
ts_event: UnixNanos,
ts_init: UnixNanos,
) -> anyhow::Result<InstrumentAny> {
let is_perpetual = symbol.contract_type == CONTRACT_TYPE_PERPETUAL;
let is_delivery = matches!(
symbol.contract_type.as_str(),
CONTRACT_TYPE_CURRENT_QUARTER | CONTRACT_TYPE_NEXT_QUARTER
);
if !is_perpetual && !is_delivery {
anyhow::bail!(
"Unsupported COIN-M contract type '{}' for symbol '{}'",
symbol.contract_type,
symbol.symbol,
);
}
if symbol.contract_status != Some(BinanceContractStatus::Trading) {
anyhow::bail!(
"Symbol '{}' is not trading (status: {:?})",
symbol.symbol,
symbol.contract_status
);
}
let base_currency = get_currency(symbol.base_asset.as_str());
let quote_currency = get_currency(symbol.quote_asset.as_str());
// COIN-M contracts are settled in the base currency (inverse)View on GitHub (pinned to 18893faf8b)