If you are an institution, click below to learn more about our offerings for RIAs, Hedge Funds, Compliance Officers and more.

API Build 9.71 - Release Notes

Use Native Index Prices

API users running TWS/IB Gateway 950 or above can now elect to show Native index prices when available. Currently the calculated index price is used by default. To change the preference to show native prices in the IB Gateway, in Configuration on the API Settings page, select Prefer Native Index Prices to show the exchange-native index price whenever it's available. If the API is running through TWS, the setting is defined in Global Configuration on the Display > Ticker Row page.

New API Requests and Callbacks

The following API requests and callbacks have been added:

API requests used to integrate with TWS color-grouped windows (display groups):

  • queryDisplayGroups(int requestId)
    where
    requestId = The unique number that will be associated with the response
  • subscribeToGroupEvents(int requestId, int groupId)
    where
    requestId = The unique number associated with the notification.
    groupId = The ID of the group, currently it is a number from 1 to 7.
    This is the display group subscription request sent by the API to TWS.
  • updateDisplayGroup(int requestId, String contractInfo)
    where
    requestId = The requestId specified in subscribeToGroupEvents().
    contractInfo = The encoded value that uniquely represents the contract in IB. Possible values include:
    • none = empty selection
    • contractID@exchange – any non-combination contract. Examples: 8314@SMART for IBM SMART; 8314@ARCA for IBM @ARCA.
    • combo = if any combo is selected.
    This request from the API does not get a response from TWS unless an error occurs.
  • unsubscribeFromGroupEvents(int requestId)
    where
    requestId = The requestId specified in subscribeToGroupEvents().
    This request from the API does not get a response from TWS.

TWS color-grouped windows are identified by an integer number. Currently that number ranges from 1 to 7 and are mapped to specific colors, as indicated in TWS.

Callbacks used to integrate with TWS color-grouped windows:

  • displayGroupList(int requestId, String groups)
    where
    requestId = The requestId specified in queryDisplayGroups().
    groups = A list of integers representing visible group ID separated by the “|” character, and sorted by most used
    group first. This list will not change during TWS session (in other words, user cannot add a new group; sorting can change though). Example: “3|1|2”
    This callback is a one-time response to queryDisplayGroups().
  • displayGroupUpdated(int requestId, String contractInfo)
    where
    requestId = The requestId specified in subscribeToGroupEvents().
    contractInfo = The encoded value that uniquely represents the contract in IB. Possible values include:
    • none = empty selection
    • contractID@exchange – any non-combination contract. Examples: 8314@SMART for IBM SMART; 8314@ARCA for IBM @ARCA.
    • combo = if any combo is selected.
    This is sent by TWS to the API client once after receiving the subscription request subscribeToGroupEvents(), and will be sent again if the selected contract in the subscribed display group has changed.

New Parameters

Beginning with this release, the following parameters were added to existing requests to support the identification of manual orders and market data requests to TWS:

Request New Parameter
reqMktData() List mktDataOptions
reqScannerSubscription() List scannerDataOptions
reqMktDepth() List marketDepthOptions
reqRealTimeBars() List realTimeBarsOptions

We've also added a new field called algoId to the Order object to identify those orders generated by algorithmic trading.

ActiveX Component Migration

Beginning with this release, the ActiveX component code base has been moved from C++ to C#. The ActiveX COM interface has been refactored into its own VS solution.

DDE for Excel API Update - "set" Keyword

Beginning with this release, we now use the “set” keyword for object assignments in the DDE for Excel API. The “set” keyword sets a variable by object reference instead of by value. This change was required by the ActiveX component migration.

For example:

a = tws.createTagValueList()

has been changed to:

set a = tws.createTagValueList()

The risk of loss in online trading of stocks, options, futures, currencies, foreign equities, and fixed income can be substantial. Options are not suitable for all investors. For more information read the "Characteristics and Risks of Standardized Options". For a copy click here.

Your capital is at risk and your losses may exceed the value of your original investment.

Interactive Brokers (U.K.) Limited is authorised and regulated by the Financial Conduct Authority. FCA Reference Number 208159.

Interactive Brokers LLC is regulated by the US SEC and CFTC and is a member of the SIPC (www.sipc.org) compensation scheme;
products are only covered by the UK FSCS in limited circumstances.

Before trading, customers must read the relevant risk disclosure statements on our Warnings and Disclaimers page.

For a list of IBG memberships worldwide, click here.