This is a personal project which builds a simple framework to do algotrading on Interactive Brokers, using ibeam.
At the moment, this project does not perform any real transactions.
Feel free to check the notebooks for a showcase of the different features.
Run make
.
Create a file env.list
with the following contents:
## this file contains sensitive information!
# you can sign in to paper accounts as well
IBEAM_ACCOUNT=<your-IBKR-username>
IBEAM_PASSWORD=<your-IBKR-password>
MAX_FAILED_AUTH=1
MAX_IMMEDIATE_ATTEMPTS=1
IBEAM_INPUTS_DIR=/srv/inputs
Change <your-IBKR-username>
and <your-IBKR-password>
.
Download ibeam's docker image:
sudo docker pull voyz/ibeam
More info in the ibeam github page.
Generate the certificates first.
In one terminal start the ibeam server,
./start_ibeam.sh
In another terminal, execute:
. env/bin/activate
python3 main.py
You could instead try a small interactive program by running:
. env/bin/activate
python3 interactive.py
Save them under container_inputs
.
Tutorial: link
Or run generate-certificates.sh
(better option).