As you know, the Python examples for Interactive Brokers API. I have provided only show closing price with open high and low fo OHLC. I have not seen any Python example that shows how to download the full OHLC. If you want this, you may need to go with the Java options I have shown on this site. Just like this:
If you are looking for portfolio optimization, all you need is closing price. I plan to use a package like this for portfolio optimization. https://pyportfolioopt.readthedocs.io/en/latest/UserGuide.html
If that is the case, I plan to use Python for this only so need for Java yet. It just depends on what you are doing in your trading.
Join my email newsletter to learn how I proceed with Interactive Brokers https://quantlabs.net/contact/