¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: How to get RTH bars


 

¿ªÔÆÌåÓý

What is the ticker???

Mel





-------- Original message --------
From: "R Malhotra via groups.io" <rachan.malhotra@...>
Date: 2024-09-28 8:41 p.m. (GMT-08:00)
Subject: [ib-async] How to get RTH bars

I'm using the code below to get 1 hour bars, but noticed that the last bar of the previous day is for the 7pm hour, not the 3pm hour, despite setting useRTH to True. Anyone know why that would be?
?
Thanks!
?
bars_hist_1h = ib.reqHistoricalData(
? ? contract,
? ? endDateTime='',
? ? durationStr='2 W',
? ? barSizeSetting='1 hour',
? ? whatToShow='TRADES',
? ? useRTH=True,
? ? keepUpToDate=False,
? ? formatDate=2)

Join [email protected] to automatically receive all group messages.