Requesting Portfolio Data
Requesting portfolio data requires the use of the reqAccountUpdates() function which returns data via the updateAccountValue(), updatePortfolio(), and the updateAccountTime() callback functions.
The accountDownloadEnd() callback function runs when all account information has been returned.
Comprehensive example code for C++, C#, Java, Python and Visual Basic can be found in the /samples directory of the downloaded TWS API file.
Python

