Tick-By-Tick Data
Introduction
In TWS, tick-by-tick data is available in the Time & Sales Window.
- Real time tick-by-tick data is not available for options.
- The tick type field is case sensitive – it must be
BidAsk,Last,AllLast,MidPoint.AllLasthas additional trade types such as combos, derivatives, and average price trades which are not included inLast. - Tick-by-tick data not available for options.
- Tick-by-tick data for indices is only provided for CME indexes.
- Tick-by-tick data is not available for combos.
- No more than 1 tick-by-tick request can be made for the same instrument within 15 seconds.
- Time & Sales data requires a Level 1, Top Of Book market data subscription.
Halted and Unhalted ticks
- If tick has zero price, zero size and pastLimit flag is set – this is “Halted” tick.
- If tick has zero price, zero size and followed immediately after “Halted” tick – this is “Unhalted” tick.
Request Tick Data
EClient.reqTickByTickData(reqId, contract, tickType, numberOfTicks, ignoreSize)
Requests tick by tick or Time & Sales data.
unique identifier of the request.
the contract for which tick-by-tick data is requested.
tick-by-tick data type: “Last”, “AllLast”, “BidAsk” or “MidPoint”.
If a non-zero value is entered, then historical tick data is first returned via one of the Historical Time and Sales Ewrapper Methods respectively. (Max number of historical Ticks is 1000)
Omit updates that reflect only changes in size, and not price. Applicable to Bid_Ask data requests.
Python
Java
C++
C#
VB.NET
Receive Tick Data
Data is returned to unique functions based on what is requested in the whatToShow field.
- EWrapper.cancelTickByTickData() for
whatToShow=MIDPOINT - EWrapper.tickByTickBidAsk() for
whatToShow=BID_ASK - EWrapper.tickByTickAllLast() for for
whatToShow=Last
EWrapper.tickByTickAllLast
EWrapper.tickByTickAllLast(reqId, tickType, time, price, size, tickAtrribLast, exchange, specialConditions)
Returns “Last” or “AllLast” tick-by-tick real-time tick.
unique identifier of the request.
1: “Last” or 2: “AllLast”.
tick-by-tick real-time tick timestamp.
tick-by-tick real-time tick last price.
tick-by-tick real-time tick last size.
tick-by-tick real-time last tick attribs (bit 0 – past limit, bit 1 – unreported).
tick-by-tick real-time tick exchange.
tick-by-tick real-time tick special conditions. Conditions under which the operation took place.
Python
Java
C++
C#
VB.NET
EWrapper.tickByTickBidAsk
EWrapper.tickByTickBidAsk(reqId, time, bidPrice, askPrice, bidSize, askSize, tickAttribBidAsk)
Returns “BidAsk” tick-by-tick real-time tick.
unique identifier of the request.
timestamp of the tick.
bid price of the tick.
ask price of the tick.
bid size of the tick.
ask size of the tick.
tick-by-tick real-time bid/ask tick attribs (bit 0 – bid past low, bit 1 – ask past high).
Python
Java
C++
C#
VB.NET
EWrapper.tickByTickMidPoint
EWrapper.tickByTickMidPoint(reqId, time, midPoint)
Returns “MidPoint” tick-by-tick real-time tick.
Request identifier used to track data.
Timestamp of the tick.
Mid point value of the tick.
Python
Java
C++
C#
VB.NET
Cancel Tick Data
EClient.cancelTickByTickData(requestId)
Cancels specified tick-by-tick data.
Request identifier used to track data.

