Skip to navigation

Streaming Data

View as MarkdownOpen in Claude
Market Data typically requires a paid subscription to receive real-time data. See Market Data for more information.

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.

See our Delayed Data page for more information on requesting delayed market 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.

ProductUpdate Frequency
United States Stocks, Futures, Bonds, Indices250ms
United States Options100ms
Forex5ms
All Other Products250ms

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.

reqId
int

Request identifier for tracking data.

contract
object

Contract object used for specifying an instrument.

genericTickList
string

Comma separated ids for unique data to retrieve. See Available Tick Types for all possible generic ticks.

snapshot
bool

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.

regulatorySnapshot
bool

Used to retrieve a single snapshot of paid data. Each snapshot costs $0.01. See Regulatory Snapshots for more information.

mktDataOptions
object

Internal use only.

self.reqMktData(reqId, contract, "", False, False, [])

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

Tick NameDescriptionGeneric tick requiredDelivery MethodTick Id
Disable Default Market DataDisables standard market data stream and allows the TWS & API feed to prioritize other listed generic tick types.mdoff––
Bid SizeNumber of contracts or lots offered at the bid price.–IBApi.EWrapper.tickSize0
Bid PriceHighest priced bid for the contract.–IBApi.EWrapper.tickPrice1
Ask PriceLowest price offer on the contract.–IBApi.EWrapper.tickPrice2
Ask SizeNumber of contracts or lots offered at the ask price.–IBApi.EWrapper.tickSize3
Last PriceLast price at which the contract traded (does not include some trades in RTVolume).–IBApi.EWrapper.tickPrice4
Last SizeNumber of contracts or lots traded at the last price.–IBApi.EWrapper.tickSize5
HighHigh price for the day.–IBApi.EWrapper.tickPrice6
LowLow price for the day.–IBApi.EWrapper.tickPrice7
VolumeTrading volume for the day for the selected contract.–IBApi.EWrapper.tickSize8
Close Price”The last available closing price for the previous day. For US Equities we use corporate action processing to get the closing price so the close price is adjusted to reflect forward and reverse splits and cash and stock dividends.”–IBApi.EWrapper.tickPrice9
Bid Option ComputationComputed Greeks and implied volatility based on the underlying stock price and the option bid price. See Option Greeks–IBApi.EWrapper.tickOptionComputation10
Ask Option ComputationComputed Greeks and implied volatility based on the underlying stock price and the option ask price. See Option Greeks–IBApi.EWrapper.tickOptionComputation11
Last Option ComputationComputed Greeks and implied volatility based on the underlying stock price and the option last traded price. See Option Greeks–IBApi.EWrapper.tickOptionComputation12
Model Option ComputationComputed Greeks and implied volatility based on the underlying stock price and the option model price. Correspond to greeks shown in TWS. See Option Greeks–IBApi.EWrapper.tickOptionComputation13
Open TickCurrent session’s opening price. Before open will refer to previous day. The official opening price requires a market data subscription to the native exchange of the instrument.–IBApi.EWrapper.tickPrice14
Low 13 WeeksLowest price for the last 13 weeks. For stocks only.165IBApi.EWrapper.tickPrice15
High 13 WeeksHighest price for the last 13 weeks. For stocks only.165IBApi.EWrapper.tickPrice16
Low 26 WeeksLowest price for the last 26 weeks. For stocks only.165IBApi.EWrapper.tickPrice17
High 26 WeeksHighest price for the last 26 weeks. For stocks only.165IBApi.EWrapper.tickPrice18
Low 52 WeeksLowest price for the last 52 weeks. For stocks only.165IBApi.EWrapper.tickPrice19
High 52 WeeksHighest price for the last 52 weeks. For stocks only.165IBApi.EWrapper.tickPrice20
Average VolumeThe average daily trading volume over 90 days. Multiplier of 100. For stocks only.165IBApi.EWrapper.tickSize21
Open Interest”(Deprecated not currently in use) Total number of options that are not closed.”–IBApi.EWrapper.tickSize22
Option Historical VolatilityThe 30-day historical volatility (currently for stocks).104IBApi.EWrapper.tickGeneric23
Option Implied Volatility”A prediction of how volatile an underlying will be in the future. The IB 30-day volatility is the at-market volatility estimated for a maturity thirty calendar days forward of the current trading day and is based on option prices from two consecutive expiration months.”106IBApi.EWrapper.tickGeneric24
Option Bid ExchangeNot Used.–IBApi.EWrapper.tickString25
Option Ask ExchangeNot Used.–IBApi.EWrapper.tickString26
Option Call Open InterestCall option open interest.101IBApi.EWrapper.tickSize27
Option Put Open InterestPut option open interest.101IBApi.EWrapper.tickSize28
Option Call VolumeCall option volume for the trading day.100IBApi.EWrapper.tickSize29
Option Put VolumePut option volume for the trading day.100IBApi.EWrapper.tickSize30
Index Future PremiumThe number of points that the index is over the cash index.162IBApi.EWrapper.tickGeneric31
Bid Exchange”For stock and options identifies the exchange(s) posting the bid price. See Component Exchanges”–IBApi.EWrapper.tickString32
Ask Exchange”For stock and options identifies the exchange(s) posting the ask price. See Component Exchanges”–IBApi.EWrapper.tickString33
Auction VolumeThe number of shares that would trade if no new orders were received and the auction were held now.225IBApi.EWrapper.tickSize34
Auction PriceThe price at which the auction would occur if no new orders were received and the auction were held now- the indicative price for the auction. Typically received after Auction imbalance (tick type 36)225IBApi.EWrapper.tickPrice35
Auction ImbalanceThe number of unmatched shares for the next auction; returns how many more shares are on one side of the auction than the other. Typically received after Auction Volume (tick type 34)225IBApi.EWrapper.tickSize36
Mark Price”The mark price is the current theoretical calculated value of an instrument. Since it is a calculated value it will typically have many digits of precision.”232IBApi.EWrapper.tickPrice37
Bid EFP ComputationComputed EFP bid price–IBApi.EWrapper.tickEFP38
Ask EFP ComputationComputed EFP ask price–IBApi.EWrapper.tickEFP39
Last EFP ComputationComputed EFP last price–IBApi.EWrapper.tickEFP40
Open EFP ComputationComputed EFP open price–IBApi.EWrapper.tickEFP41
High EFP ComputationComputed high EFP traded price for the day–IBApi.EWrapper.tickEFP42
Low EFP ComputationComputed low EFP traded price for the day–IBApi.EWrapper.tickEFP43
Close EFP ComputationComputed closing EFP price for previous day–IBApi.EWrapper.tickEFP44
Last TimestampTime of the last trade (in UNIX time).–IBApi.EWrapper.tickString45
ShortableDescribes the level of difficulty with which the contract can be sold short. See Shortable236IBApi.EWrapper.tickGeneric46
RT Volume (Time & Sales)“Last trade details (Including both ""Last"" and ""Unreportable Last"" trades). See RT Volume”233IBApi.EWrapper.tickString48
HaltedIndicates if a contract is halted. See Halted–IBApi.EWrapper.tickGeneric49
Bid YieldImplied yield of the bond if it is purchased at the current bid.–IBApi.EWrapper.tickPrice50
Ask YieldImplied yield of the bond if it is purchased at the current ask.–IBApi.EWrapper.tickPrice51
Last YieldImplied yield of the bond if it is purchased at the last price.–IBApi.EWrapper.tickPrice52
Custom Option ComputationGreek values are based off a user customized price.–IBApi.EWrapper.tickOptionComputation53
Trade CountTrade count for the day.293IBApi.EWrapper.tickGeneric54
Trade RateTrade count per minute.294IBApi.EWrapper.tickGeneric55
Volume RateVolume per minute.295IBApi.EWrapper.tickGeneric56
Last RTH TradeLast Regular Trading Hours traded price.318IBApi.EWrapper.tickPrice57
RT Historical Volatility30-day real time historical volatility.411IBApi.EWrapper.tickGeneric58
IB DividendsContract’s dividends. See IB Dividends.456IBApi.EWrapper.tickString59
Bond Factor MultiplierThe bond factor is a number that indicates the ratio of the current bond principal to the original principal460IBApi.EWrapper.tickGeneric60
Regulatory ImbalanceThe imbalance that is used to determine which at-the-open or at-the-close orders can be entered following the publishing of the regulatory imbalance.225IBApi.EWrapper.tickSize61
NewsContract’s news feed.292IBApi.EWrapper.tickString62
Short-Term Volume 3 MinutesThe past three minutes volume. Interpolation may be applied. For stocks only.595IBApi.EWrapper.tickSize63
Short-Term Volume 5 MinutesThe past five minutes volume. Interpolation may be applied. For stocks only.595IBApi.EWrapper.tickSize64
Short-Term Volume 10 MinutesThe past ten minutes volume. Interpolation may be applied. For stocks only.595IBApi.EWrapper.tickSize65
Delayed BidDelayed bid price. See Market Data Types.*RDDIBApi.EWrapper.tickPrice66
Delayed AskDelayed ask price. See Market Data Types.*RDDIBApi.EWrapper.tickPrice67
Delayed LastDelayed last traded price. See Market Data Types.*RDDIBApi.EWrapper.tickPrice68
Delayed Bid SizeDelayed bid size. See Market Data Types.*RDDIBApi.EWrapper.tickSize69
Delayed Ask SizeDelayed ask size. See Market Data Types.*RDDIBApi.EWrapper.tickSize70
Delayed Last SizeDelayed last size. See Market Data Types.*RDDIBApi.EWrapper.tickSize71
Delayed High PriceDelayed highest price of the day. See Market Data Types.*RDDIBApi.EWrapper.tickPrice72
Delayed Low PriceDelayed lowest price of the day. See Market Data Types*RDDIBApi.EWrapper.tickPrice73
Delayed VolumeDelayed traded volume of the day. See Market Data Types*RDDIBApi.EWrapper.tickSize74
Delayed CloseThe prior day’s closing price.*RDDIBApi.EWrapper.tickPrice75
Delayed OpenDisplays the current day’s Open price. The price will return 15 minutes after the Open price is made available.*RDDIBApi.EWrapper.tickPrice76
RT Trade Volume”Last trade details that excludes ""Unreportable Trades"". See RT Trade Volume”375IBApi.EWrapper.tickString77
Creditman mark priceNot currently available–IBApi.EWrapper.tickPrice78
Creditman slow mark priceSlower mark price update used in system calculations619IBApi.EWrapper.tickPrice79
Delayed Bid OptionComputed greeks based on delayed bid price. See Market Data Types and Option Greeks.*RDDIBApi.EWrapper.tickOptionComputation80
Delayed Ask OptionComputed greeks based on delayed ask price. See Market Data Types and Option Greeks.*RDDIBApi.EWrapper.tickOptionComputation81
Delayed Last OptionComputed greeks based on delayed last price. See Market Data Types and Option Greeks.*RDDIBApi.EWrapper.tickOptionComputation82
Delayed Model OptionComputed Greeks and model’s implied volatility based on delayed stock and option prices.*RDDIBApi.EWrapper.tickOptionComputation83
Last ExchangeExchange of last traded price–IBApi.EWrapper.tickString84
Last Regulatory TimeTimestamp (in Unix ms time) of last trade returned with regulatory snapshot–IBApi.EWrapper.tickString85
Futures Open InterestTotal number of outstanding futures contracts. *HSI open interest requested with generic tick 101588IBApi.EWrapper.tickSize86
Average Option VolumeAverage volume of the corresponding option contracts(TWS Build 970+ is required)105IBApi.EWrapper.tickSize87
Delayed Last TimestampDelayed time of the last trade (in UNIX time) (TWS Build 970+ is required)*RDDIBApi.EWrapper.tickString88
Shortable SharesNumber of shares available to short (TWS Build 974+ is required)236IBApi.EWrapper.tickSize89
ETF Nav LastThe last price of Net Asset Value (NAV). For ETFs: Calculation is based on prices of ETF’s underlying securities. For NextShares: Value is provided by NASDAQ577IBApi.EWrapper.tickPrice96
ETF Nav Frozen LastETF Nav Last for Frozen data623IBApi.EWrapper.tickPrice97
ETF Nav HighThe high price of ETF’s Net Asset Value (NAV)614IBApi.EWrapper.tickPrice98
ETF Nav LowThe low price of ETF’s Net Asset Value (NAV)614IBApi.EWrapper.tickPrice99
Estimated IPO – MidpointMidpoint is calculated based on IPO price range586IBApi.EWrapper.tickGeneric101
Final IPO PriceFinal price for IPO586IBApi.EWrapper.tickGeneric102
Delayed Yield BidDelayed implied yield of the bond if it is purchased at the current bid.*RDDIBApi.EWrapper.tickPrice103
Delayed Yield AskDelayed implied yield of the bond if it is purchased at the current ask.*RDDIBApi.EWrapper.tickPrice104
Odd Lot Bid PriceReturns bid price of odd lots. Requires TWS & API version 10.46 or higher.787IBApi.EWrapper.tickPrice105
Odd Lot Ask PriceReturns ask price of odd lots. Requires TWS & API version 10.46 or higher.787IBApi.EWrapper.tickPrice106
Odd Lot Bid SizeReturns bid size of odd lots. Requires TWS & API version 10.46 or higher.787IBApi.EWrapper.tickSize107
Odd Lot Ask SizeReturns ask size of odd lots. Requires TWS & API version 10.46 or higher.787IBApi.EWrapper.tickSize108
Odd Lot Bid ExchangeReturns exchange of lastest odd lots bid order. Requires TWS & API version 10.46 or higher.787IBApi.EWrapper.tickString109
Odd Lot Ask ExchangeReturns exchange of lastest odd lots ask order. Requires TWS & API version 10.46 or higher.787IBApi.EWrapper.tickString110

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:

ValueDescription
-1Halted status not available. Usually returned with frozen data.
0Not halted. This value will only be returned if the contract is in a TWS watchlist.
1General halt. Trading halt is imposed for purely regulatory reasons with/without volatility halt.
2Volatility halt. Trading halt is imposed by the exchange to protect against extreme volatility.

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.

Please be aware that RT Volume is not supported with Cryptocurrencies.

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

RangeDescription
Value higher than 2.5There are at least 1000 shares available for short selling.
Value higher than 1.5This contract will be available for short selling if shares can be located.
1.5 or lessContract is not available for short selling.

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.

Regulatory snapshots are not available for use with Paper accounts.

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.

Each regulatory snapshot made will incur a fee of 0.01 USD to the account.
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.
Regulatory snapshots are paced at a limit of 1 request per minute

The following table lists the cost and maximum allocation for regulatory snapshot quotes:

Listed Network FeedPrice per reqSnapshot requestPro or non-ProMax reqSnapshot request
NYSE (Network A/CTA)0.01 USDPro4500
NYSE (Network A/CTA)0.01 USDNon-Pro150
AMEX (Network B/CTA)0.01 USDPro2300
AMEX (Network B/CTA)0.01 USDNon-Pro150
NASDAQ (Network C/UTP)0.01 USDPro2300
NASDAQ (Network C/UTP)0.01 USDNon-Pro150

Receive Data

In the event subsequent orders are received with the same price value, but different size values, no new tickPrice value should be returned. Only an updated tickSize will denote that a new order was retrieved with the assumption the last tickPrice value will also correlate with the new size.

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.

tickerId
int

Request identifier used to track data.

field
int

The type of tick being received.

value
double

Return value corresponding to value. See Available Tick Types for more details.

def tickGeneric(self, reqId: TickerId, tickType: TickType, value: float):
print("TickGeneric. TickerId:", reqId, "TickType:", tickType, "Value:", floatMaxString(value))

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).

tickerId
int

Request identifier used to track data.

tickType
int

The type of the price being received (See Tick ID field in Available Tick Types).

price
double

The monetary value for the given tick type.

attribs
object

A TickAttrib object that contains price attributes such as TickAttrib::CanAutoExecute, TickAttrib::PastLimit and TickAttrib::PreOpen.

def tickPrice(self, reqId: TickerId, tickType: TickType, price: float, attrib: TickAttrib):
print(reqId, tickType, price, attrib)

EWrapper.TickSize

EWrapper.tickSize(tickerId, field, size)

Market data tick size callback. Handles all size-related ticks.

tickerId
int

Request identifier used to track data.

field
int

the type of size being received (i.e. bid size)

size
decimal

the actual size. US stocks have a multiplier of 100.

def tickSize(self, reqId: TickerId, tickType: TickType, size: Decimal):
print("TickSize. TickerId:", reqId, "TickType:", tickType, "Size: ", decimalMaxString(size))

EWrapper.TickString

EWrapper.tickString(tickerId, field, value)

Market data callback.

Every tickPrice is followed by a tickSize. There are also independent tickSize callbacks anytime the tickSize changes, and so there will be duplicate tickSize messages following a tickPrice.
tickerId
int

Request identifier used to track data.

field
int

The type of the tick being received

value
string

Variable containining message response.

def tickString(self, reqId: TickerId, tickType: TickType, value: str):
print("TickString. TickerId:", reqId, "Type:", tickType, "Value:", value)

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.

tickerId
int

Request identifier used to track data.

minTick

Minimum tick for the contract on the exchange.

bboExchange
string

Exchange offering the best bid offer.

snapshotPermissions

Based on the snapshot parameter in EClient.reqMktData.

def tickReqParams(self, tickerId:int, minTick:float, bboExchange:str, snapshotPermissions:int):
print("TickReqParams. TickerId:", tickerId, "MinTick:", floatMaxString(minTick), "BboExchange:", bboExchange, "SnapshotPermissions:", intMaxString(snapshotPermissions))

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.

reqId
int

Request identifier used to track data.

conId
int

Contract identifier of the underlying instrument which has market data.

exchange
int

Primary exchange of the underlying.

def rerouteMktDataReq(self, reqId: int, conId: int, exchange: str):
print("Re-route market data request. ReqId:", reqId, "ConId:", conId, "Exchange:", exchange)

Cancel Streaming Data

EClient.cancelMktData(tickerId)

Cancels a watchlist market data request.

tickerId
int

Request identifier used to track data.

self.cancelMktData(2001)