Giter Club home page Giter Club logo

ib-gateway-docker's Introduction

Interactive Brokers Gateway Docker (ABORTED!)

Publish Docker

Aborted Project!!

I have got banned from IB (stoqey/ib#137) and have no more need for this project, therefore it has been aborted.
There won't be any more updates, if you use it currently, fork it and continue maintance on your own

Checkout https://github.com/UnusualAlpha/ib-gateway-docker for an updated version.


What is it?

A docker image to run the Interactive Brokers Gateway Application without any human interaction on a docker container.

It includes:

  • IB Gateway Application
  • IBC Application - to control the IB Gateway Application (simulates user input).
  • Xvfb - a X11 virtual framebuffer to run IB Gateway Application without graphics hardware.
  • x11vnc - a VNC server that allows to interact with the IB Gateway user interface (optional, for development / maintenance purpose).
  • socat a tool to accept TCP connection from non-localhost and relay it to IB Gateway from localhost (IB Gateway restricts connections to 127.0.0.1 by default).

How to use?

Create a docker-compose.yml (or include ib-gateway services on your existing one)

version: "3.4"

services:
  ib-gateway:
    image: waytrade/ib-gateway:981.3j
    restart: always
    environment:
      TWS_USERID: ${TWS_USERID}
      TWS_PASSWORD: ${TWS_PASSWORD}
      TRADING_MODE: ${TRADING_MODE:-live}
      VNC_SERVER_PASSWORD: ${VNC_SERVER_PASSWORD:-}
    ports:
      - "127.0.0.1:4001:4001"
      - "127.0.0.1:4002:4002"
      - "127.0.0.1:5900:5900"

Create an .env on root directory or set the following environment variables:

Variable Description Default
TWS_USERID The TWS user name.
TWS_PASSWORD The TWS password.
TRADING_MODE 'live' or 'paper' paper
VNC_SERVER_PASSWORD VNC server password. If not defined, no VNC server will be started. not defined (VNC disabled)

Example .env file:

TWS_USERID=myTwsAccountName
TWS_PASSWORD=myTwsPassword
TRADING_MODE=paper
VNC_SERVER_PASSWORD=myVncPassword

Run:

$ docker-compose up

After image is downloaded, container is started + 30s, the following ports will be ready for usage on the container and docker host:

Port Description
4001 TWS API port for live accounts.
4002 TWS API port for paper accounts.
5900 When VNC_SERVER_PASSWORD was defined, the VNC server port.

Note that with the above docker-compose.yml, ports are only exposed to the docker host (127.0.0.1), but not to the network of the host. To expose it to the whole network change the port mappings on accordingly (remove the '127.0.0.1:'). Attention: See Leaving localhost

How build locally

  1. Clone this repo
git clone https://github.com/waytrade/ib-gateway-docker
  1. Change docker file to use your local IB Gateway installer file, instead of loading it from this project releases: Open Dockerfile on editor and replace this line:
RUN curl -sSL https://github.com/waytrade/ib-gateway-docker/releases/download/v${IB_GATEWAY_VERSION}/ibgateway-${IB_GATEWAY_VERSION}-standalone-linux-x64.sh --output ibgateway-${IB_GATEWAY_VERSION}-standalone-linux-x64.sh`

with

COPY ibgateway-${IB_GATEWAY_VERSION}-standalone-linux-x64.sh 
  1. Remove RUN sha256sum --check ./checksums/ibgateway-${IB_GATEWAY_VERSION}-standalone-linux-x64.sh.sha256 from Dockerfile (unless you want to keep checksum-check)
  2. Donwload IB Gateway and name the file ibgateway-{IB_GATEWAY_VERSION}-standalone-linux-x64.sh, where {IB_GATEWAY_VERSION} must match the version as configured on Dockerfile (first line)
  3. Donwload IBC and name the file IBCLinux-{IBC_VERSION}.zip , where {IBC_VERSION} must match the version as configured on Dockerfile (second line)
  4. Build and run: docker-compose up --build

Versions and Tags

The docker image version is similar to the IB Gateway version on the image.

See Supported tags

IB Gateway installation files

Note that the Dockerfile does not download IB Gateway installer files from IB homepage but from the releases of this project.

This is because it shall be possible to (re-)build the image, targeting a specific Gateway version, but IB does only provide download links for the 'latest' or 'stable' version (there is no 'old version' download archive).
The installer files stored on releases have been downloaded from IB homepage and renamed to reflect the version.
If you want to download Gateway installer from IB homepage directly, or use your local installation file, change this line on Dockerfile RUN curl -sSL https://github.com/waytrade/ib-gateway-docker/releases/download/v${IB_GATEWAY_VERSION}/ibgateway-${IB_GATEWAY_VERSION}-standalone-linux-x64.sh --output ibgateway-${IB_GATEWAY_VERSION}-standalone-linux-x64.sh to download (or copy) the file from the source you prefer.
Example: change to RUN curl -sSL https://download2.interactivebrokers.com/installers/ibgateway/stable-standalone/ibgateway-stable-standalone-linux-x64.sh --output ibgateway-${IB_GATEWAY_VERSION}-standalone-linux-x64.sh for using current stable version from IB homepage.

Customizing the image

The image can be customized by overwriting the default configuration files with custom ones.

Apps and config file locations:

App Folder Config file Default
IB Gateway /root/Jts /root/Jts/jts.ini jts.ini
IBC /root/ibc /root/ibc/config.ini config.ini

To start the IB Gateway run /root/scripts/run.sh from your Dockerfile or run-script.

Security Considerations

Leaving localhost

The IB API protocol is based on an unencrypted, unauthenticated, raw TCP socket connection between a client and the IB Gateway. If the port to IB API is open to the network, every device on it (including potential rogue devices) can access your IB account via the IB Gateway.
Because of this, the default docker-compose.yml only exposes the IB API port to the localhost on the docker host, but not to the whole network.
If you want to connect to IB Gateway from a remote device, consider adding an additional layer of security (e.g. TLS/SSL or SSH tunnel) to protect the 'plain text' TCP sockets against unauthorized access or manipulation.

Credentials

This image does not contain nor store any user credentials.
They are provided as environment variable during the container startup and the host is responsible to properly protect it (e.g. use Kubernetes Secrets or similar).

Supported Tags

Tag IB Gateway Version IB Gateway Release Channel IBC Version
1012.2i 10.12.2i latest 3.12.0
981.3j 981.3j stable 3.12.0
1012.2c 10.12.2c latest 3.12.0
981.3g 981.3g stable 3.12.0
1010 10.10 latest 3.10.0
981 981c stable 3.10.0

ib-gateway-docker's People

Contributors

bluphy avatar electic avatar fujiapple852 avatar mfrener avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ib-gateway-docker's Issues

Connection refused when connecting to IBKR using IB Gateway Container

Hello,

I tried to launch a sample to connect to IBKR using IB Gateway Container but I receive this error :

API connection failed: TimeoutError()
Traceback (most recent call last):
File "C:\Python39\lib\asyncio\tasks.py", line 688, in _wrap_awaitable
return (yield from awaitable.await())
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Python39\lib\asyncio\tasks.py", line 490, in wait_for
return fut.result()
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

python.exe app.py
============

Traceback (most recent call last):
File "C:\Users\KN6353\source\repos\stock-market\app.py", line 5, in
ib.connect('127.0.0.1', 4002, clientId=1)
File "C:\Users\KN6353\source\repos\stock-market.venv\lib\site-packages\ib_insync\ib.py", line 279, in connect
return self._run(self.connectAsync(
File "C:\Users\KN6353\source\repos\stock-market.venv\lib\site-packages\ib_insync\ib.py", line 318, in _run
return util.run(*awaitables, timeout=self.RequestTimeout)
File "C:\Users\KN6353\source\repos\stock-market.venv\lib\site-packages\ib_insync\util.py", line 341, in run
result = loop.run_until_complete(task)
File "C:\Python39\lib\asyncio\base_events.py", line 647, in run_until_complete
return future.result()
File "C:\Users\KN6353\source\repos\stock-market.venv\lib\site-packages\ib_insync\ib.py", line 1748, in connectAsync
await self.client.connectAsync(host, port, clientId, timeout)
File "C:\Users\KN6353\source\repos\stock-market.venv\lib\site-packages\ib_insync\client.py", line 217, in connectAsync
await asyncio.wait_for(self.apiStart, timeout)
File "C:\Python39\lib\asyncio\tasks.py", line 492, in wait_for
raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError

Logs inside IB Gateway Container
======================

ib-gateway-1 | 2023/09/18 06:41:00 socat[167] E connect(5, AF=2 127.0.0.1:4000, 16): Connection refused

App.py
=====

from ib_insync import *

ib = IB()
ib.connect('127.0.0.1', 4002, clientId=1)

contract = Forex('EURUSD')
bars = ib.reqHistoricalData(
contract, endDateTime='', durationStr='30 D',
barSizeSetting='1 hour', whatToShow='MIDPOINT', useRTH=True)

df = util.df(bars)
print(df)


Thanks for your help !

exec /root/scripts/run.sh: no such file or directory

I can't run the docker container
and can't figure why it happen, cause container have a /scripts/run.sh file inside it

docker-compose up
ib-gateway-docker_ib-gateway_1 is up-to-date
Attaching to ib-gateway-docker_ib-gateway_1
ib-gateway_1 | exec /root/scripts/run.sh: no such file or directory

ExitAfterSecondFactorAuthenticationTimeout is set to 'no'

Hi,

I have trouble setting ExitAfterSecondFactorAuthenticationTimeout to yes via config.ini.

I have updated the default config.ini before running
docker build .
It seems like my config file is copied correctly

Step 20/36 : COPY ./config/ibc/config.ini /root/ibc/config.ini
 ---> 0d26351e3a90

and
docker-compose up

However the output still says
ib-gateway_1 | ExitAfterSecondFactorAuthenticationTimeout=no

Am I missing something I need to do in order to activate my changed config? Or is this a bug?

Thanks
Matandi

Is there a fork that is now 'official' and being maintained

That's a real shame to hear about your issues with IB. Sorry to hear that.

Great package here. Are one of the forks now being maintained as the new 'official' version of this that we can be pointed to, potentially also in the Readme?

Thanks a lot if so.
Matt

Different behavior from Dockerhub image vs building

Hello,
When I pull the docker image from waytrade/ib-gateway:981.3j on dockerhub in my docker-compose file, (edit: things work sometimes, but sometimes it fails).

However, when I build the image with the same ib gateway version locally, I get:

ERROR ib_insync.client:client.py:221 API connection failed: ConnectionRefusedError(111, "Connect call failed ('172.31.0.2', 4002)")

Are there settings that I should be changing from the default to built the exact same image that exists on dockerhub?'

I'm not sure which settings that would need to be changed or if this is a problem with IBC version 3.12.0

Thanks

Can not connect ib-gateway

I tried to run ib-gateway on my windows docker engine.
I think tws is running ok.
But I can't connect ib-gateway(localhost:4001) from windows to docker engine.
What option can I open the network?

  tws:
    image: waytrade/ib-gateway:1012.2c
    restart: always
    env_file: ./.env
    ports:
      - "4001:4001"
      - "4002:4002"
      - "5900:5900"
Forking :::4000 onto 0.0.0.0:4001
2022-01-20T18:20:42.725975500Z 
2022-01-20T18:20:51.272591600Z 2022/01/20 18:20:51 socat[192] E connect(5, AF=2 127.0.0.1:4000, 16): Connection refused

disconnection in same time.

Hi.
I am using image: waytrade/ib-gateway:981.3g
I got disconnection every day. Is it a kind of configuration? Can I set disconnection(?) at different time?

2022-02-24	18:46:12 NOTIFY_STORE| ConnectionClosed <connectionClosed>
2022-02-23	18:47:01 NOTIFY_STORE| ConnectionClosed <connectionClosed>
2022-02-22	18:46:12 NOTIFY_STORE| ConnectionClosed <connectionClosed>
2022-02-21	18:46:12 NOTIFY_STORE| ConnectionClosed <connectionClosed>
2022-02-20	18:46:12 NOTIFY_STORE| ConnectionClosed <connectionClosed>
2022-02-17	18:46:12 NOTIFY_STORE| ConnectionClosed <connectionClosed>
2022-02-16	18:46:12 NOTIFY_STORE| ConnectionClosed <connectionClosed>
2022-02-15	18:46:13 NOTIFY_STORE| ConnectionClosed <connectionClosed>
2022-02-14	18:45:10 NOTIFY_STORE| ConnectionClosed <connectionClosed>
2022-02-13	18:45:11 NOTIFY_STORE| ConnectionClosed <connectionClosed>
2022-02-11	18:45:09 NOTIFY_STORE| ConnectionClosed <connectionClosed>
2022-02-10	18:45:10 NOTIFY_STORE| ConnectionClosed <connectionClosed>

Failed to build Docker image

  • Issue: docker build command fails

  • Command trace:

cd ib-gateway-docker/
docker-compose build

  • Error trace:
Building ib-gateway

[+] Building 41.8s (11/27)
 => [internal] load build definition from Dockerfile                                                                                                   0.1s
 => => transferring dockerfile: 2.24kB                                                                                                                 0.0s
 => [internal] load .dockerignore                                                                                                                      0.1s
 => => transferring context: 2B                                                                                                                        0.0s
 => [internal] load metadata for docker.io/library/ubuntu:20.04                                                                                       16.7s
 => [setup  1/17] FROM docker.io/library/ubuntu:20.04@sha256:626ffe58f6e7566e00254b638eb7e0f3b11d4da9675088f4781a50ae288f3322                          0.0s
 => [internal] load build context                                                                                                                      0.2s
 => => transferring context: 1.44kB                                                                                                                    0.2s
 => CACHED [setup  2/17] RUN apt-get update -y                                                                                                         0.0s
 => CACHED [setup  3/17] RUN apt-get install --no-install-recommends --yes   curl   ca-certificates   unzip                                            0.0s
 => CACHED [setup  4/17] WORKDIR /tmp/setup                                                                                                            0.0s
 => [setup  5/17] COPY ibgateway-1010-standalone-linux-x64.sh.sha256 .                                                                                 0.1s
 => [setup  6/17] RUN curl -sSL https://github.com/waytrade/ib-gateway-docker/releases/download/v1010/ibgateway-1010-standalone-linux-x64.sh --outpu  23.7s
 => ERROR [setup  7/17] RUN sha256sum --check ibgateway-1010-standalone-linux-x64.sh.sha256                                                            0.9s
------
 > [setup  7/17] RUN sha256sum --check ibgateway-1010-standalone-linux-x64.sh.sha256:
: FAILED open or read010-standalone-linux-x64.sh
#14 0.819 sha256sum: 'ibgateway-1010-standalone-linux-x64.sh'$'\r': No such file or directory
#14 0.819 sha256sum: WARNING: 1 listed file could not be read
------
executor failed running [/bin/sh -c sha256sum --check ibgateway-${IB_GATEWAY_VERSION}-standalone-linux-x64.sh.sha256]: exit code: 1
ERROR: Service 'ib-gateway' failed to build : Build failed

Adjust memory

Thank you for putting this together. One question is how do you change the Java VM options? Right now it has it set to 768MB but what if we want to change that?

Generating the JAVA VM options
Java VM Options=-Xmx768m -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=20 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=70 -Dtwslaunch.autoupdate.serviceImpl=com.ib.tws.twslaunch.install4j.Install4jAutoUpdateService -Dchannel=latest -Dexe4j.isInstall4j=true -Dinstall4jType=standalone

Vendoring of IB Gateway

@mfrener thank you for this Dockerized IB Gateway, it looks really good!

One thing I observed when reviewing it is that the Dockerfile pulls in a copy of the IB Gateway software from a file in the releases directory rather than the official IB software.

I imagine this is likely to avoid breakages as and when IB update the version stable points at? Whilst that makes sense (if IB do not provide permalinks to specific version) it looks rather suspicious when reviewing the code as the target file is not under revision control and so could change at any time.

Whilst not ideal for a large binary, perhaps it would be better to vendor the software in the git repo?

Another option may be to target a channel (ie. stable / latest) rather than a specific version and then pull it directly from the official IB website?

Unable to connect to IB gateway

  • Environment details: Running ib gateway docker image on Kubernetes and connecting to service using Python package ib-insync-0.9.70

  • Kubernetes Pod definition:

kind: Pod
metadata:
  name: ibgw
  namespace: test
spec:
  containers:
  - name: ibgw
    image: waytrade/ib-gateway:1010
    imagePullPolicy: IfNotPresent
    ports:
      - containerPort: 4001
        name: live
        protocol: TCP
      - containerPort: 4002
        name: paper
        protocol: TCP
      - containerPort: 5900
        name: vnc
        protocol: TCP
    env:
    - name: VNC_SERVER_PASSWORD
      value: my_vnc_password
    - name: TRADING_MODE
      value: live
    - name: TWS_USERID
      value: my_tws_userid
    - name: TWS_PASSWORD
      value: my_tws_password
---
  • Pod logs:
Starting VNC server

================================================================================

Starting IBC version  on 2021-12-10 at 01:26:45

Operating system: Linux ibgw 5.4.0-1062-azure #65~18.04.1-Ubuntu SMP Tue Oct 12 11:26:28 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Arguments:

TWS version = 1010
Entry point = ibcalpha.ibc.IbcGateway
--tws-path = /root/Jts
--tws-settings-path =
--ibc-path = /root/ibc
--ibc-ini = /root/ibc/config.ini
--mode = live
--java-path =
--user = ***
--pw = ***
--fix-user =
--fix-pw =

=================================
Generating the classpath
Classpath=/root/Jts/ibgateway/1010/jars/jts4launch-1010.jar:/root/Jts/ibgateway/1010/jars/jxbrowser-7.17.jar:/root/Jts/ibgateway/1010/jars/jxbrowser-linux64-7.17.jar:/root/Jts/ibgateway/1010/jars/jxbrowser-swing-7.17.jar:/root/Jts/ibgateway/1010/jars/locales.jar:/root/Jts/ibgateway/1010/jars/log4j-api-2.12.0.jar:/root/Jts/ibgateway/1010/jars/log4j-core-2.12.0.jar:/root/Jts/ibgateway/1010/jars/total-2020.jar:/root/Jts/ibgateway/1010/jars/twslaunch-1010.jar:/root/Jts/ibgateway/1010/jars/twslaunch-install4j-1.10.jar:/root/ibc/IBC.jar

Generating the JAVA VM options
Java VM Options=-Xmx768m -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=20 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=70

Determining the location of java executable
Location of java executable=/usr/local/i4j_jres/1.8.0_152-tzdata2019c/bin

Starting Gateway with this command:
"/usr/local/i4j_jres/1.8.0_152-tzdata2019c/bin/java" -cp "/root/Jts/ibgateway/1010/jars/jts4launch-1010.jar:/root/Jts/ibgateway/1010/jars/jxbrowser-7.17.jar:/root/Jts/ibgateway/1010/jars/jxbrowser-linux64-7.17.jar:/root/Jts/ibgateway/1010/jars/jxbrowser-swing-7.17.jar:/root/Jts/ibgateway/1010/jars/locales.jar:/root/Jts/ibgateway/1010/jars/log4j-api-2.12.0.jar:/root/Jts/ibgateway/1010/jars/log4j-core-2.12.0.jar:/root/Jts/ibgateway/1010/jars/total-2020.jar:/root/Jts/ibgateway/1010/jars/twslaunch-1010.jar:/root/Jts/ibgateway/1010/jars/twslaunch-install4j-1.10.jar:/root/ibc/IBC.jar" -Xmx768m -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=20 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=70 ibcalpha.ibc.IbcGateway "/root/ibc/config.ini" *** *** live

PORT=5900
IBC Settings:
    AcceptBidAskLastSizeDisplayUpdateNotification=accept
    AcceptIncomingConnectionAction=reject
    AcceptNonBrokerageAccountWarning=yes
    AllowBlindTrading=no
    BindAddress=
    ClosedownAt=
    CommandPrompt=
    ControlFrom=
    DismissNSEComplianceNotice=yes
    DismissPasswordExpiryWarning=no
    ExistingSessionDetectedAction=primary
    ExitAfterSecondFactorAuthenticationTimeout=no
    FIX=no
    FIXLoginId=***
    FIXPassword=***
    IbAutoClosedown=yes
    IbDir=/root/Jts
    IbLoginId=***
    IbPassword=***
    LogStructureScope=known
    LogStructureWhen=never
    LoginDialogDisplayTimeout=60
    MinimizeMainWindow=no
    OverrideTwsApiPort=4000
    ReadOnlyApi=
    ReadOnlyLogin=no
    SaveTwsSettingsAt=
    SecondFactorAuthenticationExitInterval=
    SendMarketDataInLotsForUSstocks=no
    StoreSettingsOnServer=
    SuppressInfoMessages=yes
    TradingMode=
End IBC Settings

2021-12-10 01:26:45:530 IBC: Version: 3.10.0
System Properties
------------------------------------------------------------
java.runtime.name = Java(TM) SE Runtime Environment
sun.boot.library.path = /usr/local/i4j_jres/1.8.0_152-tzdata2019c/lib/amd64
java.vm.version = 25.152-b16
java.vm.vendor = Oracle Corporation
java.vendor.url = http://java.oracle.com/
path.separator = :
java.vm.name = Java HotSpot(TM) 64-Bit Server VM
file.encoding.pkg = sun.io
user.country = US
sun.java.launcher = SUN_STANDARD
sun.os.patch.level = unknown
java.vm.specification.name = Java Virtual Machine Specification
user.dir = /root/Jts
java.runtime.version = 1.8.0_152-b16
java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment
java.endorsed.dirs = /usr/local/i4j_jres/1.8.0_152-tzdata2019c/lib/endorsed
os.arch = amd64
java.io.tmpdir = /tmp
line.separator =

java.vm.specification.vendor = Oracle Corporation
os.name = Linux
sun.jnu.encoding = ANSI_X3.4-1968
java.library.path = /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
java.specification.name = Java Platform API Specification
java.class.version = 52.0
sun.management.compiler = HotSpot 64-Bit Tiered Compilers
os.version = 5.4.0-1062-azure
user.home = /root
user.timezone = GMT
java.awt.printerjob = sun.print.PSPrinterJob
file.encoding = ANSI_X3.4-1968
java.specification.version = 1.8
java.class.path = /root/Jts/ibgateway/1010/jars/jts4launch-1010.jar:/root/Jts/ibgateway/1010/jars/jxbrowser-7.17.jar:/root/Jts/ibgateway/1010/jars/jxbrowser-linux64-7.17.jar:/root/Jts/ibgateway/1010/jars/jxbrowser-swing-7.17.jar:/root/Jts/ibgateway/1010/jars/locales.jar:/root/Jts/ibgateway/1010/jars/log4j-api-2.12.0.jar:/root/Jts/ibgateway/1010/jars/log4j-core-2.12.0.jar:/root/Jts/ibgateway/1010/jars/total-2020.jar:/root/Jts/ibgateway/1010/jars/twslaunch-1010.jar:/root/Jts/ibgateway/1010/jars/twslaunch-install4j-1.10.jar:/root/ibc/IBC.jar
user.name = root
java.vm.specification.version = 1.8
sun.java.command = ibcalpha.ibc.IbcGateway /root/ibc/config.ini **** **** live
java.home = /usr/local/i4j_jres/1.8.0_152-tzdata2019c
sun.arch.data.model = 64
user.language = en
java.specification.vendor = Oracle Corporation
awt.toolkit = sun.awt.X11.XToolkit
java.vm.info = mixed mode
java.version = 1.8.0_152
java.ext.dirs = /usr/local/i4j_jres/1.8.0_152-tzdata2019c/lib/ext:/usr/java/packages/lib/ext
sun.boot.class.path = /usr/local/i4j_jres/1.8.0_152-tzdata2019c/lib/resources.jar:/usr/local/i4j_jres/1.8.0_152-tzdata2019c/lib/rt.jar:/usr/local/i4j_jres/1.8.0_152-tzdata2019c/lib/sunrsasign.jar:/usr/local/i4j_jres/1.8.0_152-tzdata2019c/lib/jsse.jar:/usr/local/i4j_jres/1.8.0_152-tzdata2019c/lib/jce.jar:/usr/local/i4j_jres/1.8.0_152-tzdata2019c/lib/charsets.jar:/usr/local/i4j_jres/1.8.0_152-tzdata2019c/lib/jfr.jar:/usr/local/i4j_jres/1.8.0_152-tzdata2019c/classes
java.vendor = Oracle Corporation
file.separator = /
java.vendor.url.bug = http://bugreport.sun.com/bugreport/
sun.io.unicode.encoding = UnicodeLittle
sun.cpu.endian = little
sun.cpu.isalist =
------------------------------------------------------------
2021-12-10 01:26:45:540 IBC: Using default settings provider: ini file is /root/ibc/config.ini
2021-12-10 01:26:45:541 IBC: Using default login manager: getting username and password from args
2021-12-10 01:26:45:541 IBC: Using default main window manager: constructor parameter isGateway=true
2021-12-10 01:26:45:541 IBC: Using default trading mode manager: constructor parameter args: tradingMode=live
2021-12-10 01:26:45:543 IBC: Using default config dialog manager
2021-12-10 01:26:45:558 IBC: CommandServer is not started because the port is not configured
2021-12-10 01:26:45:681 IBC: TWS Settings directory is: /root/Jts
2021-12-10 01:26:45:690 IBC: Ensuring /root/Jts/jts.ini contains required minimal lines
2021-12-10 01:26:45:690 IBC: Found setting: [Logon]/s3store=true
2021-12-10 01:26:45:690 IBC: Found setting: [Logon]/Locale=en
2021-12-10 01:26:45:691 IBC: Found setting: [Logon]/displayedproxymsg=1
2021-12-10 01:26:45:691 IBC: Found setting: [Logon]/UseSSL=true
2021-12-10 01:26:45:691 IBC: Found setting: [IBGateway]/ApiOnly=true
2021-12-10 01:26:45:691 IBC: Confirmed /root/Jts/jts.ini contains required minimal lines
2021-12-10 01:26:45:691 IBC: Starting session: will exit if login dialog is not displayed within 60 seconds
2021-12-10 01:26:47:710 IBC: Getting config dialog
2021-12-10 01:26:47:711 IBC: Creating config dialog future
2021-12-10 01:26:47:719 IBC: Getting main window
2021-12-10 01:26:47:724 IBC: Creating main window future
2021-12-10 01:26:47:725 IBC: Getting config dialog
2021-12-10 01:26:47:725 IBC: Waiting for config dialog future to complete
2021-12-10 01:26:49:300 IBC: Detected frame entitled: Interactive Brokers Gateway; event=Opened
2021-12-10 01:26:49:428 IBC: Detected frame entitled: Interactive Brokers Gateway; event=Activated
2021-12-10 01:26:49:432 IBC: Setting Trading mode = live
2021-12-10 01:26:49:547 IBC: Detected frame entitled: Interactive Brokers Gateway; event=Focused
2021-12-10 01:26:49:603 IBC: Click button: Log In
2021-12-10 01:26:52:106 IBC: Detected frame entitled: Interactive Brokers Gateway; event=Lost focus
2021-12-10 01:26:52:107 IBC: Detected frame entitled: Interactive Brokers Gateway; event=Deactivated
2021-12-10 01:26:52:116 IBC: Detected frame entitled: Loading...; event=Activated
2021-12-10 01:26:52:127 IBC: Detected frame entitled: Loading...; event=Focused
2021-12-10 01:26:52:132 IBC: Detected frame entitled: Loading...; event=Opened
2021-12-10 01:26:52:132 IBC: Found Gateway main window
2021-12-10 01:26:52:136 IBC: Got main window from future
2021-12-10 01:26:52:484 IBC: Detected frame entitled: Loading...; event=Lost focus
2021-12-10 01:26:52:485 IBC: Detected frame entitled: Loading...; event=Deactivated
2021-12-10 01:26:52:485 IBC: Detected frame entitled: Authenticating...; event=Activated
2021-12-10 01:26:52:495 IBC: Detected frame entitled: Authenticating...; event=Focused
2021-12-10 01:26:52:496 IBC: Detected frame entitled: Authenticating...; event=Opened
2021-12-10 01:26:53:059 IBC: Detected dialog entitled: ** no title **; event=Opened
2021-12-10 01:26:53:072 IBC: Detected frame entitled: Requesting startup parameters...; event=Lost focus
2021-12-10 01:26:53:073 IBC: Detected frame entitled: Requesting startup parameters...; event=Deactivated
2021-12-10 01:26:53:074 IBC: Detected dialog entitled: ** no title **; event=Activated
2021-12-10 01:26:53:075 IBC: Detected dialog entitled: ** no title **; event=Focused

Forking :::4000 onto 0.0.0.0:4001
  • Python commands:
from ib-insync import *
ib = IB()
ib.connect('<pod-ip-address>", 4001)
  • Pod logs:
2021/12/10 01:28:35 socat[165] E connect(5, AF=2 127.0.0.1:4000, 16): Connection refused

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.