Wrong ts_init and ts_event value for Weekly historical bar data from IBKR #2379
Closed
Endura2024
started this conversation in
General
Replies: 1 comment
-
Many thanks for the fixes @Endura2024 🙏 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When use HistoricInteractiveBrokersClient to get weekly bar, the ts_init and ts_event value are not correct:
query IBKR directly for weekly data return:
date open high low close volume average barCount
...
4 2024-01-19 474.25 482.75 469.87 482.64 253556992.0 475.666 1270853
using HistoricInteractiveBrokersClient get
open high low close volume ts_event
4 474.25 482.75 469.87 482.64 253556992 1705622400000000000
ts_init ts_event_dt ts_init_dt
4 1706227200000000000 2024-01-18 19:00:00-05:00 2024-01-25 19:00:00-05:00
for debugging purposed, I converted the ts_init/event to NY local date time. The date returned by IBKR are the Friday, i.e. end date for the given bar, but it seems HistoricInteractiveBrokersClient treats the date returned by IBKR as starting time (ts_event). The date returned by IBKR for day, weekly and monthly bar are different from intraday bar:
Beta Was this translation helpful? Give feedback.
All reactions