Skip to content

Releases: IbcAlpha/IBC

3.20.0

12 Aug 17:59
Compare
Choose a tag to compare

This Release contains the following fixes and enhancements:

  • Fixes problems that occur during auto-restart if the autorestart file contains invalid credentials. A cold restart is performed requiring full authentication.
  • Automatically handles the dialog that occurs, starting in TWS 10.30.nn, when the user invokes the keyboard shortcuts to refresh market data subscriptions or reset the account connection. Ditto when the RECONNECTDATA and RECONNECTACCOUNT commands are sent to IBC.
  • Uses the correct shortcut keycode, depending on platform, when processing RECONNECTDATA and RECONNECTACCOUNT commands (see #242).
  • Fixes issues with cold restart after detecting Login Error or Login Failed dialogs (see #264).

There are no changes to script files.

To upgrade to this Release, download the relevant zip file and extract the IBC.jar and version files, copying them over the current versions in your IBC installation folder. Then restart TWS/Gateway.

3.19.0

22 May 17:44
Compare
Choose a tag to compare

The main improvement in this release is the resolution of these issues:

  • #142 Login failed - Server disconnected, please try again
  • #251 Unknown Username.Password/Duplicate Session?
  • #253 IBC unable to restart after 2.5 days of running. Happened multiple times.

Other enhancements:

  • there is a revised Task Scheduler template for Windows, to ensure that IBC is automatically restarted if it is closed for any reason
  • a Cold Restart mechanism has been introduced. This provides an easy way to ensure compliance with IBKR's requirement that TWS/Gateway be fully logged off at some point on Sundays. See the notes for the new ColdRestartTime setting in config.ini
  • the User Guide has been updated to include information about IBC's command server
  • sample scripts have been provided to enable easy use of IBC's command server

The recommended procedure for installing this release is:

  1. Rename your existing IBC folder, for example to IBC-old, so you can easily revert to it if need be.
  2. Create a new IBC folder.
  3. Extract the contents of the zip file as described in the User Guide.
  4. Update the config.ini and scripts as required. Note that the top-level start scripts have not changed, so you can copy those back from the renamed IBC folder to the new IBC folder rather than update the new copies. These are:
    StartTWS.bat
    StartGateway.bat
    twsstart.sh
    gatewaystart.sh
    twsstartmacos.sh
    gatewaystartmacos.sh

3.18.0

14 Jul 17:12
Compare
Choose a tag to compare

[Updated 23 September 2023: zip files re-released to include corrections to the twsstartmacos.sh and gatewaystartmacos.sh script files: these contained an incorrect default value for the TWS_MAJOR_VRSN variable. There are also some minor changes to script file comments for all platforms, and a trivial change to the User Guide. There are no changes to IBC functionality. If your existing IBC 3.18.0 installation is working properly, you can ignore this update.]

This Release introduces the ability to configure the API-Precautions settings in TWS and Gateway via new settings in config.ini. This is in response to issue #222.

These new settings are described in the API Precautions section of config.ini, and are as follows. See the notes in config.ini for further details:

BypassOrderPrecautions
BypassBondWarning
BypassNegativeYieldToWorstConfirmation
BypassCalledBondWarning
BypassSameActionPairTradeWarning
BypassPriceBasedVolatilityRiskWarning
BypassUSStocksMarketDataInSharesWarning
BypassRedirectOrderWarning
BypassNoOverfillProtectionPrecaution

These settings are intended for use in situations where the TWS/Gateway user interface is not easily accessible or where TWS/Gateway settings are not persisted between sessions, as happens with some Docker images.

The Release also contains some minor IBC code improvements: see the commit history for details.

If you do not need to use these new settings, it is not necessary to upgrade to this Release.

To upgrade an existing installation, extract the IBC.jar and version files from the .zip file and overwrite the existing versions. Update your config.ini with the new API Precautions section from the config.ini file in the .zip.

3.17.0-update.1

06 Jul 11:48
Compare
Choose a tag to compare

This Release is a Windows-only update that fixes a couple of bugs in the start script for IBC. There are no changes to IBC's functionality.

  • Fixes a problem on Windows where installing a new update of an already-installed TWS or Gateway prevents autorestart from succeeding

  • Fixes a problem on Windows where using double backslashes in the TWS_SETTINGS_PATH prevents autorestart from succeeding. Fix #221

Windows users who have already installed IBC 3.17.0 should extract the StartIBC.bat file from the Scripts folder in the Windows .zip file to replace the existing file in the IBC\Scripts subfolder. Also extract the version file to replace the existing one in the IBC folder.

Windows users wishing to install IBC 3.17.0 for the first time should do so using the .zip file from the IBC 3.17.0 release, and then update the files from this release as described above.

Linux and macOS users should ignore this release.

3.17.0

27 Jun 00:23
Compare
Choose a tag to compare

This release provides the following enhancements:

  • Support for Gateway v10.22 and later. IBKR changed the format of the Gateway login dialog, resulting in earlier IBC versions failing to recognise it and therefore not completing login automatically. Fix #206 #217.

  • Fixes a problem where IBC no longer worked properly with the FIX/CTCI Gateway. See the notes for the new setting TrustedTwsApiClientIPs
    in config.ini. Fix #207

  • Enables the master client id to be set automatically at startup. See the notes for the new setting OverrideTwsMasterClientID in config.ini for details. PR #213

  • Enables the order id sequence for API orders to be reset to 1 at startup. See the notes for the new settings ResetOrderIdsAtStart and ConfirmOrderIdReset in config.ini

  • The default for the SecondFactorAuthenticationExitInterval setting in config.ini has been increased from 40 seconds to 60 seconds. This is because starting with recent versions of TWS/Gateway, sometimes considerably more data is downloaded at startup due to the inclusion of the JxBrowser. This extra data can cause the original timeout to be exceeded.

If your IBC installation is working well and you do not need the enhancements listed above, you do not need to upgrade to this version.

To upgrade from version 3.16.2 (or a later beta version), download the relevant zip file and extract the IBC.jar and version files, overwriting the current versions. Also update your config.ini file with the new settings mentioned above. These are the only changed files.

To upgrade from an earlier version than 3.16.2, the safest way is to first rename your existing IBC folder (eg to IBC.old) and then create a new one. Then download the relevant zip file and extract the files, as for a new installation (as described in the User Guide). Then re-apply any changes you previously made to the following files, On Linux, remember to set execute permission on the scripts.

All platforms:

config.ini

Windows only

StartTWS.bat
StartGateway.bat

Linux & macOS

gatewaystart.sh (or gatewaystartmacos.sh)
twsstart.sh (or twsstartmacos.sh)

3.16.2

15 Mar 13:27
Compare
Choose a tag to compare

This release provides two enhancements:

  • IBC now detects situations where more than one potentially valid autorestart file exists when starting or restarting.

    This situation can arise if multiple instances of IBC are configured with the same TWS_SETTINGS_PATH and the same auto-restart time (for example live and paper trading instances). The safest approach is to ensure that different auto-restart times are configured, separated by at least one minute (but 5 minutes would be safer still). It's also worth considering using different TWS_SETTINGS_PATH settings, so that this issue doesn't arise.

    When IBC detects this situation, it deletes all the autorestart files and then proceeds with a normal start of TWS/Gateway. This means that the login form is displayed and handled in the usual way by IBC, including full Second Factor Authentication for live accounts.

    IBC writes details of the detected autorestart files to its logfile as an aid to diagnosing the problem.

  • The SessionManager method previously with signature static void Initialise(boolean isGateway) has been renamed and made public. Its new signature is public static void initialise(boolean isGateway).

    This is necessary for programs that run IBC in-process rather than starting it via the scripts.

DO I NEED TO UPGRADE TO THIS RELEASE?

For a new IBC installation, you should download the relevant zip file and proceed as detailed in the User Guide (included in the zip file, or at https://github.com/IbcAlpha/IBC/blob/master/userguide.md).

Otherwise proceed as in the 'How to Upgrade' description below. Note that:

  • If the circumstances described above regarding the autorestart files do not apply to you, you do not need to deploy the updated script file.

  • If you do not load IBC within your own program, you do not need to deploy the updated IBC.jar file.

HOW TO UPGRADE

Either extract the relevant changed files from the zip file, or download them directly from the provided URL. Overwrite the existing version with the new one. You can do this while TWS/Gateway are running, but you must then shut TWS/Gateway down and start it afresh for the updates to take effect: note that using File | Restart or the RESTART command will not work correctly.

The only changed files are:

IBC.jar (URL https://github.com/IbcAlpha/IBC/blob/master/resources/IBC.jar)
version (URL https://github.com/IbcAlpha/IBC/blob/master/resources/version)

StartIBC.bat (Windows only, scripts subfolder, URL https://github.com/IbcAlpha/IBC/blob/master/resources/scripts/StartIBC.bat)

ibcstart.sh (Linux/macOS only, scripts subfolder, URL https://github.com/IbcAlpha/IBC/blob/master/resources/scripts/ibcstart.sh)

3.16.0

20 Jan 18:33
Compare
Choose a tag to compare

This release provides additional support for Auto-restart in TWS and Gateway, for all current TWS/Gateway versions (ie 1012 onwards). Auto-restart is not supported when used with earlier TWS/Gateway versions.

IMPORTANT If you are currently using an IBC version earlier than 3.15.2, you are strongly advised to upgrade to this version.

The main enhancement is the provision of a RESTART command that can be sent to IBC's command server. This causes TWS/Gateway to auto-restart without the user having to re-authenticate. Note however that this command cannot be used to bypass the need to do full second-factor authentication on Sundays. A new Windows script, Restart.bat is provided. This script, and the revised Stop.bat script, both use a new user-customisable SendCommand.bat script to identify the IBC instance to be stopped or restarted.

Additionally, the following changes have been made:

  • the description of running IBC under Task Scheduler on Windows has been corrected

  • the ReadOnlyLogin setting in config.ini now works properly in cases where the user has only a security code card but not IBKR mobile (fix Issue #190)

  • the StartTWS.bat script on Windows has been improved to allow the colours used for the banner window to be specified (as was previously enabled for the GatewayStart.bat script). This could be used for example to easily distinguish between the banner windows for live and paper trading instances

  • various code improvements have been made - see the commit history

  • a number of clarifications have been made in the start scripts and in config.ini

HOW TO UPGRADE

The safest way to upgrade is to first to rename your existing IBC folder (eg to IBC.old) and then create a new one. Then download the relevant zip file and extract the files, as for a new installation (as described in the User Guide). Then re-apply any changes you previously made to the following files, On Linux, remember to set execute permission on the scripts.

All platforms:

config.ini

Windows only

StartTWS.bat
StartGateway.bat
SendCommand.bat (new file in this release, needs customisation as per the old Stop.bat which is no longer used)

Linux & macOS

gatewaystart.sh (or gatewaystartmacos.sh)
twsstart.sh (or twsstartmacos.sh)

3.15.2

04 Dec 00:28
Compare
Choose a tag to compare

This release corrects a bug introduced with release 3.15.1 yesterday. This caused a crash when auto-restarting (all platforms, TWS and Gateway).

If you have already installed 3.15.1, then just extract the IBC.jar and version files from the zip and overwrite your existing versions (don't forget to ensure execute permission is set on Linux and macOS).

If not then use the IBC.jar and version files from this version when you do.

3.15.1

03 Dec 00:41
Compare
Choose a tag to compare

This release fixes some bugs in release 3.15.0. It contains no new functionality.

NB: you need to use the updated files in this release to make auto-restart work reliably so that TWS/Gateway remains under IBC control after auto-restart.

  • fixed the low-level scripts (#187 and #188, and incorrect renaming of the IBKR-installed executables) to allow correct auto-restart under IBC without interference from TWS/Gateway
  • adds a permission check to the start scripts for Linux and macOS
  • update to user manual regarding major version number for macOS

If you have not already installed version 3.15.1, then don't bother, but follow the installation instructions described there but using the .zip files from this release.

If you have already installed version 3.15.1, then update the following files:

All platforms:

IBC.jar
version
userguide.pdf

Windows only:

scripts\StartIBC.at

Linux & macOS:

gatewaystart.sh (or gatewaystartmacos.sh)
twsstart.sh (or twsstartmacos.sh)
scripts\ibcstart.sh

3.15.0

30 Nov 11:25
Compare
Choose a tag to compare

This release provides support for Auto-restart in TWS and Gateway, for TWS/Gateway versions starting with v1018. Auto-restart is not supported when used with earlier TWS/Gateway versions.

IMPORTANT You MUST deploy this release to use auto-restart in TWS/Gateway version 1018 and later. The easiest way to do this is to download the relevant zip file and extract the following changed files, overwriting the current ones. Note that some files may contain your own settings changes, and you will need to ensure these get carried forward: these files are in bold in the list below. The script files and config.ini contain significant changes to comments: copying the files afresh will ensure they are up-to-date. You should make a copy of your existing setup before extracting the new versions, so you can easily see what customisations you need to carry forward.

Note in particular the comments regarding the TWS_SETTINGS_PATH variable in the start scripts and the IbDir setting in config.ini.

All platforms:

IBC.jar
version
config.ini (IbAutoClosedown setting removed; TWS Auto-Logoff and Auto-Restart section replaces TWS Auto-Logoff section)

Windows only:

StartTWS.bat
StartGateway.bat
scripts\StartIBC.at

Linux & macOS:

gatewaystart.sh (or gatewaystartmacos.sh)
twsstart.sh (or twsstartmacos.sh)
scripts\ibcstart.sh