Timezone for HistoricalBarsRequest

I am using the HistoricalBarsRequest to get historical data for a few symbols. I am in the EST US timezone. I am currently calling it like this:

new HistoricalBarsRequest(symbols, TimeZoneInfo.ConvertTimeToUtc(startTime), TimeZoneInfo.ConvertTimeToUtc(endTime), BarTimeFrame.Minute)

I wish to get data for the symbols from 9:30 AM EST to 4PM EST. My startTime and endTime correspond to that but if I compare my bars data to the live data from that day, it doesn’t match. This is why I wanted to make sure I am passing the datetime correctly.


@kotharin Two things which may help when fetching historical market data.

  1. All input times are timezone aware. No need to convert to UTC. For example either 2022-01-13 09:30:00-0500 or 2022-01-13 14:30:00+0000 will work and represent 9:30 ET on 2022-01-13.

  2. All returned data are timezone aware and are always UTC. Convert to ET to make it more readable if desired.