ApiSettingsConfig

View as MarkdownOpen in Claude

ApiSettingsConfig

FieldTypeDescription
readOnlyApibooltrue indicates modifications cannot be made throuh the API.
totalQuantityForMutualFundsboolIf set to true, Mutual Fund API client can send monetary value for BUY order and NOT send CashQty, or send CashQty and NOT send totalQuantity.
downloadOpenOrdersOnConnectionboolDeclare that all open orders be returned to EWrapper.OpenOrders.
includeVirtualFxPositionsbooltrue to include VirtualFX in the EWrapper.positions reponses.
prepareDailyPnLboolPrepare profit and loss value calculations when downloading positions data.
sendStatusUpdatesForVolatilityOrdersboolReceive notifications for every
encodeApiMessagesstringDefine API message encoding. Supports “osCodePage” (For C++) or “ascii7”.
socketPortint32Supported socket port connection allowed for API connection requests.
useNegativeAutoRangeboolIf this flag is checked, orders that are automatically bound to an API client as a result of reqOpenOrders or reqAutoOpenOrders calls or system-generated orders like volatility hedging orders, will be assigned negative API Order ID numbers. If this flag is unchecked, orders bound as a result of reqOpenOrders or reqAutoOpenOrders calls will be assigned incremental API Order ID numbers. Volatility hedging orders will be assigned API Order ID numbers in the format ‘parent order API ID + 1” when possible.
createApiMessageLogFileboolToggle if an API log should be created.
includeMarketDataInLogFilebooltrue to have market data included in API logs.
exposeTradingScheduleToApiboolFlag as true to have Trader Workstation expose the complete known look-ahead trading schedule to the API, which is one week for most products. Leave unchecked to only send trading schedule for today plus the next open trading day.
splitInsuredDepositFromCashBalanceboolFalse: The API “Cash Balance” includes the “Insured Bank Deposit Sweep Program” balance. True: Report “Cash Balance” and “Insured Bank Deposit Sweep Program” balances separately in the API.
sendZeroPositionsForTodayOnlyboolTrue will return all positions that have already closed with a ‘0’ value.
letApiAccountRequestsSwitchSubscriptionboolInternal use. Market data management.
useAccountGroupsWithAllocationMethodsboolSee Unification of Groups and Profiles for details.
loggingLevelstringLevel of detail for API logs. Supports “system”, “warning”, “error”, “info” and “detail”.
masterClientIdint32The master identifier for order updates.
bulkDataTimeoutint32When amount of data sent by the Trader Workstation becomes too large, it is possible that network connection to API client cannot handle the load. Trader Workstation waits for specified amount of seconds and then disconnects API client if data cannot be sent fast enough.
componentExchSeparatorstringDelimeter for smartComponentMap
showForexDataIn1_10PipsboolTrue indicates forex market data uses 1/10 pips instead of 1/2.
allowForexTradingIn1_10PipsboolIf true, forex trades can be received in 1/10 pips instead of 1/2.
roundAccountValuesToNearestWholeNumberboolAccount values will be rounded to whole numbers instead of precise values.
sendMarketDataInLotsForUsStocksboolDeliver market data as represented in lots rather than direct share sizes.
showAdvancedOrderRejectInUiboolTrue indicates AdvancedOrderReject messages will appear in the UI instead of through the socket.
rejectMessagesAboveMaxRateboolfalse indicates the API messages above maximum allowed message rate will be paced at max-msg/second. true indicates overhead messages will be rejected instantly to ensure timely response.
maintainConnectionOnIncorrectFieldsbooltrue to maintain API connection if requests are sent with incorrect API socket attributes.
compatibilityModeNasdaqStocksboolIndicate “ISLAND” is a valid exchange value for NASDAQ listed stocks.
sendInstrumentTimezonestringHistorical data will be returned based on the indicated value. Supported values include “instrument”: representing the timezone of the instrument’s primary listing exchange; “operator”: representing the local timezone set in TWS or IBG; and “utc”: representing the Coordinated Universal Time.
sendForexDataInCompatibilityModeboolForeign exchange values will be delivered as integer rates instead of decimal.
maintainAndResubmitOrdersOnReconnectbooltrue to submit orders that attempted transmissions while disconnected from the network.
historicalDataMaxSizeint32The maximum data size for historical bars. Supports 1, 4, 16
autoReportNettingEventContractTradesboolTrue to net event contract trades
optionExerciseRequestTypestringDefinition of how options should behave when exercised.
allowLocalhostOnlyboolDetermine if API connections are only permitted from localhost. If this value is true, trustedIPs will be ignored.
trustedIPsstringA string of IP addresses that may connect to the Trader Workstation.