{"record":{"id":"02aec2dfd16e4324","repo":"nautechsystems/nautilus_trader","slug":"invalid-futures-kline-taker-buy-base-volume-e","errorCode":null,"errorMessage":"invalid Futures kline {} taker buy base volume: {e}","messagePattern":"invalid Futures kline (.+?) taker buy base volume: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/binance/src/futures/http/client.rs","lineNumber":3305,"sourceCode":"        .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!(\n                \"invalid Futures kline {} taker buy quote volume: {e}\",\n                kline.open_time\n            )\n        })?;\n    let count = u64::try_from(kline.num_trades).map_err(|_| {\n        anyhow::anyhow!(\n            \"invalid Futures kline {} negative trade count\",\n            kline.open_time\n        )","sourceCodeStart":3287,"sourceCodeEnd":3323,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/binance/src/futures/http/client.rs#L3287-L3323","documentation":"Raised when kline.taker_buy_base_volume cannot be parsed into a Decimal during Futures kline conversion. The value must be a valid decimal string; empty or malformed input aborts bar construction. The message includes the kline open_time for correlation with the raw payload.","triggerScenarios":"Futures kline REST response with taker_buy_base_volume missing, empty, or non-numeric; encountered in BinanceFuturesHttpClient kline parsing (client.rs:3305).","commonSituations":"Outdated API mocks/fixtures lacking newer kline fields, schema drift after Binance API updates, proxies or cache layers returning truncated JSON.","solutions":["Inspect the raw response for the reported open_time and verify taker_buy_base_volume is present as a numeric string.","Update mocks/fixtures to match the current Binance futures kline schema.","Confirm the adapter version supports the current API schema; upgrade the crate if Binance changed field formats.","Handle by skipping and logging the candle if the data source is known to be unreliable."],"exampleFix":"// before (fixture)\n\"takerBuyBaseVolume\": null\n// after\n\"takerBuyBaseVolume\": \"123.456\"","handlingStrategy":"validation","validationCode":"let _tbb: Decimal = kline.taker_buy_base_volume.parse()\n    .map_err(|_| format!(\"bad taker_buy_base_volume: {}\", kline.taker_buy_base_volume))?;","typeGuard":null,"tryCatchPattern":"match convert_kline(&kline) {\n    Ok(bar) => emit(bar),\n    Err(e) if e.to_string().contains(\"taker buy base volume\") => skip_and_log(e),\n    Err(e) => return Err(e.into()),\n}","preventionTips":["Ensure test mocks include all current kline fields.","Regenerate fixtures from live API responses when tests fail.","Check adapter version against Binance changelog."],"tags":["binance","futures","kline","decimal-parsing"],"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"}