Skip to content

Releases: IbcAlpha/IBC

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

3.14.0

18 Jul 00:15
Compare
Choose a tag to compare

[19 July 2022: zip files re-released to include updated User Guide.]

NOTE: you need this release to run TWS/Gateway 1016 or later with Second Factor Authentication via the IBKR Mobile app

This release has the following enhancements:

  • It works correctly with TWS and Gateway version 1016: in these versions IBKR have changed the login dialog when using 2FA in such a way that earlier versions of IBC no longer recognise it.
  • You can now configure the TWS/Gateway autologoff time using the new AutoLogoffTime setting in config.ini. This setting is provided for use in situations where there is no user to manually configure a newly installed TWS/Gateway (for example some Docker images). Where there is a user present, it is recommended to configure this setting manually using the relevant fields in the 'Lock and Exit' section of the Global Configuration dialog.
  • The way that IBC handles Second Factor Authentication via the IBKR Mobile app has been significantly improved to minimise unnecessary delays and IBC restarts. There is now a new setting in config.ini, ReloginAfterSecondFactorAuthenticationTimeout, which replaces the ExitAfterSecondFactorAuthenticationTimeout setting. See the notes in config.ini for further details.

The following bugs have been fixed:

  • A 'white label' TWS customisation for a third-party broker prevented IBC from locating the main window.
  • The description of the TWS_MAJOR_VRSN setting in the start scripts for macOS has been corrected: on macOS, the period in the version number must be included. Note that this is different from the Windows and Linux scripts because on macOS the TWS/Gateway installers include the period in the install folder name (Issue #176 ).

For further minor changes, see the commit history.

IMPORTANT You MUST deploy this release to use TWS/Gateway version 1016 and later with the IBKR Mobile app for Second Factor Authentication. If you don't use the IBKR Mobile app with TWS/Gateway 1016, and you don't need any of the other changes listed above, you can continue to use your current IBC version.

The safest way to do this upgrade is:

  1. Download the relevant zip file.
  2. Rename your existing IBC installation folder, for example to IBC.old
  3. Follow the installation instructions for the new version as described in the User Guide.
  4. Re-apply your customisations in the original installation to the start scripts and the config.ini file. To remind yourself of the settings you used in the config.ini file, look in a previous IBC logfile where all the settings are listed.

3.13.0

22 May 23:27
Compare
Choose a tag to compare

NOTE: you need this release to run TWS/Gateway 1015 or later

This release has the following enhancements:

  • It works correctly with TWS and Gateway version 1015 (issues #163, #165).
  • It handles the Cryptocurrency Order Confirmation dialog. Note that this uses a new setting in config.ini called ConfirmCryptoCurrencyOrders.
  • The start scripts have a revised description for the LOG_PATH setting, which now allow log output to the terminal window rather than to a file.

The following bugs have been fixed:

  • The Blind Trading Warning dialog was no longer handled correctly (issue #162).
  • The start script failed when running on Google Cloud Run.

For further minor changes, see the commit history.

IMPORTANT You MUST deploy this release to use TWS/Gateway version 1015 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.

All platforms:

IBC.jar
version
config.ini (new section 'Confirm Crypto Currency Orders Automatically')

Windows only

StartTWS.bat
StartGateway.bat
scripts\DisplayBannerAndLaunch.bat

Linux & macOS

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