Requesting Histogram Data

View as MarkdownOpen in Claude

EClient.reqHistogramData (

requestId: int, id of the request

contract: Contract, Contract object that is subject of query.

useRth: bool, Data from regular trading hours (1), or all available hours (0).

period: String, string value of requested date range. This will be tied to the same bar size strings as the [historical bar sizes](/tws-api/doc/market-data-historical/historical-bars/historical-bar-sizes)
)

Returns data histogram of specified contract.

1self.reqHistogramData(4004, contract, false, "3 days")