{"record":{"id":"b90564dd8337b5c7","repo":"nautechsystems/nautilus_trader","slug":"invalid-futures-kline-quote-volume-e","errorCode":null,"errorMessage":"invalid Futures kline {} quote volume: {e}","messagePattern":"invalid Futures kline (.+?) quote volume: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/binance/src/futures/http/client.rs","lineNumber":3296,"sourceCode":"    price_precision: u8,\n    size_precision: u8,\n    ts_init: UnixNanos,\n) -> anyhow::Result<BinanceBar> {\n    let open = parse_required_price_at_precision(&kline.open, price_precision, \"kline.open\")\n        .map_err(|e| anyhow::anyhow!(\"invalid Futures kline {}: {e}\", kline.open_time))?;\n    let high = parse_required_price_at_precision(&kline.high, price_precision, \"kline.high\")\n        .map_err(|e| anyhow::anyhow!(\"invalid Futures kline {}: {e}\", kline.open_time))?;\n    let low = parse_required_price_at_precision(&kline.low, price_precision, \"kline.low\")\n        .map_err(|e| anyhow::anyhow!(\"invalid Futures kline {}: {e}\", kline.open_time))?;\n    let close = parse_required_price_at_precision(&kline.close, price_precision, \"kline.close\")\n        .map_err(|e| anyhow::anyhow!(\"invalid Futures kline {}: {e}\", kline.open_time))?;\n    let volume =\n        parse_required_quantity_at_precision(&kline.volume, size_precision, \"kline.volume\")\n            .map_err(|e| anyhow::anyhow!(\"invalid Futures kline {}: {e}\", kline.open_time))?;\n    let ts_event = parse_millis(kline.close_time, \"Futures kline close time\")?;\n\n    let quote_volume = kline.quote_volume.parse::<Decimal>().map_err(|e| {\n        anyhow::anyhow!(\n            \"invalid Futures kline {} quote volume: {e}\",\n            kline.open_time\n        )\n    })?;\n    let taker_buy_base_volume = kline\n        .taker_buy_base_volume\n        .parse::<Decimal>()\n        .map_err(|e| {\n            anyhow::anyhow!(\n                \"invalid Futures kline {} taker buy base volume: {e}\",\n                kline.open_time\n            )\n        })?;\n    let taker_buy_quote_volume = kline\n        .taker_buy_quote_volume\n        .parse::<Decimal>()\n        .map_err(|e| {\n            anyhow::anyhow!(","sourceCodeStart":3278,"sourceCodeEnd":3314,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/binance/src/futures/http/client.rs#L3278-L3314","documentation":"Raised when kline.quote_volume cannot be parsed into a Decimal while building a Futures bar. Unlike OHLCV fields this is a direct Decimal parse without precision clamping, so it fails only when the string is empty, non-numeric, or otherwise not a valid decimal literal. The kline open_time is included to locate the offending candle.","triggerScenarios":"Binance futures kline response where quote_volume is absent, empty (\"\"), or contains an unexpected token instead of a decimal number string; triggered during any futures kline -> BinanceBar conversion.","commonSituations":"API schema changes or a broken/misconfigured endpoint (e.g. pointing the client at a mock or an older API version that omits quote_volume), corrupted response bodies from proxies, or tests feeding hand-written fixtures with missing fields.","solutions":["Dump the raw kline JSON for the reported open_time and check the quote_volume field.","Ensure the client targets the current fapi.binance.com futures endpoint and schema.","Fix test fixtures/mocks to include quote_volume as a numeric string.","If data genuinely missing, skip that candle and log rather than treating it as a hard failure in ingestion loops."],"exampleFix":"// before (fixture)\n{\"openTime\": 1700000000000, \"open\": \"1.0\", \"close\": \"1.1\"}\n// after\n{\"openTime\": 1700000000000, \"open\": \"1.0\", \"close\": \"1.1\", \"quoteVolume\": \"1234.56\", \"volume\": \"1000\", ...}","handlingStrategy":"validation","validationCode":"if kline.quote_volume.is_empty() { return Err(\"quote_volume missing\"); }\nlet _qv: Decimal = kline.quote_volume.parse().map_err(|_| format!(\"bad quote_volume: {}\", kline.quote_volume))?;","typeGuard":null,"tryCatchPattern":"match convert_kline(&kline) {\n    Ok(bar) => emit(bar),\n    Err(e) if e.to_string().contains(\"quote volume\") => log::warn!(\"bad quote_volume, skipping: {e}\"),\n    Err(e) => return Err(e.into()),\n}","preventionTips":["Validate fixtures against the full Binance kline schema.","Keep the adapter updated for API schema changes.","Avoid proxies/caches that may truncate response bodies."],"tags":["binance","futures","kline","decimal-parsing","quote-volume"],"backgroundTag":"invalid-argument-format","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"}