0
 def historicalDataUpdate(self, reqId, bar):
        print("HistoricalDataUpdate. ReqId:", reqId, "BarData.", bar.date, " Open:", bar.open, " High:", bar.high, " Low:", bar.low, " Close:", bar.close, " Volume:", bar.volume, " Count:", bar.barCount)

How to i change the 5 sec update time into 1 min?

Rahul Bhobe
  • 4,165
  • 4
  • 17
  • 32

1 Answers1

0

Unfortunately its not possible to receive streaming 1-minute bars from the TWS API. It would be necessary to receive data at a higher frequency and build data bars on the client side, or make historical data requests for 1 minute bars with keepUpToDate=False once per minute (in which case you would need to be sure to stay under the limit of 60 requests in 10 minutes).

http://interactivebrokers.github.io/tws-api/historical_bars.html#hd_receive

Josh
  • 706
  • 3
  • 8
  • `keepUpToDate` seems to send updates to the bar every tick but doesn't change the timestamp until the next time frame. see https://stackoverflow.com/a/62800202/2855515 for one way to make it work. – brian Jul 08 '20 at 18:42