8000 GitHub - hmate9/ibkr-docker: Run IBKR TWS in a Docker container
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

hmate9/ibkr-docker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IBKR TWS in Docker

Features

  • Fully containerized IBKR TWS instance + IBC Alpha in Docker, no external dependencies
  • TWS API access (automatically configured), proxied to localhost internally via nginx
  • Supports noVNC (a browser-based VNC client, proxied via Websockify)
  • Autorestarts TWS automatically (for example, due to daily logoff)

Getting Started

  • Install Docker
  • Clone this repo:
    • git clone https://github.com/extrange/ibkr-docker.git
    • cd ibkr-docker
  • Enter your credentials:
    • Create 2 files named username.txt and password.txt and input your IBKR username/password accordingly
  • Build the image:
    • docker-compose build
  • Start the container:
    • docker-compose up -d
    • TWS API is available on port 8888 by default
    • You can view the noVNC client at localhost:6080/vnc.html
  • To stop: docker-compose down

Paper vs Live Account

This container is setup to connect to a paper account. To switch to a live account:

  • Modify nginx.conf's proxy_pass accordingly:
    • Live Account: 7496
    • Paper Account: 7497
  • Modify app/config.ini:
    • TradingMode=live

You will have to restart the container after making these changes.

TWS Version Changes

TWS is updated frequently. Whenever the major version is incremented, you need to reconfigure the script.

Modify the value of TWS_MAJOR_VRSN in docker-compose.yml to the latest version number without periods/alphabets (i.e. 10.11e -> 1011)

Changes from the default config.ini

AcceptBidAskLastSizeDisplayUpdateNotification=accept
AcceptIncomingConnectionAction=accept
AcceptNonBrokerageAccountWarning=yes
TradingMode=paper

Known Issues

Todo

About

Run IBKR TWS in a Docker container

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 88.3%
  • Dockerfile 11.7%
0