Skip to content

3.8.1

Compare
Choose a tag to compare
@rlktradewright rlktradewright released this 10 Jun 17:39
· 193 commits to master since this release

If none of the new features and bug fixes described below are relevant to you, you do not need to upgrade your installation.

Bug Fixes

  • The StoreSettingsOnServer setting in config.ini was not always correctly actioned.

  • Setting MinimizeMainWindow=yes did not always work correctly.

New features:

New value for ExistingSessionDetectedAction setting

This release enhances the ExistingSessionDetectedAction setting in config.ini, with the introduction of a new value for the setting: primaryoverride.

When a user logs on to an IBKR account for trading purposes by any means, the IBKR account server checks to see whether the account is already logged in elsewhere. If so, a dialog is displayed to both the users that enables them to determine what happens next. The ExistingSessionDetectedAction setting instructs TWS how to proceed when it displays one of these dialogs:

  • If the existing TWS session is set to 'primary', the existing session continues and the new session is not permitted to proceed.

  • If the existing TWS session is set to 'primaryoverride', the existing session terminates and the new session is permitted to proceed.

  • If the new session is via TWS with `ExistingSessionDetectedAction=secondary', the new TWS exits so that the existing session is unaffected.

  • If the existing TWS session is set to 'manual', the user must handle the dialog.

Notes:

a. ExistingSessionDetectedAction=primaryoverride is useful if you use the IBKR Mobile app or use the Client Portal on IBKR's Account Management website: using either of these can cause your TWS/Gateway session on your computer to be shut down. If your TWS/Gateway session has ExistingSessionDetectedAction=primary, IBC will prevent this and you won't be able to use the IBKR Mobile app or the Client Portal with live market data. But if your TWS/Gateway session has ExistingSessionDetectedAction=primaryoverride, then the session will be shut down and use of the IBKR Mobile app or the Client Portal can proceed. If you also arrange for TWS/Gateway to be automatically restarted periodically, then TWS/Gateway will be automatically restarted and the IBKR Mobile app/Client Portal session will be prevented from using further live market data: with care, this can enable you to access IBKR Mobile/Client Portal without permanently losing your TWS/Gateway session on your computer.

b. The difference between primary and primaryoverride is that a primaryoverride session can be taken over by a new primary or primaryoverride session, but a primary session cannot be taken over by any other session.

c. When set to 'primary', if another TWS session is started and manually told to end the primary session, the primary session is automatically reconnected (provided the other session is in a TWS version higher than 949).

d. See the User Guide for information about periodically restarting TWS/Gateway using Task Scheduler on Windows or crontab on Linux.

New setting in config.ini: ReadOnlyApi

When TWS and Gateway are run for the very first time, the API settings are configured with the Read-Only API checkbox set on. Where a user is present, this is not a problem because they can manually clear the checkbox: it only needs to be done once, even if TWS/Gateway is subsequently re-installed.

In situations where TWS or Gateway instances are being automatically installed afresh and started without user intervention and without configuration of the user's TWS/Gateway settings for previous sessions (eg some Docker container scenarios) this is less than ideal, and the ReadOnlyApi setting in 'config.ini' caters for this case.

If ReadOnlyApi is set to 'yes', API programs cannot submit, modify or cancel orders. If set to 'no', API programs can do these things.

If not set, the existing TWS/Gateway configuration is unchanged.