Streaming Data
Introduction
Streaming market data values correspond to data shown in Trader Workstation watchlists and is available throuh EClient.reqMktData().
This data is not tick-by-tick but consists of aggregate snapshots taken several times per second.
A set of standard tick types are returned by default with additional values available with the genericTickList field in the market data request. Most columns available through the Trader Workstation watchlist are available as a generic tick type.
Real-time data will only be delivered if an affiliated market data subscription is available to the user requesting data.
Market Data Update Frequency
Watchlist market data at Interactive Brokers is derived from time-based snapshot intervals which vary by product and region. This means that a given tick will only update as frequently as its interval allows. See the table for more details on product specifics.
Request Watchlist Data
EClient.reqMktData(reqId, contract, genericTickList, snapshot, regulatorySnapshot, mktDataOptions)
Requests real time market data. Returns market data for an instrument either in real time or 10-15 minutes delayed data.
Request identifier for tracking data.
Contract object used for specifying an instrument.
Comma separated ids for unique data to retrieve. See Available Tick Types for all possible generic ticks.
Used to retrieve a single snapshot of data for those with an existing market data subscirption. Snapshots return the most recent available data from the past 11 seconds; not all tick types may be returned. May not be submitted with a genericTickList.
Used to retrieve a single snapshot of paid data. Each snapshot costs $0.01. See Regulatory Snapshots for more information.
Internal use only.
Python
Java
C++
C#
VB.NET
Available Tick Types
The table below references which tick ID will be returned upon requesting a given generic tick.
Table Key
- Delivery Method: The Delivery Method column indicates the EWrapper function that will receive the affiliated tick.
- *RDD: These tick types are provided only when the user makes a request to EClient.reqMarketDataType(3) prior to their market data request.
- – : These ticks are returned by default and do not have any generic tick requirements.
Table of Tick Types
IB Dividends
This tick type provides four different comma-separated elements:
- The sum of dividends for the past 12 months (0.83 in the example below).
- The sum of dividends for the next 12 months (0.92 from the example below).
- The next dividend date (20130219 in the example below).
- The next single dividend amount (0.23 from the example below).
**Example:**0.83,0.92,20130219,0.23
To receive dividend information it is sometimes necessary to direct-route rather than smart-route market data requests.
Halted
The Halted tick type indicates if a contract has been halted for trading. It can have the following values:
RT Volume
The RT Volume tick type corresponds to the TWS’ Time & Sales window and contains the last trade’s price, size and time along with current day’s total traded volume, Volume Weighted Average Price (VWAP) and whether or not the trade was filled by a single market maker.
There is a setting in TWS which displays tick-by-tick data in the TWS Time & Sales Window. If this setting is checked, it will provide a higher granularity of data than RTVolume.
Example: 701.28;1;1348075471534;67854;701.46918464;true
As volume for US stocks is reported in lots, a volume of 0 reported in RTVolume will typically indicate an odd lot data point (less than 100 shares).
It is important to note that while the TWS Time & Sales Window also has information about trade conditions available with data points, this data is not available through the API. So for instance, the ‘unreportable’ trade status displayed with points in the Time & Sales Window is not available through the API, and that trade data will appear in the API just as any other data point. As always, an API application needs to exercise caution in responding to single data points.
RT Trade Volume
The RT Trade Volume is similar to RT Volume, but designed to avoid relaying back “Unreportable Trades” shown in TWS Time&Sales via the API. RT Trade Volume will not contain average price or derivative trades which are included in RTVolume.
Shortable
The shortable tick is an indicative on the amount of shares which can be sold short for the contract:
For detailed information about shortability data (shortable shares, fee rate) available outside of TWS, see Short Securities Availability
Volume Data
The API reports the current day’s volume in several ways. They are summarized as follows:
- Volume tick type 8: The ‘native volume’. This includes delayed transactions, busted trades, and combos, but will not update with every tick.
- RTVolume: highest number, includes non-reportable trades such as odd lots, average price and derivative trades.
- RTTradeVolume: only includes ‘last’ ticks, similar to number also used in charts/historical data.
Regulatory Snapshots
The fifth argument to reqMktData specifies a regulatory snapshot request to US stocks and options.
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 5th parameter in the function 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.
The following table lists the cost and maximum allocation for regulatory snapshot quotes:
Receive Data
EWrapper.TickGeneric
EWrapper.tickGeneric(tickerId, field, value)
Returns generic data back to requester. Used for an array of tick types and is used to represent general evaluations.
Request identifier used to track data.
The type of tick being received.
Return value corresponding to value. See Available Tick Types for more details.
Python
Java
C++
C#
VB.NET
EWrapper.TickPrice
EWrapper.tickPrice(tickerId, tickType, price, attribs)
Market data tick price callback. Handles all price related ticks. Every tickPrice callback is followed by a tickSize. A tickPrice value of -1 or 0 followed by a tickSize of 0 indicates there is no data for this field currently available, whereas a tickPrice with a positive tickSize indicates an active quote of 0 (typically for a combo contract).
Request identifier used to track data.
The type of the price being received (See Tick ID field in Available Tick Types).
The monetary value for the given tick type.
A TickAttrib object that contains price attributes such as TickAttrib::CanAutoExecute, TickAttrib::PastLimit and TickAttrib::PreOpen.
Python
Java
C++
C#
VB.NET
EWrapper.TickSize
EWrapper.tickSize(tickerId, field, size)
Market data tick size callback. Handles all size-related ticks.
Request identifier used to track data.
the type of size being received (i.e. bid size)
the actual size. US stocks have a multiplier of 100.
Python
Java
C++
C#
VB.NET
EWrapper.TickString
EWrapper.tickString(tickerId, field, value)
Market data callback.
Request identifier used to track data.
The type of the tick being received
Variable containining message response.
Python
Java
C++
C#
VB.NET
EWrapper.TickReqParams
EWrapper.tickReqParams(tickerId, minTick, bboExchange, snapshotPermissions)
A market data request is able to return data from multiple exchanges. After a market data request is made for an instrument covered by market data subscriptions, a message will be sent to function EWrapper.tickReqParams() with information about ‘minTick’, BBO exchange mapping, and available snapshot permissions.
The exchange mapping identifier bboExchange will be a symbol such as “a6” which can be used to decode the single letter exchange abbreviations returned to the bidExch, askExch, and lastExch fields by invoking the function EClient.reqSmartComponents().
The minTick returned to EWrapper.tickReqParams indicates the minimum increment in market data values returned to the API. It can differ from the minTick value in the ContractDetails class. For instance, combos will often have a minimum increment of 0.01 for market data and a minTick of 0.05 for order placement.
Request identifier used to track data.
Minimum tick for the contract on the exchange.
Exchange offering the best bid offer.
Based on the snapshot parameter in EClient.reqMktData.
Python
Java
C++
C#
VB.NET
EWrapper.rerouteMktDataReq
Returns conid and exchange for CFD market data request re-route. IB does not provide market data for stock and forex CFDs. When market data is requested for a CFD, a callback is made to the EWrapper.rerouteMktDataReq with details about the underlying instrument in IB’s database which does have market data.
Request identifier used to track data.
Contract identifier of the underlying instrument which has market data.
Primary exchange of the underlying.
Python
Java
C++
C#
VB.NET
Cancel Streaming Data
EClient.cancelMktData(tickerId)
Cancels a watchlist market data request.
Request identifier used to track data.

