First, I didn't know about this commission report function. That could work.
Second, I use ib_insync, not the IB API.
Using ib_insync, my script cycles through all my instruments and creates a whatIfOrder, stores each commission, and then outputs them all to a CSV file. In the IB API, it's...