# Note that in the comments in this file, TWS refers to either the Trader
# Workstation or the Gateway for the IB API.
#
# When referred to below, the default value for a setting is the value 
# assumed if either the setting is included but no value is specified, or
# the setting is not included at all.
#
# IBC may also be used to start the FIX CTCI Gateway. All settings
# relating to this have names prefixed with FIX.
#
# The IB API Gateway and the FIX CTCI Gateway share the same code. Which 
# gateway actually runs is governed by an option on the initial gateway
# login screen. The FIX setting described under IBC Startup 
# Settings below controls this.


# 1.   IBC Startup Settings
# -------------------------


# IBC may be used to start the IB Gateway for the FIX CTCI. This
# setting must be set to 'yes' if you want to run the FIX CTCI gateway. The
# default is 'no'.

FIX=no


# 2.   Authentication Settings
# ----------------------------
#
# TWS and the IB API gateway require a single username and password.
# You may specify the username and password using the following settings:
#
#	IbLoginId
#	IbPassword
#
# Alternatively, you can specify the username and password in the command
# files used to start TWS or the Gateway, but this is not recommended for
# security reasons.
#
# If you don't specify them, you will be prompted for them in the usual 
# login dialog when TWS starts (but whatever you have specified will be 
# included in the dialog automatically: for example you may specify the
# username but not the password, and then you will be prompted for the 
# password via the login dialog). Note that if you specify either 
# the username or the password (or both) in the command file, then 
# IbLoginId and IbPassword settings defined in this file are ignored.
#
#
# The FIX CTCI gateway requires one username and password for FIX order
# routing, and optionally a separate username and password for market
# data connections. You may specify the usernames and passwords using 
# the following settings:
#
#	FIXLoginId
#	FIXPassword
#	IbLoginId	(optional - for market data connections)
#	IbPassword	(optional - for market data connections)
#
# Alternatively you can specify the FIX username and password in the 
# command file used to start the FIX CTCI Gateway, but this is not 
# recommended for security reasons.
#
# If you don't specify them, you will be prompted for them in the usual 
# login dialog when FIX CTCI gateway starts (but whatever you have 
# specified will be included in the dialog automatically: for example 
# you may specify the usernames but not the passwords, and then you will 
# be prompted for the passwords via the login dialog). Note that if you 
# specify either the FIX username or the FIX password (or both) on the 
# command line, then FIXLoginId and FIXPassword settings defined in this 
# file are ignored; he same applies to the market data username and
# password.

# IB API Authentication Settings
# ------------------------------

# Your TWS username:

IbLoginId=


# Your TWS password:

IbPassword=


# FIX CTCI Authentication Settings
# --------------------------------

# Your FIX CTCI username:

FIXLoginId=


# Your FIX CTCI password:

FIXPassword=


# 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.

TradingMode=


# 3.   TWS Startup Settings
# -------------------------
#
# Path to the directory where TWS should store its settings. This is 
# normally the folder in which TWS is installed. However you may set 
# it to some other location if you wish (for example if you want to
# run multiple instances of TWS with different settings).
#
# It is recommended for clarity that you use an absolute path. The 
# effect of using a relative path is undefined.
#
# Linux and OS X users should use the appropriate path syntax.
#
# Note that, for Windows users, you MUST use double separator 
# characters to separate the elements of the folder path: for
# example, IbDir=C:\\IBLiveSettings is valid, but
# IbDir=C:\IBLiveSettings is NOT valid and will give unexpected 
# results. Linux and OS X users need not use double separators,
# but they are acceptable.
#
# The default is the current working directory when IBC is
# started.

IbDir=


# If you wish to store a copy of your TWS settings on IB's 
# servers as well as locally on your computer, set this to 
# 'yes': this enables you to run TWS on different computers 
# with the same configuration, market data lines, etc. If set 
# to 'no', running TWS on different computers will not share the 
# same settings. If no value is specified, TWS will obtain its 
# settings from the same place as the last time this user logged
# in (whether manually or using IBC).

StoreSettingsOnServer=


# Set to 'yes' to minimise TWS when it starts:

MinimizeMainWindow=no


# When TWS logs on it checks to see whether the account is already 
# logged in at another computer. If so it displays a dialog: this 
# setting instructs TWS how to proceed.  
#
#   * If set to 'primary', TWS ends the existing session and 
#     continues with the new session. Note however that if the 
#     existing session was also a primary, then the original session 
#     will continue, and the new session is terminated.
# 
#   * If set to 'primaryoverride', TWS ends the existing session and 
#     continues with the new session, unless the original session 
#     was primary, in which case the original session continues. 
#
#     Note that 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.
# 
#   * If set to 'secondary', TWS exits so that the existing session 
#     is unaffected. 
#
#   * If set to 'manual', the user must handle the dialog. 
#
# Note that 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). 
#
# The default is 'manual'. 

ExistingSessionDetectedAction=primary


# If set to 'accept', IBC automatically accepts incoming 
# API connection dialogs. If set to 'reject', IBC
# automatically rejects incoming API connection dialogs. If 
# set to 'manual', the user must decide whether to accept or reject
# incoming API connection dialogs. The default is 'manual'.
# NB: it is recommended to set this to 'reject', and to explicitly
# configure which IP addresses can connect to the API in TWS's API
# configuration page, as this is much more secure (in this case, no
# incoming API connection dialogs will occur for those IP addresses). 

AcceptIncomingConnectionAction=manual


# NB: ShowAllTrades is deprecated starting with TWS 955. This is
# because IB have changed the Trades window in such a way that it
# is no longer possible to programmatically set the desired option.
# However the user's setting is now persisted within and across
# TWS sessions, so ShowAllTrades is no longer really needed. If 
# ShowAllTrades is set to 'yes', it will have no observable effect.
#
# The following description applies to TWS versions BEFORE TWS 955:
#
# If ShowAllTrades is set to 'yes', IBC causes TWS to 
# display the Trades log at startup, and sets the 'All' checkbox
# to ensure that the API reports all executions that have occurred
# during the past week. Moreover, any attempt by the user to change
# any of the 'Show trades' checkboxes is ignored; similarly if the
# user closes the Trades log, it is immediately re-displayed with 
# the 'All' checkbox set. If set to 'no', IBC does not
# interact with the Trades log, and only the current session's
# executions are returned via the API (unless the user changes the
# Trades log checkboxes). The default is 'no'.

ShowAllTrades=no


# 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 
# be set dynamically at run-time: most users will never need it,
# so don't use it unless you know you need it.

OverrideTwsApiPort=4001


# If ReadOnlyLogin is set to 'yes', and the user is enrolled in IB's
# account security programme, the user will not be asked to supply 
# the security code, 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 supply the relevant security
# code to complete the login. If the user is not enrolled in IB's
# account security programme, this setting is ignored. The default
# is 'no'.

ReadOnlyLogin=no


# 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.
# NB: this setting is really only supplied for the benefit of new TWS 
# or Gateway instances that are being automatically installed and 
# started without user intervention (eg Docker containers). Where
# a user is involved, they should use the Global Configuration to 
# set the relevant checkbox (this only needs to be done once) and
# not provide a value for this setting.

ReadOnlyApi=no

# Logging in to a paper-trading account results in TWS displaying
# a dialog asking the user to confirm that they are aware that this
# is not a brokerage account. Until this dialog has been accepted,
# TWS will not allow API connections to succeed. Setting this 
# to 'yes' (the default) will cause IBC to automatically
# confirm acceptance. Setting it to 'no' will leave the dialog
# on display, and the user will have to deal with it manually.

AcceptNonBrokerageAccountWarning=yes


# 4.   TWS Auto-Closedown
# -----------------------
#
# Set to yes or no (lower case). Only affects TWS, not the Gateway.
#
#   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.
# 
# Starting with TWS 974, this setting no longer works properly,
# because IB have changed the way TWS handles its autologoff 
# mechanism. You should now configure the TWS autologoff time 
# to something convenient for you, and restart IBC each day.
# Alternatively, discontinue use of IBC and use the autorestart
# mechanism within TWS 974 and later versions.

IbAutoClosedown=yes



# 5.   TWS Tidy Closedown Time
# ----------------------------
#
# NB: starting with TWS 974 this is no longer a useful option 
# for TWS, because of changes in TWS 974's autologoff handling.
# However it can still be useful with the Gateway.
#
# To tell IBC to tidily close TWS at a specified time every 
# day, set this value to <hh:mm>, for example: 
# ClosedownAt=22:00
#
# To tell IBC to tidily close TWS at a specified day and time 
# each week, set this value to <dayOfWeek hh:mm>, for example: 
# ClosedownAt=Friday 22:00
#
# Note that the day of the week must be specified using your
# default locale. Also note that Java will only accept 
# characters encoded to ISO 8859-1 (Latin-1). This means that
# if the day name in your default locale uses any non-Latin-1
# characters you need to encode them using Unicode escapes
# (see http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#3.3
# for details). For example, to tidily close TWS at 12:00 on
# Saturday where the default locale is Simplified Chinese,
# use the following:
# #ClosedownAt=\u661F\u671F\u516D 12:00

ClosedownAt=



# 6.   Other TWS Settings
# -----------------------
# 
# If you attempt to place an order for a contract for which
# you have no market data subscription, TWS displays a dialog
# to warn you against such blind trading.
#
#   yes   means the dialog is dismissed as though the user had
# 	  clicked the 'Ok' button: this means that you accept
# 	  the risk and want the order to be submitted.
#
#   no    means the dialog remains on display and must be
#         handled by the user.

AllowBlindTrading=yes


# Indian versions of TWS may display a password expiry 
# notification dialog and a NSE Compliance dialog. These can be 
# dismissed by setting the following to yes. By default the 
# password expiry notice is not dismissed, but the NSE Compliance 
# notice is dismissed. 

# Warning: setting DismissPasswordExpiryWarning=yes will mean 
# you will not be notified when your password is about to expire.
# You must then take other measures to ensure that your password
# is changed within the expiry period, otherwise IBC will
# not be able to login successfully.

DismissPasswordExpiryWarning=no
DismissNSEComplianceNotice=yes


# Since TWS 906, orders placed using the BookTrader have to be confirmed
# via a dialog box (this was due to a legal dispute between IB and Trading
# Technologies who claimed IB were infringing a patent). If
# AutoConfirmOrders=yes, then when orders are placed using the BookTrader,
# the confirmation dialog is automatically handled, thereby effectively
# restoring the one-click trading. The default is 'no', requiring the user
# to manually confirm each trade.
#
# NB: this setting has been removed as the dispute has been resolved and
# TWS users now have the option to request the order confirmation dialog
# to not be displayed.
#
#AutoConfirmOrders=no


# You can tell TWS to automatically save its settings on a schedule
# of your choosing. You can specify one or more specific times,
# like this:
#
# SaveTwsSettingsAt=HH:MM [ HH:MM]... 
#
# for example:
# SaveTwsSettingsAt=08:00   12:30 17:30
# 
# Or you can specify an interval at which settings are to be saved,
# optionally starting at a specific time and continuing until another
# time, like this:
#
#SaveTwsSettingsAt=Every n [{mins | hours}] [hh:mm] [hh:mm]
#
# where the first hh:mm is the start time and the second is the end 
# time. If you don't specify the end time, settings are saved regularly
# from the start time till midnight. If you don't specify the start time.
# settings are saved regularly all day, beginning at 00:00. Note that 
# settings will always be saved at the end time, even if that is not 
# exactly one interval later than the previous time. If neither 'mins'
# nor 'hours' is specified, 'mins' is assumed. Examples:
#
# To save every 30 minutes all day starting at 00:00
#SaveTwsSettingsAt=Every 30
#SaveTwsSettingsAt=Every 30 mins
#
# To save every hour starting at 08:00 and ending at midnight
#SaveTwsSettingsAt=Every 1 hours 08:00
#SaveTwsSettingsAt=Every 1 hours 08:00 00:00
#
# To save every 90 minutes starting at 08:00 up to and including 17:43
#SaveTwsSettingsAt=Every 90 08:00 17:43

SaveTwsSettingsAt=



# 6.   IBC Command Server Settings
# --------------------------------
#
# Do NOT CHANGE THE FOLLOWING SETTINGS unless you
# intend to issue commands to IBC (for example
# using telnet). Note that these settings have nothing to
# do with running programs that use the TWS API.

# The port 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

#CommandServerPort=7462


# A comma separated list of ip addresses, or host names,
# which are allowed addresses for sending commands to 
# IBC.  Commands can always be sent from the
# same host as IBC is running on.

ControlFrom=


# Specifies the IP address on which the Command Server
# 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=


# The specified string is output by the server when
# the connection is first opened and after the completion
# of each command. This can be useful if sending commands
# using an interactive program such as telnet. The default
# is that no prompt is output.
# For example:
#
# CommandPrompt=>

CommandPrompt=


# Some commands can return intermediate information about
# their progress. This setting controls whether such
# information is sent. The default is that such information
# is not sent.

SuppressInfoMessages=yes



# 7.   Diagnostic Settings
# ------------------------

# If LogComponents is set to 'open' or 'yes' or 'true',
# IBC logs information about the structure of each
# TWS window it detects the first time it is encountered. If
# set to 'activate', the information is logged every time
# a TWS window is made active. If set to 'never' or 'no' or
# 'false', this information is never logged. The default is
# 'never'.
#
# The logged information shows the hierarchical organisation 
# of all the components of the window, and includes the
# current values of text boxes and labels.
#
# Note that when set to 'open', 'activate' or 'yes', there is
# a small performance impact due to the extra logging. Also
# logfile size may be significantly increased, especially if
# set to 'activate' and the user is actively using TWS. It
# is therefore recommended that the setting be left at 'no' 
# unless there is a specific reason that this information is
# needed.

LogComponents=never

