Code Monkey home page Code Monkey logo

Comments (5)

rlktradewright avatar rlktradewright commented on August 22, 2024

from ibc.

erdewit avatar erdewit commented on August 22, 2024

Thanks very much Richard! It works splendidly...

The reason for StartIBC is to use it in a Python wrapper for IBC. IBC then becomes a 'component' that can be started and stopped at will, with the arguments of choice. The code is here. There are some advantages to this over using IBC as a 'service' that has to be running when the API software starts. For example, the API software can start IBC itself and monitor/restart it if required (watchdog). Also there is only one config file needed (with the real password) and with the arguments one can select between TWS or gateway, live or paper, real or edemo etc.

Thanks again and congratulations on the successful launch of the IBC project. It's too bad that the IBC name on group.io is already taken by a book club, but I for one would not mind to see the official IBC discussion on the TWSAPI list like it always was for ibcontroller up until some years ago.

from ibc.

rlktradewright avatar rlktradewright commented on August 22, 2024

from ibc.

yezhengli-Mr9 avatar yezhengli-Mr9 commented on August 22, 2024

For Ubuntu 20.04 version, should I run ./ibcstart.sh to start IBC?

(base) <username>@Ubuntu:/opt/ibc/scripts$ ./ibcstart.sh 

Runs IBC, thus loading TWS or the IB Gateway

Usage:

ibcstart twsVersion [-g \| --gateway] [--tws-path=twsPath]
             [--tws-settings-path=twsSettingsPath] [--ibc-path=ibcPath]
             [--ibc-ini=ibcIni] [--java-path=javaPath]
             [--user=userid] [--pw=password]
             [--fix-user=fixuserid] [--fix-pw=fixpassword]
             [--mode=tradingMode]
             [--on2fatimeout=2fatimeoutaction]

  twsVersion              The major version number for TWS

  -g or --gateway         Indicates that the IB Gateway is to be loaded rather
                          than TWS

  twsPath                 Path to the TWS installation folder. Defaults to
                          ~/Jts on Linux, ~/Applications on OS X

  twsSettingsPath         Path to the TWS settings folder. Defaults to
                          the twsPath argument

  ibcPath                 Path to the IBC installation folder.
                          Defaults to /opt/ibc

  ibcIni                  The location and filename of the IBC 
                          configuration file. Defaults to 
                          ~/ibc/config.ini

  javaPath                Path to the folder containing the java executable to
                          be used to run IBC. Defaults to the java
                          executable included in the TWS installation; failing 
                          that, to the Oracle Java installation

  userid                  IB account user id

  password                IB account password

  fixuserid               FIX account user id (only if -g or --gateway)

  fixpassword             FIX account password (only if -g or --gateway)

  tradingMode             Indicates whether the live account or the paper 
                          trading account will be used. Allowed values are:

                              live
                              paper

                          These values are not case-sensitive.

  2fatimeoutaction       Indicates what to do if IBC exits due to second factor
                         authentication timeout. Allowed values are:

                              restart
                              exit

or

(base) <username>@Ubuntu:/opt/ibc$ ./scripts/ibcstart.sh 

Runs IBC, thus loading TWS or the IB Gateway

Usage:

ibcstart twsVersion [-g \| --gateway] [--tws-path=twsPath]
             [--tws-settings-path=twsSettingsPath] [--ibc-path=ibcPath]
             [--ibc-ini=ibcIni] [--java-path=javaPath]
             [--user=userid] [--pw=password]
             [--fix-user=fixuserid] [--fix-pw=fixpassword]
             [--mode=tradingMode]
             [--on2fatimeout=2fatimeoutaction]

  twsVersion              The major version number for TWS

  -g or --gateway         Indicates that the IB Gateway is to be loaded rather
                          than TWS

  twsPath                 Path to the TWS installation folder. Defaults to
                          ~/Jts on Linux, ~/Applications on OS X

  twsSettingsPath         Path to the TWS settings folder. Defaults to
                          the twsPath argument

  ibcPath                 Path to the IBC installation folder.
                          Defaults to /opt/ibc

  ibcIni                  The location and filename of the IBC 
                          configuration file. Defaults to 
                          ~/ibc/config.ini

  javaPath                Path to the folder containing the java executable to
                          be used to run IBC. Defaults to the java
                          executable included in the TWS installation; failing 
                          that, to the Oracle Java installation

  userid                  IB account user id

  password                IB account password

  fixuserid               FIX account user id (only if -g or --gateway)

  fixpassword             FIX account password (only if -g or --gateway)

  tradingMode             Indicates whether the live account or the paper 
                          trading account will be used. Allowed values are:

                              live
                              paper

                          These values are not case-sensitive.

  2fatimeoutaction       Indicates what to do if IBC exits due to second factor
                         authentication timeout. Allowed values are:

                              restart
                              exit

from ibc.

rlktradewright avatar rlktradewright commented on August 22, 2024

@yezhengli-Mr9

It's recommended that you use the higher-level scripts twsstart.sh and gatewaystart.sh, which make life easier.

But you can use ibcstart.sh if you have some particular reason to. For example some Docker images use ibcstart.sh because they don't want the banner window displayed.

from ibc.

Related Issues (20)

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.