HistoricalDataRequest

View as MarkdownOpen in Claude

HistoricalDataRequest

FieldTypeDescription
reqIdint32Unique request identifier used for tracking across EWrapper
contractContractContract object containing defining characteristics for ticker.
endDateTimestringThe request’s end date and time. This should be formatted as “YYYYMMDD HH:mm:ss TMZ” or an empty string indicates current present moment.
barSizeSettingstringThe data’s granularity or Valid Bar Sizes
durationstringSpecifies the number of seconds the order should remain active. For GTD orders only. Users that would prefer to specify an exact date should user the “GoodTillDate” parameter instead. Both values cannot be specified at the same time.
useRTHboolDeclare that the request should only include Regular Trading Hours. Extended trading hours will be excluded.
whatToShowstringData source type
formatDateint32Using 1 will return UTC time in YYYYMMDD-hh:mm:ss format. Using 2 will return epoch time
keepUpToDatebooltrue indicates that historical data should be continuously delivered to EWrapper.HistoricalDataUpdate
chartOptionsChartOptionsEntryThis is a field used exclusively for internal use

HistoricalDataRequest.ChartOptionsEntry

FieldTypeDescription
keystring
valuestring