I'm trying to use the reqPositions() method but it doesn't have an event handler associated with it that it references in the API.
1 Answer
Interactive Brokers hosted a webinar on Nov. 10 2016 about Implement Algo Trading coded in Python using Interactive Brokers API. The presenter gave a good explanation on the applicability of IBridgePy, which is an open-sourced software used to connect to Interactive Brokers C++ API for execution of python codes in live markets.The webinar is posted at youtube. https://www.youtube.com/watch?v=hogXB07OJ_I. You don't need to call reqPositions() in IBridgePy. The positions are saved at context.portofolio.positions in pandas dataFrame. It is pretty easy to use them in other parts of the code.