What is the function to return the cash balance of an account?

394 views Asked by At

I am currently using the ibkr api with the ib_insync package and I was wondering how one would return the cash balance in an account. I've tried accountSummary and accountValues but can't seem to find it.

1

There are 1 answers

0
Crispy Holiday On

If you mean this balance field

enter image description here

You could fetch it with iterating the account values (they are automatically synced with IB)

[x.value for x in self._ib.accountValues() if x.tag == "CashBalance" and x.currency == "USD"][0]