utilmon / EasyIB

Python wrapper for Interactive Brokers Client Portal Web API
BSD 3-Clause "New" or "Revised" License
89 stars 24 forks source link

Paginated get_portfolio. Supporting portfolios with more than 100 positions #13

Open Phibog opened 1 year ago

Phibog commented 1 year ago

The current get_portfolio function calls the positions endpoint with fixed pageId=0 and will not return all positions if the portfolio contains more than 100 positions.

I added get_portfolio_paginated which goes through all pages until the response is empty. It also adds conId to the response objects.