Skip to content

Simple framework to do algotrading on Interactive Brokers

License

Notifications You must be signed in to change notification settings

Sager611/ibkr-algotrading

Repository files navigation

flake8 and pytests

IBKR Algotrading

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.

Install

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.

Run

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

Generating certificates

Save them under container_inputs.

Tutorial: link

Or run generate-certificates.sh (better option).

About

Simple framework to do algotrading on Interactive Brokers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published