{"record":{"id":"818b141b0365a4fb","repo":"nautechsystems/nautilus_trader","slug":"unsupported-underlying-type-underlying-type-fo","errorCode":null,"errorMessage":"Unsupported underlying type '{underlying_type}' for TRADIFI_PERPETUAL symbol '{}'","messagePattern":"Unsupported underlying type '(.+?)' for TRADIFI_PERPETUAL symbol '(.+?)'","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/binance/src/common/parse.rs","lineNumber":126,"sourceCode":"        Err(e) => {\n            log::warn!(\"{e}; using initialization timestamp\");\n            ts_init\n        }\n    }\n}\n\nfn parse_tradifi_asset_class(symbol: &BinanceFuturesUsdSymbol) -> anyhow::Result<AssetClass> {\n    let underlying_type = symbol.underlying_type.as_deref().with_context(|| {\n        format!(\n            \"Missing underlying type for TRADIFI_PERPETUAL symbol '{}'\",\n            symbol.symbol\n        )\n    })?;\n\n    match underlying_type {\n        \"EQUITY\" | \"KR_EQUITY\" | \"HK_EQUITY\" | \"PREMARKET\" => Ok(AssetClass::Equity),\n        \"COMMODITY\" => Ok(AssetClass::Commodity),\n        _ => anyhow::bail!(\n            \"Unsupported underlying type '{underlying_type}' for TRADIFI_PERPETUAL symbol '{}'\",\n            symbol.symbol\n        ),\n    }\n}\n\n/// Returns a currency from the internal map or creates a new crypto currency.\npub fn get_currency(code: &str) -> Currency {\n    Currency::get_or_create_crypto(code)\n}\n\n/// Extracts filter values from Binance symbol filters array.\nfn get_filter<'a>(filters: &'a [Value], filter_type: &str) -> Option<&'a Value> {\n    filters.iter().find(|f| {\n        f.get(\"filterType\")\n            .and_then(|v| v.as_str())\n            .is_some_and(|t| t == filter_type)\n    })","sourceCodeStart":108,"sourceCodeEnd":144,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/a4b06ed870971b5671d12754ea138a3ab99b1dec/crates/adapters/binance/src/common/parse.rs#L108-L144","documentation":"Binance TRADIFI_PERPETUAL instruments (perpetuals on tokenized traditional-finance underlyings) get their AssetClass from exchangeInfo's underlyingType. Only EQUITY, KR_EQUITY, HK_EQUITY, PREMARKET and COMMODITY are mapped; parse_tradifi_asset_class bails on any other underlyingType string.","triggerScenarios":"exchangeInfo returns a TRADIFI_PERPETUAL symbol with an underlyingType outside the mapped set - e.g. Binance launches a new class (FX, rates, metals) after your adapter version was cut.","commonSituations":"Running an older adapter against a live exchange that has listed new TradFi product types; instrument loading suddenly failing for one new symbol after an exchange rollout.","solutions":["Update the Binance adapter to a release that maps the new underlying type","Until updated, exclude the symbol from instrument loading via the filter config","Contribute a mapping for the new underlyingType in parse_tradifi_asset_class (crates/adapters/binance/src/common/parse.rs)"],"exampleFix":"// before\nmatch underlying_type {\n    \"EQUITY\" | \"KR_EQUITY\" | \"HK_EQUITY\" | \"PREMARKET\" => Ok(AssetClass::Equity),\n    \"COMMODITY\" => Ok(AssetClass::Commodity),\n    _ => anyhow::bail!(...),\n}\n\n// after: map the newly listed class\n    \"EQUITY\" | \"KR_EQUITY\" | \"HK_EQUITY\" | \"PREMARKET\" => Ok(AssetClass::Equity),\n    \"COMMODITY\" | \"METAL\" => Ok(AssetClass::Commodity),","handlingStrategy":"try-catch","validationCode":"const MAPPED_UNDERLYING: &[&str] = &[\"EQUITY\", \"KR_EQUITY\", \"HK_EQUITY\", \"PREMARKET\", \"COMMODITY\"];\nfn underlying_type_supported(t: &str) -> bool {\n    MAPPED_UNDERLYING.contains(&t)\n}","typeGuard":"fn is_supported_tradifi_underlying(underlying_type: &str) -> bool {\n    matches!(underlying_type, \"EQUITY\" | \"KR_EQUITY\" | \"HK_EQUITY\" | \"PREMARKET\" | \"COMMODITY\")\n}","tryCatchPattern":"for symbol in symbols {\n    if let Err(e) = parse_symbol(&symbol) {\n        if e.to_string().contains(\"Unsupported underlying type\") {\n            log::warn!(\"skipping unmapped TradFi symbol {}: {e}\", symbol.symbol);\n            continue;\n        }\n        return Err(e);\n    }\n}","preventionTips":["Treat new exchange metadata as expected drift: skip-with-warning on unmapped TradFi underlyings instead of failing instrument loads","Pin adapter versions and check the exchange's new-listings notes before upgrading trading infrastructure","Add the known underlying-type allow-list to your monitoring so new values raise an alert"],"tags":["binance","futures","tradifi","instrument-parsing","asset-class","exchange-metadata"],"backgroundTag":"unsupported-exchange-metadata","analyzedSha":"a4b06ed870971b5671d12754ea138a3ab99b1dec","analyzedAt":"2026-08-16T22:54:50.089Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}