I would like to be able to get price data of a security with EST (New York) as the timezone. My broker is Interactive Brokers. I am using python 3.5 with the IBPy library. My problem is that when I modify the 3rd argument of reqHistoricalData which controls the timezone of the data, the prices I get back are exactly the same.
How to reproduce the problem:
Appreciate any help.
The TZ just tells the IB server when to end the request. The responses will always be in GMT if you use 2 for formatDate param, or in your local time zone if you use 1.
So by using JST you tell the server to end the request about 12 hours earlier, ie. when that was the time in Japan.
In your example, I don't get the same data back. The times and prices are the same but using JST I get 12 hours less data. It's as if it converts the ending time to JST but leaves the calculated starting time in my own timezone.
Needless to say, I never use time zones and try for GMT timestamps whenever possible.