forked from ib-controller/ib-controller
-
Notifications
You must be signed in to change notification settings - Fork 1
/
IBController.ini
484 lines (389 loc) · 17.7 KB
/
IBController.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
# 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.
#
# IBController 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 IBController Startup
# Settings below controls this.
# 1. IBController Startup Settings
# ----------------------------------
#
# IBController logs information during operating that can be useful when
# diagnosing problems. If set to 'yes', all logging output from
# IBController is to the console and may be directed into a file using
# the standard > or >> command line redirection operators. If set to 'no',
# output from IBController that is logged after it has loaded TWS appears
# in the TWS logfile: this helps to correlate IBController log entries with
# TWS activity. The default is 'no'.
LogToConsole=no
# IBController 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.
#
# Passwords may be specified in an 'encrypted' form. This makes
# it tricky (but by no means impossible) for someone looking at this
# file to know what your password is. It is recommended that you don't
# use this feature, because the protection it gives is minimal. Instead
# you should make sure that this .ini file is protected by your
# operating system from unauthorised access, and prefereably it
# should be encrypted.
#
# Use these settings to indicate whether the password(s) are encrypted:
#
# PasswordEncrypted
# FIXPasswordEncrypted
#
# If you want to use the encrypted form, set the relevant setting to
# 'yes', otherwise set it to 'no'. If you omit this setting, 'yes' is
# assumed.
#
# To get the encrypted form, edit the IBControllerEncrypt.bat file
# and replace "aaaaa" with your password; then run
# IBControllerEncrypt.bat to display the encrypted version of
# your password.
#
# IB API Authentication Settings
# ------------------------------
# Your TWS username:
IbLoginId=edemo
# Your TWS password (encrypted if appropriate):
IbPassword=demouser
PasswordEncrypted=no
# FIX CTCI Authentication Settings
# --------------------------------
# Your FIX CTCI username:
FIXLoginId=
# Your FIX CTCI password (encrypted if appropriate):
FIXPassword=
FIXPasswordEncrypted=yes
# 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'. Note that if the supplied credentials are for a
# paper trading account, the setting is ignored. For earlier
# versions of TWS this setting has no effect.
TradingMode=live
# 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 IBController is
# started.
IbDir=
# If you wish to store your TWS settings on IB's servers rather
# than locally on your computer, set this to 'yes'
StoreSettingsOnServer=no
# 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. 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). Also note that if two
# primary sessions are started, they will both keep reconnecting
# and disconnecting the other: therefore care needs to be exercised
# in the use of this setting. The default is 'manual'.
ExistingSessionDetectedAction=manual
# If set to 'accept', IBController automatically accepts incoming
# API connection dialogs. If set to 'reject', IBController
# 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 'accept'.
# 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=accept
# 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', IBController 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', IBController 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 ForceTwsApiPort is set to an integer, it forces IBController to
# change the TWS API Socket Port to that number shortly after
# startup. This setting is most commonly required if you are running
# multiple IBController instances for different accounts and would
# like different ports to be configured automatically (ie without you
# needing do this manually in the TWS window that IBController would
# open). Leaving the setting blank will make no change, so 4001 or
# 7496 would be the usual default (or whatever you manually change
# the port number to).
ForceTwsApiPort=
# 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
# 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 IBController 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):
#
# 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.
IbAutoClosedown=yes
# 5. TWS Tidy Closedown Time
# ----------------------------
#
# To tell IBController to tidily close TWS at a
# specified day of the week and time, 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=no
# 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 IBController 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 of 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 shart 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 reularly 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. 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. IBController Server Settings
# ---------------------------------
#
# Do NOT CHANGE THE FOLLOWING SETTINGS unless you
# intend to issue commands to IBController (for example
# using telnet). Note that these settings have nothing to
# do with running programs that use the TWS API.
# The port that IBController 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.
IbControllerPort=7462
# A comma separated list of ip addresses, or host names,
# which are allowed addresses for sending commands to
# IBController. Commands can always be sent from the
# same host as IBController is running on.
IbControlFrom=
# Specifies the IP address on which the IBController 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.
IbBindAddress=
# 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',
# IBController 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