Closed fmair closed 2 years ago
The problem persists with the current CRAN-version 0.10-1 and TWS Build 10.15.1d, Apr 5, 2022 and comes from the way reqAccountUpdates
handles the messages (msg[12]
).
Just pushed a commit that should fix the issue. Please test and let me know! You can install the version on this branch by using:
remotes::install_github("joshuaulrich/IBrokers@30-reqAccountUpdates-portfolioValue")
Perfect. I just verified and the problem is fixed. Where was the bug?. Thank you Josh.
@Camilo-Mora Take a look at the commit diff and message: https://github.com/joshuaulrich/IBrokers/commit/970fca2299be92ae88ab1ac14fbd7c60fd26f6ae
Just pushed a commit that should fix the issue. Please test and let me know! You can install the version on this branch by using:
remotes::install_github("joshuaulrich/IBrokers@30-reqAccountUpdates-portfolioValue")
I can confirm that it is working again. Thanks for the fix!
Thanks for testing, @Camilo-Mora and @fmair!
Description
I have a position of 10 SPY shares in my paper trading portfolio. They were bought at 411.55 and now have a market value of 4173.40 (roughly). When I run
reqAccountUpdates
andtwsPortfolioValue
the results do not match. It seems like all entries are shifted by one row. (see entries below "portfolioValue" in the list below). Also the output fortwsPortfolioValue
is not correct.Edit: I just tested it and the functions show the expected behavior when using the current CRAN version IBrokers_0.9-12.
Expected behavior
reqAccountUpdates
should return the current positions of the portfolio including position sizes.Minimal, reproducible example
Session Info
I've loaded some private packages, hence I'd prefer not to share my session info. However, these don't interfere with IBrokers. I'm using Windows 10 x64 and running IB TWS Build 981.2z, Apr 13 2021.