-1

This question is related to IBroker package.

There is a difference between Virtual FX Position and Real FX Position.

One obtains the Virtual positions by twsPortfolioValue or nested in accDetails

library(ibrokers)

tws <- twsConnect()
accDetails <- reqAccountUpdates(tws)
twsPortfolioValue(accDetails)  

Is there a way to obtain the Real FX portfolio, or the net currency exposures?

Maximilian
  • 4,177
  • 7
  • 46
  • 85

1 Answers1

2

You get the cash balance in each currency you have. This is python but I'm sure R has some way to print all the fields in accDetails, just look.

<updateAccountValue key=TotalCashBalance, value=1281337, currency=CAD, accountName=DU000000>
<updateAccountValue key=TotalCashBalance, value=-310, currency=USD, accountName=DU000000>
brian
  • 10,619
  • 4
  • 21
  • 79