Public Repository

Last pushed: 4 months ago
Short Description
Runs Interactive Brokers IB Gateway using IBController
Full Description

This container is made up of the following two components:

The following environment variables are relevant for the IB Controller container:

  • TWS_USERNAME (default: edemo)
  • TWS_PASSWORD (default: demouser)

To run IB Gateway on a headless server (i.e. the Docker container) an xvfb virtual frame buffer is used.

Unfortunately only few settings of the IB Gateway can be managed via the IB Controller. All other settings have to be managed via the IB Gateway UI itself which is not visible on the Docker container.

This is especially cumbersome for the Read-Only API trading mode that the is used by the IB Gateway by default. If this mode is active placement of orders is not allowed.

To change any of the IB Gateway settings (e.g. Read-Only API trading mode) please execute the following steps:

  1. The IB Gateway container stores IB settings inside a Docker Volume. This volume can be mapped to a local directory as follows.

On Linux and Mac:

  volumes:
    - /var/lib/tws:/var/lib/tws

This will make IB Gateway settings available in the local directory /var/lib/tws

On Windows:

  volumes:
    - /c/Users/Administrator/Documents/tws:/var/lib/tws

This will make IB Gateway settings available in the local directory c:\Users\Administrator\Documents\tws

  1. Install and start IB Gateway on a regular workstation (Windows, Mac or Linux)

  2. Go to Configure / Settings / API / Settings

  3. Make necessary changes (e.g. deselect the Read-Only API check box) and click OK

  4. Close the IB Gateway

  5. Inside the IB Gateway installation folder there will be one or multiple sub-directories starting with have a name made up of 8-9 characters starting with a the letter d. Please select the directory with the latest time-stamp and makes sure it contains a file named ibg.xml

  6. Copy this directory (e.g darykqwzr) into the IB Gateway settings directory linked above:

  7. Copy the jts.ini file into the IB Gateway settings directory linked above:

  8. Start the IB Gateway Docker Container:

Note

The above steps will not work for the public edemo account which gets reset upon each startup.

Docker Pull Command
Owner
algotrader

Comments (2)
algotrader
a year ago

AlgoTrader is a commercial software, to purchase a license please visit http://www.algotrader.ch

alex12
a year ago

Hey. I tried to follow http://doc.algotrader.ch/html/Installation.html and install algotrader, ibgateway and mysql using docker-compose. But seems "algotrader" image doesn't exist(got error "ERROR: Error: image algotrader/algotrader:latest not found").