Lean.Brokerages.InteractiveBrokers icon indicating copy to clipboard operation
Lean.Brokerages.InteractiveBrokers copied to clipboard

Incorrect AccountValueKeys for CashBalance

Open AlexCatarino opened this issue 7 months ago • 0 comments

The value for AccountValueKeys.CashBalance is "CashBalance", where it should be "TotalCashBalance".

On 2025-04-28, we got the following values: 2025-04-28T02:20:02.8549827Z TRACE:: HandleUpdateAccountValue(): Key:NetLiquidation Value:1867970.59 Currency:USD AccountName:U8_8_8_8 2025-04-28T02:20:02.8684315Z TRACE:: HandleUpdateAccountValue(): Key:CashBalance Value:2689095.823 Currency:USD AccountName:U8_8_8_8 2025-04-28T02:20:02.8733001Z TRACE:: HandleUpdateAccountValue(): Key:TotalCashBalance Value:1863414.543 Currency:USD AccountName:U8_8_8_8

On 2025-04-30, we got these: 2025-04-29T22:05:10.0712781Z TRACE:: HandleUpdateAccountValue(): Key:NetLiquidation Value:1890016.51 Currency:USD AccountName:U8_8_8_8 2025-04-29T22:02:10.0802069Z TRACE:: HandleUpdateAccountValue(): Key:CashBalance Value:1883388.8137 Currency:USD AccountName:U8_8_8_8 2025-04-29T22:02:10.0845686Z TRACE:: HandleUpdateAccountValue(): Key:TotalCashBalance Value:1883388.8137 Currency:USD AccountName:U8_8_8_8

suggesting that "CashBalance" doesn't reflect the correct value and includes other funds 2689095.823 since "NetLiquidation" is the total portfolio value.

AlexCatarino avatar Apr 30 '25 14:04 AlexCatarino