Building an algorithmic trading app
When using the IB API, there’s a lot of code that can be reused across different trading apps. Connecting to TWS, generating orders, and downloading data are done the same way despite the trading strategy. That’s why it’s a best practice to get the reusable code out of the way first. But before we can start building our algorithmic trading app, we need to install TWS and the IB API.
We’ll begin with three important topics when using the IB API:
- The first is the architecture of the IB API, which operates on an asynchronous model. In this model, operations are not executed in a linear, blocking manner. Instead, actions are initiated by requests, and responses to these requests are handled via callbacks.
- The second concept is inheritance, which is common across all computer programming languages. Inheritance is where a new child class acquires the properties and methods of another, parent, class. Our trading...