I'm just starting to use the IB API in python. I'm able to retrieve all the desired results I want. However, one big problem arise to me. I don't fully understand how the linkage between the EClient
class and a particular callback is made within the EWrapper
class.
As of now I understand the workflow like this (high level):
- An EClient instance makes a call to IB Gateway.
- IB Gateway itself reach out to the IB Data centers to fetch data
- Data comes back to IB Gateway
- IB Gateway calls the callback, which is the interface
As far as I understand, IB Gateway triggers the correct Callback function. What I don't see from the documentation / source code is the connection between a EClient
method and a the interface (callback) I override in my EWrapper
class. When I trigger a specific method in step 1 above. How does IB Gateway know, which callback to run? Is this specified somewhere?