Earliest Data Point
Introduction
EClient.reqHeadTimestamp() is used to find the first available point of data for a given whatToShow value. This data can then be used in tandem with EClient.reqHistoricalBars() or EClient.reqHistoricalTicks()
ReqHeadTimeStamp counts as an ongoing historical data request. As a result, users should always:
- Cancel timestamp requests using EClient.cancelHeadTimeStamp().
- All
EClient.reqHeadTimestamp()requests follow the 30 second bar limitations, regardless of which bar size value has been requested.
Request HeadTimeStamp
EClient.reqHeadTimestamp (tickerId, contract, whatToShow, useRTH, formatDate)
Returns the timestamp of earliest available historical data for a contract and data type.
A unique identifier which will serve to identify the incoming data.
The IBApi.Contract you are interested in.
The type of data to retrieve. See Historical Data Types
Whether (1) or not (0) to retrieve data generated only within Regular Trading Hours (RTH)
Using 1 will return UTC time in YYYYMMDD-hh:mm:ss format. Using 2 will return epoch time.
Python
Java
C++
C#
VB.NET
Receive HeadTimeStamp
EWrapper.headTimestamp(requestId, headTimestamp)
The data requested will be returned to EWrapper.headTimeStamp.
Request identifier used to track data.
Value identifying earliest data date
Python
Java
C++
C#
VB.NET
Cancel HeadTimeStamp
EWrapper.cancelHeadTimeStamp(tickerId)
A reqHeadTimeStamp request can be cancelled with EClient.cancelHeadTimestamp
Request identifier used to track data.

