Is the API updatePortfolioEx not very timely reliable?

My application uses the event updatePortfolioEx after call to IBApi.EClient.reqAccountUpdates periodically to fetch the portfolio changes. However I found it not very timely reliable, especially after a few hours running since TWS launched. Quite often my application won't get updating after the order was executed for tens of minutes. Sometimes I manually click the "reconnect all farms" button in the "connection" window would help to wake up the API in a short period before it goes to sleep again. Is anyone here seeing the same thing? Any suggestions to fix / walk around? Thanks.
 
For reqAccountUpdates you should listen to:
- UpdateAccountValue: Will give you one update per field in your account.
- UpdatePortfolio: Will give you positions per contract
 
reqAccountUpdates isn't called periodically. You call it once with a boolean. Afterwards you cancel it with a boolean. Sounds like you keep making unnecessary requests until IB stops responding to duplicate ones.
 
Back
Top