Guide to Interactive Brokers API Code
Overview
These programs can help you make the first steps towards working with the Interactive Brokers API. Interactive Brokers API can be very challenging when first getting started and the formal Interactive Brokers documentation lacks some detailed explanation and implementations.
The code is based off a guide from The Quant Academy
If you'd like to learn quickly and receive the most detailed and accurate information, it's worth checking out.
Important Links
This repository is intended to supplement Medium articles:
- Article 1: Connection to TWS
- Article 2: Executing Trades (after connection)
- Misc Article: Quickstart Guide (quicker, less features, less explanation)
It is incredibly helpful to read the articles to gain an understanding of the fundamentals and rationale behind the code.
Run
The code should be placed in the folder with the API files (at the top level) then can be run with the command:
python3 ibProgram1.py
The TWS must be open and configured to accept incoming connection on the specified port.
Support
More articles and code will come with time, so give a follow on Github or Medium to receive the most up to date content :)
If you feel the code needs to be updated or have a suggestion on how to make the code better/more understandable, don't be afraid to reach out: