Political, Economic and Climate Forecast Contracts Are Live -
Client Login | View Markets | Learn More

API Latest - Release Notes

10.19 - Bond Issuer Enhancements

  • Added new fields to SymbolSamples response and ReqContractDetails request.

10.18 - Support of Instrument Timezone, Display HMDS market data in shares

  • It is now possible to send date/time values in different formats: UTC format, instrument's exchange timezone and operator's timezone
  • Now historical data ticks are delivered in shares.

10.15 - MOC & MOCT Fields, new IBKRATS Order Attributes, WSH Event Filters, IPO Prices Generic Ticks

  • Support of MOT (Manual Order Time) and MOCT (Manual Order Cancel Time) fields in placeOrder/cancelOrder requests
  • Support of new offset attributes for IBKRATS Pegged-to-Best and Pegged-to-Midpoint (PEGBEST, PEGMID) orders.
  • Support for Wall Street Horizon (WSH) event data filters
  • New IPO prices generic ticks

10.14 - Advanced Order Reject, User Info

  • Support for Advanced Order Reject
  • Support for User Info

10.12 - Historical Schedules

  • Added support for historicalSchedule

10.11 - Size Rules

  • Added size rules for contractDetails and bondContractDetails

10.10 - Crypto support, WSH Calendar support, market data in shares, added attributes

  • Added support for trading cryptocurrencies
  • Support WSH meta and calendar events in API Clients.
  • Added market data in shares support for bid, ask, and last size.
  • Added PostToAts order attribute to support Reroute to SMART for IBKR ATS orders. See: https://www.interactivebrokers.com/en/index.php?f=4485
  • Added AutoCancelParent attribute to placeOrder/openOrder.
  • Duration order attribute support for GTD orders.
  • Desupport of ETradeOnly, FirmQuoteOnly and NbboPriceCap order attributes.

981 - Unification of Allocation Groups and Profiles

API clients interacting with TWS Build 983+, with the flag/checkbox "Use Account Groups with Allocation Methods" enabled, will see the following changes:

  • Both replaceFA and requestFA will send and receive unified groups/profiles list if the argument is Group.
    • Both replaceFA and requestFA will receive error if the argument is profile.
  • placeOrder will support specifying profile name as the faGroup name; faMethod may be omitted.
    • If specifying actual group name and the faMethod is blank/omitted the default method in that group will be used. Otherwise, the method in the request will be set on the order.
  • The openOrder callback will report Profile in place of Group if order was for profile
  • The following API calls, which take group name, will also accept Profile name in its place:
      • reqAccountSummary / cancelAccountSummary
      • reqPositionsMulti / cancelPositionsMulti
      • reqAccountUpdatesMulti / cancelAccountUpdatesMulti

980 - Minor Fixes for Full Functionality

Unless otherwise noted, this release requires TWS version 980 or higher.

  • Minor fixes make 980 the recommended release for full range of functionality.

979 - .Net Standard 2.0, Family Codes, Price-based Volatility, Minor Fixes

Unless otherwise noted, items below require TWS version 979 or higher.

  • .Net Standard 2.0: .Net client library targets .Net Standard 2.0
  • More complete family codes information (changes server-side)
  • Added setConnectionOptions() to python API. Now you may add the "+PACEAPI" connection option, as with other API technologies.
  • Price Based Volatility Quotes: See new available tick types 92-99 here: http://interactivebrokers.github.io/tws-api/tick_types.html
    • TWS 980+ is required for these ticks
  • Fixes: Minor fixes to python and C++ client libraries

976 - Price Management Algo, Completed Orders

Unless otherwise noted, items below require TWS version 976 or higher.

  • Price management algo: We have added support for a default value for use with our price management algo attribute. More information on IBKR's new price management algo can be found at https://www.interactivebrokers.com/en/index.php?f=15491.
  • Completed orders: The function reqCompletedOrders() allows all completed orders, whether filled or cancelled, to be returned.

975 - DDESocketBridge, New Fields in Market Depth Requests, Issues Fixed in Python and ActiveX

Unless otherwise noted, items below require TWS version 975 or higher.

  • Socket-based DDE API: We have released a new open source DDE API that can now be launched independently of TWS, and includes the same functionality of the socket APIs.
  • Market Depth Requests: A primary exchange field has been added to market depth requests to prevent ambiguity for Smart-routed depth requests.
  • Python Fix: An issue that caused automatic disconnection after 20 seconds when using Python has been fixed.
  • ActiveX Fix: In the sample ActiveX spreadsheet, the order placement and scanner subscription functions have been fixed.

974 - Shortable Shares, Smart Depth, Better Pacing and more

Unless otherwise noted, items below require TWS version 974 or higher.

  • New ShortableShares Tick Returns Exact Number of Shares Available to Short: When you use generic tick type 236 in reqMktData to request data, the exact number of shares available to short is now returned, in addition to the previous 'Shortable' tick type which indicates whether there are more than or fewer than 1000 (and that is returned by itself in response to generic tick type 236 in TWS versions lower than beta 974.1).
  • Smart Depth: The API now provides aggregated depth of market (DOM) quotes from the level 1 and level 2 feeds to which a user has subscribed, instead of requiring the API client to make reqMktDepth requests to each exchange individually. This is requested by setting the new parameter isSmartDepth in reqMktDepth to True.
  • New Parameter for Advisors: The functions reqPositionsMulti and reqAccountUpdatesMulti will no longer accept an 'account' parameter set as the empty string with Financial Advisor accounts, in order to prevent possible confusion. To request data from 'all' subaccounts, the account parameter must be defined as 'All'.
  • Better Pacing: API messages sent at a higher rate than 50/second can now be paced by TWS at the 50/second rate instead of potentially causing a disconnection. This is now done automatically by the RTD Server API and can be done with other API technologies by invoking SetConnectOptions("+PACEAPI") prior to eConnect.
  • reqHistoricalTicks in ActiveX: The function reqHistoricalTicks is now available in the ActiveX API
  • Tickets Placement via API (for OMS): Ticket placement is now supported from API clients when using TWS as an OMS.
  • Generic Filters in Scanners: Generic filters (which are not fields in the ScannerSubscription class) are now available to use with the API scanner. The new filters can be found from the API reqScannerParameters function and are added through an additional parameter in reqScannerSubscription. Requires TWS version 973 or higher.
  • Sample Spreadsheet as Class Files: The ActiveX Excel sample spreadsheet will soon be provided as class (.cls) files to improve versioning and merging into Github. To provide updates to the ActiveX sample spreadsheet, the provided decompile.vbs script should be used to update the spreadsheet decompiled vbproject files, and these files should then be committed in addition to TwsActiveX.xls.

973.07 - API Installer for RTD Server, ActiveX Issue Fixed, ContractDetails Standard Naming

  • API installer for RTD Server: API is now compatible with 64-bit Excel.
  • Fixed issue in ActiveX API with transmitting historical data and reading lastLiquidity field in execution object.
  • ContractDetails class: The field 'summary' has been renamed 'contract' in the Python, C#/.NET, C++ and ActiveX APIs to make it consistent across all the API languages (it was already 'contract' in the Java API).
  • Provide API with ability to transmit Greek values outside the range -1 to 1.
  • Renamed "DeltaNeutralContract" object to "UnderComp".
  • Updated C++ to use shared_ptr from C++ standard library.
  • Corrected overflow issue for order IDs in DDE sample spreadsheet.

These features require TWS version 971 or greater:

  • Added new "what-if" fields to the API for pre-trade initial and maintenance margin requirements.
  • "DontUseAutoPriceForHedge" added to Order class. This provides the option of explicitly setting a limit price on attached pair/FX/Beta hedges.
  • Added generic tick 105 for Average Option Volume for stocks.
  • Added delayed last timestamp.

973.06 - MiFIR Transaction Reporting Fields

Beginning with 973.06 and effective with TWS 969 and greater. For EEA investment firms required to comply with MiFIR reporting, and who have opted in to Enriched and Delegated Transaction Reporting, we have added four new order attributes to the Order class, and several new presets to TWS and IB Gateway Global Configuration.

New order attributes include:

  • mifid2DecisionMaker – Used to send "investment decision within the firm" value (if mifid2DecisionAlgo is not used).
  • mifid2DecisionAlgo – Used to send "investment decision within the firm" value (if mifid2DecisionMaker is not used).

  • mifid2ExecutionTrader – Used to send "execution within the firm" value (if mifid2ExecutionAlgo is not used).
  • midid2ExecutionAlgo - Used to send "execution within the firm" value (if mifid2ExecutionTrader is not used).

New TWS and IB Gateway Order Presets can be found in the Orders > MiFIR page of Global Configuration, and include TWS Decision-Maker Defaults, API Decision-Maker Defaults, and Executing Trader/Algo presets.

The following choices are available for the "investment decision within the firm" mifid2DecisionMaker and mifid2DecisionAlgo attributes:

  1. This field does not need to be reported if you are:
    • Using the TWS API to transmit orders, AND
    • The investment decision is always made by the client, AND
    • None of these clients are an EEA investment firm with delegated reporting selected (the "delegated reporting firm").

    You can configure the preset to indicate this via TWS Global Configuration using the Orders > MiFIR page. In this scenario, the orders for the proprietary account will need to be placed via TWS.

  2. If you are using the TWS API to transmit orders, and the investment decision is made by a person, or a group of people within a delegated reporting firm, with one person being the primary decision maker:

    • Your TWS API program can, on each order, transmit a decision maker's IB-assigned short code using the field mifid2DecisionMaker. You can define persons who can be the decision-makers via IB Account Management. To obtain the short codes that IB assigned to those persons, please contact IB Client Services.

    • If your TWS API program is unable to transmit the above field, and the investment decision is either made by, or approved by, a single person who can be deemed to be the primary investment decision maker, you can pre-configure a default investment decision-maker that will be used for orders where the above fields are not present. You must define the investment decision-maker(s) in IB Account Management, and can then configure the default investment decision-maker in TWS Global Configuration using the Orders > MiFIR page.

  3. If you are using the TWS API to transmit orders and the investment decision is made by an algorithm:

    • Your TWS API program can, on each order, transmit a decision maker's IB-assigned short code using the field mifid2DecisionAlgo. You can define algorithms that can be the decision-makers via IB Account Management. To obtain the short codes that IB assigned to those persons, please contact IB Client Services.

    • If your TWS API program is unable to transmit the above field, and/or the investment decision is made by a single or primary decision-maker algorithm, you can pre-configure a default investment decision-maker algo that will be used for orders where the above field is not sent. You must define the investment decision-maker(s) in IB Account Management, and can then configure the default investment decision-maker in TWS Global Configuration using the Orders > MiFIR page.

    • NOTE: Only ONE investment decision-maker, either a primary person or algorithm, should be provided on an order, or selected as the default.

The following choices are available for "execution within the firm" mifid2ExecutionTrader and mifid2ExecutionAlgo attributes:

  1. No additional information is needed if you are using the TWS API to transmit orders entered in a third-party trading interface, and you are the trader responsible for execution within the firm.

  2. If your TWS API program transmits orders to IB automatically without human intervention, please contact IB Client Services to register the program or programs with IB as an algo. Only the primary program or algo needs to be registered and identified. You can then configure the default in TWS Global Configuration using the Orders > MiFIR page.

  3. Your TWS API program, on each order, can transmit the IB-assigned short code of the algo or person responsible for execution within the firm using the field mifid2ExecutionAlgo (for the algorithm) or mifid2ExecutionTrader (for the person).

For more information, or to obtain short codes for persons or algos defined in IB Account Management, please contact IB Client Services.

To find out more about the MiFIR transaction reporting obligations, see the MiFIR Enriched and Delegated Transaction Reporting for EEA Investment Firms knowledge base article.

Tick-by-Tick Real-Time Data for US Stocks via API

Beginning with 973.06 and effective with TWS 969 and greater.The reqTickByTickData function provides tick-by-tick data in real time for up to five US securities.

Also Included in 973.06 Release

The following features and fixes are also available in API version 973.06:

  • Tick-by-tick midpoint;
  • Allow wrapper handlers to be per-instance methods;
  • Python: Tick-by-tick support added; new feature doc and other updates and minor changes; handle Latin-1 error messages;
  • Make DefaultEWrapper public;
  • Make Order.permid field type consistent;
  • Source /cppclient/client/EClient.h; std::auto_ptr<> has been deprecated;
  • Fixes: Fixed the formatting string for representing BarData; EDecoder.cpp : initialize mktCapPrice (fix for issue #573); Fixed bug when network packet has just 1 - 3 bytes of next message.

973.05 Contract details updates; Realized P&L; Option Greeks in RTD; 64-bit ActiveX app support; Last liquidity indicator

  • Real expiration date field has been added to ContractDetails
  • Time zone has been added to last trade date field
  • Realized P&L field has been added to P&L function
  • You can now receive option Greeks in the RTD Server API
  • We added support for compatibility of 64-bit ActiveX applications with provided API installer
  • Added Last Liquidity Indicator to execution reports

Please note that the Python API may not yet include all of these listed features. For more details, see the API Users' Guide at http://interactivebrokers.github.io/tws-api/

Tick-by-Tick Historical Market Data via API

Beginning with API v 973.04, you can now request tick-by-tick historical market data from IB's database using the function IBApi::EClient::reqHistoricalTicks. Results are returned via IBApi.EWrapper.historicalTicks, IBApi.EWrapper.historicalTicksBidAsk, and IBApi.EWrapper.historicalTicksLast, depending on the type of data requested.

For samples and more information, see http://interactivebrokers.github.io/tws-api/historical_time_and_sales.html.

Updates to TWS RTD Server for Excel

Beginning with API v 973.04, the RTD Server API now supports symbol requests for symbols that include a space, for example "BRK B." Additionally, the error message handling for RTD has been improved.

For more information, see http://interactivebrokers.github.io/tws-api/tws_rtd_server.html.

Excel ActiveX Sample Improved

Beginning with API v 973.04, the code for the ActiveX sample spreadsheet has been refactored, making the sample easier to read and extend.

To use the ActiveX sample spreadsheet, see http://interactivebrokers.github.io/tws-api/activex.html#activex_sample.

Expose Market Cap Price in Order Status Response

Beginning with API v 973.04, the order status message now includes the price at which an order has been limited for capped market orders.

Adjusted Last in API Samples

Beginning with API v 973.04, the API samples now include ADJUSTED_LAST data type for historical data to demonstrate receiving dividend-adjusted historical data.

Pre-open Bid & Ask Attributes

Beginning with API v 973.04, the tickPrice function can return preOpenBid and preOpenAsk attributes which indicate that quotes are in the exchange pre-open period.

Request Historical Data Adds keepUpToDate Field

Beginning with release 973.03 with TWS v965+, the historical data request function reqHistoricalData now requires the keepUpToDate field with a value of "true" or "false" to identify whether:

True: A subscription is made to return updates of unfinished real-time bars as they are available, or

False: All data is returned on a one-time basis.

NOTE: If True, an endDateTime cannot be specified.

For samples and more information, see http://interactivebrokers.github.io/tws-api/historical_bars.html#hd_request.

API News Headlines and Articles

Beginning with API v 973.02, four news providers now offer news articles from the API. News from the API requires separate subscriptions, and each has different data fees, than the same news services in TWS. The API functions which handle news are able to query available news provides, subscribe to news in real time to receive headlines as they are released, request specific news articles, and return a historical list of news stories that are cached in the system.

The currently available API news subscriptions include Briefing Trader, Benzinga Pro, Fly on the Wall, and Midnight Trader.

Sign up for API news through Account Management, where you can also view current subscriptions. You can also view currently subscriptions from the API using the function IBApi::EClient::reqNewsProviders:

Requesting historical news headlines: Additionally, and with the appropriate API news subscription, historical news headlines can be requested from the API using the function IBApi::EClient::reqHistoricalNews. The resulting headlines are returned to IBApi::EWrapper::historicalNews.

Requesting news articles: After requesting news headlines using one of the above functions, the body of a news article can be requested with the article ID returned by invoking the function IBApi::EClient::reqNewsArticle. The body of the news article is returned to the function IBApi::EWrapper::newsArticle.

For samples and more information, see http://interactivebrokers.github.io/tws-api/news.html.

Request Matching Symbols Ticker Search

Beginning with release 9.73.02, the function IBApi::EClient::reqMatchingSymbols can be used to search for contracts based on initial letters defining the ticker symbol. For instance, if the strings "I" or "IB" are specified to search for the IB ticker symbol "IBKR" it will be returned in the list of matching contracts.

The results are returned to IBApi::EWrapper::symbolSamples.

For samples and more information, see http://interactivebrokers.github.io/tws-api/ matching_symbols.html

Regulatory Snapshots for Stocks

Beginning with release 9.73.02, for stocks, there are individual exchange-specific market data subscriptions necessary to receive streaming quotes. For instance, for NYSE stocks this subscription is known as "Network A", for ARCA/AMEX stocks it is called "Network B" and for NASDAQ stocks it is "Network C". Each subscription is added a la carte and has a separate market data fee.

Alternatively, there is also a "US Securities Snapshot Bundle" subscription which does not provide streaming data but which allows for real time calculated snapshots of US market NBBO prices. By setting the fifth parameter in the function IBApi::EClient::reqMktData to True, a regulatory snapshot request can be made from the API. The returned value is a calculation of the current market state based on data from all available exchanges.

For more information on the US Reg Snapshot Market Data Service, see the IB Knowledge Base article.

Important: Each regulatory snapshot request will incur a fee of 0.01 USD to the account. This applies to both live and paper accounts. If the monthly fee for regulatory snapshots reaches the price of a particular 'Network' subscription, the user will automatically be subscribed to that Network subscription for continuous streaming quotes and charged the associated fee for that month. At the end of the month the subscription will be terminated. Each listing exchange will be capped independently and will not be combined across listing exchanges.

For samples and more information, see http://interactivebrokers.github.io/tws-api/md_request.html#regulatory_snapshot

Use with TWS version 966 or greater.

Get Futures Open Interest via API

Beginning with release 9.73.01 and effective with TWS version 965.1b and above, you can now receive Open Interest data for Futures via the API by sending reqMktData() and including "588" in the genericTickList parameter. Through the tickSize() callback, the futures open interest will be returned in tick type 86.

Please refer to the API Documentation for more details:

https://interactivebrokers.github.io/tws-api/tick_types.html

Request Contract Details relays Underlying Contract Info

Beginning with release 9.73.01, the function IBApi::EClient::reqContractDetails can now be used to identify the following details of the underlying contract (for derivatives):

  • underConid = The contract ID of the underlying contract.

Beginning with release 9.73.03, the function IBApi::EClient::reqContractDetails can be used to identify additional details of the underlying contract:

  • underSymbol = The symbol of the underlying contract.
  • underSecType = The security type of the underlying contract

They are returned to IBAPI::EWrapper::contractDetails

RTD Server

Beginning with release 9.73.03, use the RTD Server dynamic link library to request market data from TWS via the API using an Excel spreadsheet. Enter the following formula into an Excel spreadsheet cell:

=RTD (ProgID, Server, String1, String2, ...)

where:

  • ProgID is Tws.TwsRtdServerCtrl
  • Server is empty.
  • String1, String2...is a list of strings that represent the ticker, host/port and topics.

For example, with the first string (String1) representing a ticker in simple syntax and String2 is the bid size:

=RTD ("Tws.TwsRtdServerCtrl", , "IBM@ISLAND", "BidSize")

New Python API

Note: Requires Python 3.1 or greater.

Beginning with release 9.73.01, a new Python API client is now included. After you install this beta release on your computer, you can find Python API components in the following locations:

  • Python API sample code – located in the samples/Python folder in your API installation directory (typically IB_973)
  • Python source code – located in the source/pythonclient folder in your API installation directory

Fixes

The Linux/Mac C++ sample has been fixed.