{"record":{"id":"c83f8ea370112c54","repo":"nautechsystems/nautilus_trader","slug":"unsupported-instrument-type-for-fill-report","errorCode":null,"errorMessage":"Unsupported instrument type for fill report","messagePattern":"Unsupported instrument type for fill report","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/kraken/src/common/parse.rs","lineNumber":838,"sourceCode":") -> anyhow::Result<FillReport> {\n    let instrument_id = instrument.id();\n    let venue_order_id = VenueOrderId::new(&trade.ordertxid);\n    let trade_id_obj = TradeId::new(trade_id);\n\n    let order_side = trade.trade_type.into();\n\n    let last_qty =\n        parse_quantity_with_precision(&trade.vol, instrument.size_precision(), \"trade.vol\")?;\n\n    let last_px =\n        parse_price_with_precision(&trade.price, instrument.price_precision(), \"trade.price\")?;\n\n    let fee_decimal = parse_decimal(&trade.fee)?;\n    let quote_currency = match instrument {\n        InstrumentAny::CurrencyPair(pair) => pair.quote_currency,\n        InstrumentAny::CryptoPerpetual(perp) => perp.quote_currency,\n        InstrumentAny::TokenizedAsset(ta) => ta.quote_currency,\n        _ => anyhow::bail!(\"Unsupported instrument type for fill report\"),\n    };\n\n    let commission = Money::from_decimal(fee_decimal, quote_currency)?;\n\n    let liquidity_side = match trade.maker {\n        Some(true) => LiquiditySide::Maker,\n        Some(false) => LiquiditySide::Taker,\n        None => LiquiditySide::NoLiquiditySide,\n    };\n\n    let ts_event = parse_millis_timestamp(trade.time, \"trade.time\")?;\n\n    Ok(FillReport {\n        account_id,\n        instrument_id,\n        venue_order_id,\n        trade_id: trade_id_obj,\n        order_side,","sourceCodeStart":820,"sourceCodeEnd":856,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/kraken/src/common/parse.rs#L820-L856","documentation":"To build a fill report's commission Money, the quote currency is taken from the parsed instrument. Kraken Spot fill report parsing only supports CurrencyPair, CryptoPerpetual, and TokenizedAsset instruments; any other InstrumentAny variant causes this bail.","triggerScenarios":"parse_fill_report receives an execution/trade whose instrument resolves to an unsupported InstrumentAny variant (anything other than CurrencyPair, CryptoPerpetual, or TokenizedAsset), so quote_currency cannot be extracted.","commonSituations":"Futures/options instruments leaking into the Spot fill-report path; instruments built incorrectly from the catalog; a newly added instrument kind not yet handled by the adapter.","solutions":["Check the instrument_id of the fill and ensure it was parsed by the correct adapter path (Spot vs Futures).","Add or match the missing instrument variant in the catalog before requesting fill reports.","Extend parse_fill_report's match to support the needed instrument type if it is legitimately tradeable on Kraken Spot."],"exampleFix":"// before\nInstrumentAny::TokenizedAsset(ta) => ta.quote_currency,\n_ => anyhow::bail!(\"Unsupported instrument type for fill report\"),\n// after (if options support is needed)\nInstrumentAny::CryptoOption(opt) => opt.quote_currency,\n_ => anyhow::bail!(\"Unsupported instrument type for fill report\"),","handlingStrategy":"type-guard","validationCode":"// Before requesting fill reports, verify the instrument kind is supported\nlet supported = matches!(instrument,\n    InstrumentAny::CurrencyPair(_) | InstrumentAny::CryptoPerpetual(_) | InstrumentAny::TokenizedAsset(_));\nif !supported { eprintln!(\"{}: unsupported for spot fill reports\", instrument.id()); }","typeGuard":"fn supports_spot_fill_report(inst: &InstrumentAny) -> bool {\n    matches!(inst,\n        InstrumentAny::CurrencyPair(_) | InstrumentAny::CryptoPerpetual(_) | InstrumentAny::TokenizedAsset(_))\n}","tryCatchPattern":"match parse_fill_report(&trade, instrument) {\n    Ok(r) => push(r),\n    Err(e) if e.to_string().contains(\"Unsupported instrument type\") => log::warn!(\"skipping fill for {}\", instrument.id()),\n    Err(e) => return Err(e),\n}","preventionTips":["Register Spot fills only for instruments parsed by the Spot instrument parser.","Separate Spot and Futures caches/catalogs to avoid instrument-kind mixing.","Check instrument.id() prefixes (spot vs futures symbols) before report requests."],"tags":["kraken","fill-report","instrument-type","unsupported"],"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-14T05:17:10.506Z"}