diff --git a/dockering/ib/ibc.ini b/dockering/ib/ibc.ini index c9c06658..7915d148 100644 --- a/dockering/ib/ibc.ini +++ b/dockering/ib/ibc.ini @@ -117,9 +117,57 @@ SecondFactorDevice= # If you use the IBKR Mobile app for second factor authentication, # and you fail to complete the process before the time limit imposed -# by IBKR, you can use this setting to tell IBC to exit: arrangements -# can then be made to automatically restart IBC in order to initiate -# the login sequence afresh. Otherwise, manual intervention at TWS's +# by IBKR, this setting tells IBC whether to automatically restart +# the login sequence, giving you another opportunity to complete +# second factor authentication. +# +# Permitted values are 'yes' and 'no'. +# +# If this setting is not present or has no value, then the value +# of the deprecated ExitAfterSecondFactorAuthenticationTimeout is +# used instead. If this also has no value, then this setting defaults +# to 'no'. +# +# NB: you must be using IBC v3.14.0 or later to use this setting: +# earlier versions ignore it. + +ReloginAfterSecondFactorAuthenticationTimeout= + + +# This setting is only relevant if +# ReloginAfterSecondFactorAuthenticationTimeout is set to 'yes', +# or if ExitAfterSecondFactorAuthenticationTimeout is set to 'yes'. +# +# It controls how long (in seconds) IBC waits for login to complete +# after the user acknowledges the second factor authentication +# alert at the IBKR Mobile app. If login has not completed after +# this time, IBC terminates. +# The default value is 60. + +SecondFactorAuthenticationExitInterval= + + +# This setting specifies the timeout for second factor authentication +# imposed by IB. The value is in seconds. You should not change this +# setting unless you have reason to believe that IB has changed the +# timeout. The default value is 180. + +SecondFactorAuthenticationTimeout=180 + + +# DEPRECATED SETTING +# ------------------ +# +# ExitAfterSecondFactorAuthenticationTimeout - THIS SETTING WILL BE +# REMOVED IN A FUTURE RELEASE. For IBC version 3.14.0 and later, see +# the notes for ReloginAfterSecondFactorAuthenticationTimeout above. +# +# For IBC versions earlier than 3.14.0: If you use the IBKR Mobile +# app for second factor authentication, and you fail to complete the +# process before the time limit imposed by IBKR, you can use this +# setting to tell IBC to exit: arrangements can then be made to +# automatically restart IBC in order to initiate the login sequence +# afresh. Otherwise, manual intervention at TWS's # Second Factor Authentication dialog is needed to complete the # login. # @@ -132,29 +180,18 @@ SecondFactorDevice= ExitAfterSecondFactorAuthenticationTimeout=no -# This setting is only relevant if -# ExitAfterSecondFactorAuthenticationTimeout is set to 'yes'. -# -# It controls how long (in seconds) IBC waits for login to complete -# after the user acknowledges the second factor authentication -# alert at the IBKR Mobile app. If login has not completed after -# this time, IBC terminates. -# The default value is 40. - -SecondFactorAuthenticationExitInterval= - - # Trading Mode # ------------ # -# TWS 955 introduced a new Trading Mode combo box on its login -# dialog. This indicates whether the live account or the paper -# trading account corresponding to the supplied credentials is -# to be used. The allowed values are 'live' (the default) and -# 'paper'. For earlier versions of TWS this setting has no -# effect. +# This indicates whether the live account or the paper trading +# account corresponding to the supplied credentials is to be used. +# The allowed values are 'live' (the default) and 'paper'. +# +# If this is set to 'live', then the credentials for the live +# account must be supplied. If it is set to 'paper', then either +# the live or the paper-trading credentials may be supplied. -TradingMode= +TradingMode=paper # Paper-trading Account Warning @@ -188,7 +225,7 @@ AcceptNonBrokerageAccountWarning=yes # # The default value is 60. -LoginDialogDisplayTimeout=20 +LoginDialogDisplayTimeout=60 @@ -217,7 +254,15 @@ LoginDialogDisplayTimeout=20 # but they are acceptable. # # The default is the current working directory when IBC is -# started. +# started, unless the TWS_SETTINGS_PATH setting in the relevant +# start script is set. +# +# If both this setting and TWS_SETTINGS_PATH are set, then this +# setting takes priority. Note that if they have different values, +# auto-restart will not work. +# +# NB: this setting is now DEPRECATED. You should use the +# TWS_SETTINGS_PATH setting in the relevant start script. IbDir=/root/Jts @@ -284,15 +329,32 @@ ExistingSessionDetectedAction=primary # Override TWS API Port Number # ---------------------------- # -# If OverrideTwsApiPort is set to an integer, IBC changes the -# 'Socket port' in TWS's API configuration to that number shortly -# after startup. Leaving the setting blank will make no change to -# the current setting. This setting is only intended for use in -# certain specialized situations where the port number needs to +# If OverrideTwsApiPort is set to an integer, IBC changes the +# 'Socket port' in TWS's API configuration to that number shortly +# after startup (but note that for the FIX Gateway, this setting is +# actually stored in jts.ini rather than the Gateway's settings +# file). Leaving the setting blank will make no change to +# the current setting. This setting is only intended for use in +# certain specialized situations where the port number needs to +# be set dynamically at run-time, and for the FIX Gateway: most +# non-FIX users will never need it, so don't use it unless you know +# you need it. + +OverrideTwsApiPort=4000 + + +# Override TWS Master Client ID +# ----------------------------- +# +# If OverrideTwsMasterClientID is set to an integer, IBC changes the +# 'Master Client ID' value in TWS's API configuration to that +# value shortly after startup. Leaving the setting blank will make +# no change to the current setting. This setting is only intended +# for use in certain specialized situations where the value needs to # be set dynamically at run-time: most users will never need it, # so don't use it unless you know you need it. -; OverrideTwsApiPort=4002 +OverrideTwsMasterClientID= # Read-only Login @@ -302,11 +364,13 @@ ExistingSessionDetectedAction=primary # account security programme, the user will not be asked to perform # the second factor authentication action, and login to TWS will # occur automatically in read-only mode: in this mode, placing or -# managing orders is not allowed. If set to 'no', and the user is -# enrolled in IB's account security programme, the user must perform -# the relevant second factor authentication action to complete the -# login. - +# managing orders is not allowed. +# +# If set to 'no', and the user is enrolled in IB's account security +# programme, the second factor authentication process is handled +# according to the Second Factor Authentication Settings described +# elsewhere in this file. +# # If the user is not enrolled in IB's account security programme, # this setting is ignored. The default is 'no'. @@ -326,7 +390,44 @@ ReadOnlyLogin=no # set the relevant checkbox (this only needs to be done once) and # not provide a value for this setting. -ReadOnlyApi=no +ReadOnlyApi= + + +# API Precautions +# --------------- +# +# These settings relate to the corresponding 'Precautions' checkboxes in the +# API section of the Global Configuration dialog. +# +# For all of these, the accepted values are: +# - 'yes' sets the checkbox +# - 'no' clears the checkbox +# - if not set, the existing TWS/Gateway configuration is unchanged +# +# NB: thess settings are really only supplied for the benefit of new TWS +# or Gateway instances that are being automatically installed and +# started without user intervention, or where user settings are not preserved +# between sessions (eg some Docker containers). Where a user is involved, they +# should use the Global Configuration to set the relevant checkboxes and not +# provide values for these settings. + +BypassOrderPrecautions= + +BypassBondWarning= + +BypassNegativeYieldToWorstConfirmation= + +BypassCalledBondWarning= + +BypassSameActionPairTradeWarning= + +BypassPriceBasedVolatilityRiskWarning= + +BypassUSStocksMarketDataInSharesWarning= + +BypassRedirectOrderWarning= + +BypassNoOverfillProtectionPrecaution= # Market data size for US stocks - lots or shares @@ -381,54 +482,145 @@ AcceptBidAskLastSizeDisplayUpdateNotification=accept SendMarketDataInLotsForUSstocks= +# Trusted API Client IPs +# ---------------------- +# +# NB: THIS SETTING IS ONLY RELEVANT FOR THE GATEWAY, AND ONLY WHEN FIX=yes. +# In all other cases it is ignored. +# +# This is a list of IP addresses separated by commas. API clients with IP +# addresses in this list are able to connect to the API without Gateway +# generating the 'Incoming connection' popup. +# +# Note that 127.0.0.1 is always permitted to connect, so do not include it +# in this setting. + +TrustedTwsApiClientIPs= + + +# Reset Order ID Sequence +# ----------------------- +# +# The setting resets the order id sequence for orders submitted via the API, so +# that the next invocation of the `NextValidId` API callback will return the +# value 1. The reset occurs when TWS starts. +# +# Note that order ids are reset for all API clients, except those that have +# outstanding (ie incomplete) orders: their order id sequence carries on as +# before. +# +# Valid values are 'yes', 'true', 'false' and 'no'. The default is 'no'. + +ResetOrderIdsAtStart= + + +# This setting specifies IBC's action when TWS displays the dialog asking for +# confirmation of a request to reset the API order id sequence. +# +# Note that the Gateway never displays this dialog, so this setting is ignored +# for a Gateway session. +# +# Valid values consist of two strings separated by a solidus '/'. The first +# value specifies the action to take when the order id reset request resulted +# from setting ResetOrderIdsAtStart=yes. The second specifies the action to +# take when the order id reset request is a result of the user clicking the +# 'Reset API order ID sequence' button in the API configuration. Each value +# must be one of the following: +# +# 'confirm' +# order ids will be reset +# +# 'reject' +# order ids will not be reset +# +# 'ignore' +# IBC will ignore the dialog. The user must take action. +# +# The default setting is ignore/ignore + +# Examples: +# +# 'confirm/reject' - confirm order id reset only if ResetOrderIdsAtStart=yes +# and reject any user-initiated requests +# +# 'ignore/confirm' - user must decide what to do if ResetOrderIdsAtStart=yes +# and confirm user-initiated requests +# +# 'reject/ignore' - reject order id reset if ResetOrderIdsAtStart=yes but +# allow user to handle user-initiated requests + +ConfirmOrderIdReset= + + # ============================================================================= -# 4. TWS Auto-Closedown +# 4. TWS Auto-Logoff and Auto-Restart # ============================================================================= # -# IMPORTANT NOTE: Starting with TWS 974, this setting no longer -# works properly, because IB have changed the way TWS handles its -# autologoff mechanism. +# TWS and Gateway insist on being restarted every day. Two alternative +# automatic options are offered: # -# You should now configure the TWS autologoff time to something -# convenient for you, and restart IBC each day. +# - Auto-Logoff: at a specified time, TWS shuts down tidily, without +# restarting. # -# Alternatively, discontinue use of IBC and use the auto-relogin -# mechanism within TWS 974 and later versions (note that the -# auto-relogin mechanism provided by IB is not available if you -# use IBC). +# - Auto-Restart: at a specified time, TWS shuts down and then restarts +# without the user having to re-autheticate. +# +# The normal way to configure the time at which this happens is via the Lock +# and Exit section of the Configuration dialog. Once this time has been +# configured in this way, the setting persists until the user changes it again. +# +# However, there are situations where there is no user available to do this +# configuration, or where there is no persistent storage (for example some +# Docker images). In such cases, the auto-restart or auto-logoff time can be +# set whenever IBC starts with the settings below. +# +# The value, if specified, must be a time in HH:MM AM/PM format, for example +# 08:00 AM or 10:00 PM. Note that there must be a single space between the +# two parts of this value; also that midnight is "12:00 AM" and midday is +# "12:00 PM". +# +# If no value is specified for either setting, the currently configured +# settings will apply. If a value is supplied for one setting, the other +# setting is cleared. If values are supplied for both settings, only the +# auto-restart time is set, and the auto-logoff time is cleared. +# +# Note that for a normal TWS/Gateway installation with persistent storage +# (for example on a desktop computer) the value will be persisted as if the +# user had set it via the configuration dialog. +# +# If you choose to auto-restart, you should take note of the considerations +# described at the link below. Note that where this information mentions +# 'manual authentication', restarting IBC will do the job (IBKR does not +# recognise the existence of IBC in its docuemntation). +# +# https://www.interactivebrokers.com/en/software/tws/twsguide.htm#usersguidebook/configuretws/auto_restart_info.htm +# +# If you use the "RESTART" command via the IBC command server, and IBC is +# running any version of the Gateway (or a version of TWS earlier than 1018), +# note that this will set the Auto-Restart time in Gateway/TWS's configuration +# dialog to the time at which the restart actually happens (which may be up to +# a minute after the RESTART command is issued). To prevent future auto- +# restarts at this time, you must make sure you have set AutoLogoffTime or +# AutoRestartTime to your desired value before running IBC. NB: this does not +# apply to TWS from version 1018 onwards. -# Set to yes or no (lower case). -# -# yes means allow TWS to shut down automatically at its -# specified shutdown time, which is set via the TWS -# configuration menu. -# -# no means TWS never shuts down automatically. -# -# NB: IB recommends that you do not keep TWS running -# continuously. If you set this setting to 'no', you may -# experience incorrect TWS operation. -# -# NB: the default for this setting is 'no'. Since this will -# only work properly with TWS versions earlier than 974, you -# should explicitly set this to 'yes' for version 974 and later. - -IbAutoClosedown=yes +AutoLogoffTime= +AutoRestartTime= # ============================================================================= # 5. TWS Tidy Closedown Time # ============================================================================= # -# NB: starting with TWS 974 this is no longer a useful option -# because both TWS and Gateway now have the same auto-logoff -# mechanism, and IBC can no longer avoid this. +# Specifies a time at which TWS will close down tidily, with no restart. # -# Note that giving this setting a value does not change TWS's -# auto-logoff in any way: any setting will be additional to the -# TWS auto-logoff. +# There is little reason to use this setting. It is similar to AutoLogoffTime, +# but can include a day-of-the-week, whereas AutoLogoffTime and AutoRestartTime +# apply every day. So for example you could use ClosedownAt in conjunction with +# AutoRestartTime to shut down TWS on Friday evenings after the markets +# close, without it running on Saturday as well. # # To tell IBC to tidily close TWS at a specified time every # day, set this value to , for example: @@ -487,7 +679,7 @@ AcceptIncomingConnectionAction=reject # no means the dialog remains on display and must be # handled by the user. -AllowBlindTrading=yes +AllowBlindTrading=no # Save Settings on a Schedule @@ -530,6 +722,26 @@ AllowBlindTrading=yes SaveTwsSettingsAt= +# Confirm Crypto Currency Orders Automatically +# -------------------------------------------- +# +# When you place an order for a cryptocurrency contract, a dialog is displayed +# asking you to confirm that you want to place the order, and notifying you +# that you are placing an order to trade cryptocurrency with Paxos, a New York +# limited trust company, and not at Interactive Brokers. +# +# transmit means that the order will be placed automatically, and the +# dialog will then be closed +# +# cancel means that the order will not be placed, and the dialog will +# then be closed +# +# manual means that IBC will take no action and the user must deal +# with the dialog + +ConfirmCryptoCurrencyOrders=transmit + + # ============================================================================= # 7. Settings Specific to Indian Versions of TWS @@ -566,13 +778,17 @@ DismissNSEComplianceNotice=yes # # The port number that IBC listens on for commands # such as "STOP". DO NOT set this to the port number -# used for TWS API connections. There is no good reason -# to change this setting unless the port is used by -# some other application (typically another instance of -# IBC). The default value is 0, which tells IBC not to -# start the command server +# used for TWS API connections. +# +# The convention is to use 7462 for this port, +# but it must be set to a different value from any other +# IBC instance that might run at the same time. +# +# The default value is 0, which tells IBC not to start +# the command server #CommandServerPort=7462 +CommandServerPort=0 # Permitted Command Sources @@ -583,19 +799,19 @@ DismissNSEComplianceNotice=yes # IBC. Commands can always be sent from the # same host as IBC is running on. -ControlFrom=127.0.0.1 +ControlFrom= # Address for Receiving Commands # ------------------------------ # # Specifies the IP address on which the Command Server -# is so listen. For a multi-homed host, this can be used +# is to listen. For a multi-homed host, this can be used # to specify that connection requests are only to be # accepted on the specified address. The default is to # accept connection requests on all local addresses. -BindAddress=127.0.0.1 +BindAddress= # Command Prompt @@ -621,7 +837,7 @@ CommandPrompt= # information is sent. The default is that such information # is not sent. -SuppressInfoMessages=no +SuppressInfoMessages=yes @@ -651,10 +867,10 @@ SuppressInfoMessages=no # The LogStructureScope setting indicates which windows are # eligible for structure logging: # -# - if set to 'known', only windows that IBC recognizes -# are eligible - these are windows that IBC has some -# interest in monitoring, usually to take some action -# on the user's behalf; +# - (default value) if set to 'known', only windows that +# IBC recognizes are eligible - these are windows that +# IBC has some interest in monitoring, usually to take +# some action on the user's behalf; # # - if set to 'unknown', only windows that IBC does not # recognize are eligible. Most windows displayed by @@ -667,9 +883,8 @@ SuppressInfoMessages=no # - if set to 'all', then every window displayed by TWS # is eligible. # -# The default value is 'known'. -LogStructureScope=all +LogStructureScope=known # When to Log Window Structure @@ -682,13 +897,15 @@ LogStructureScope=all # structure of an eligible window the first time it # is encountered; # +# - if set to 'openclose', the structure is logged every +# time an eligible window is opened or closed; +# # - if set to 'activate', the structure is logged every # time an eligible window is made active; # -# - if set to 'never' or 'no' or 'false', structure -# information is never logged. +# - (default value) if set to 'never' or 'no' or 'false', +# structure information is never logged. # -# The default value is 'never'. LogStructureWhen=never @@ -708,4 +925,3 @@ LogStructureWhen=never #LogComponents= -