{"record":{"id":"0e0323a9562cc0ba","repo":"nautechsystems/nautilus_trader","slug":"invalid-futures-kline-negative-trade-count","errorCode":null,"errorMessage":"invalid Futures kline {} negative trade count","messagePattern":"invalid Futures kline (.+?) negative trade count","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/binance/src/futures/http/client.rs","lineNumber":3249,"sourceCode":"        .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        )\n    })?;\n\n    Ok(BinanceBar::new(\n        bar_type,\n        open,\n        high,\n        low,\n        close,\n        volume,\n        quote_volume,\n        count,\n        taker_buy_base_volume,\n        taker_buy_quote_volume,\n        ts_event,\n        ts_init,","sourceCodeStart":3231,"sourceCodeEnd":3267,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/a4b06ed870971b5671d12754ea138a3ab99b1dec/crates/adapters/binance/src/futures/http/client.rs#L3231-L3267","documentation":"Error \"invalid Futures kline {} negative trade count\" thrown in nautechsystems/nautilus_trader.","triggerScenarios":"Thrown at crates/adapters/binance/src/futures/http/client.rs:3249 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a4b06ed870971b5671d12754ea138a3ab99b1dec","analyzedAt":"2026-08-16T22:54:50.089Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}