IBKR not getting live data
I have been unable to get LIVE data from IBKR. Am trading ES futures.
I can get historical data. That all works fine, but once i try to get LIVE data the feed is stuck on DELAYED, and I'm not getting any data at all.
I have looked in earlier topics and I did see the issue come up, but I didn't see a solution that worked for me. Any ideas would be greatly appreciated.
The main part of my code
cerebro = bt.Cerebro(stdstats=True, tradehistory=True) store = bt.stores.IBStore(host="127.0.0.1", port=7497, clientId=35) cerebro.broker = store.getbroker() stockkwargs = dict( timeframe = bt.TimeFrame.Ticks, useRTH = False, rtBar = False, #backfill_start=False, #backfill=False #historical = True, # only historical download #fromdate = fromdate, # get data from.. #todate = todate, ) data = store.getdata(dataname='ES-FUT-GLOBEX-USD-202212-50', **stockkwargs) cerebro.resampledata(data, timeframe=bt.TimeFrame.Seconds, compression=10) cerebro.addwriter(bt.WriterFile, csv=True, out='output.csv'.format('ES')) cerebro.addstrategy(Levels) cerebro.addobserver(bt.obs.Trades) cerebro.addanalyzer(trade_list, _name="trade_list") result = cerebro.run()
Not sure how to edit. But I forgot to add that the above I'm running on my paper account. I do however have a funded account and market data subscriptions, so I do get live futures data on the paper account in TWS.
I just made a through post for this
related posts [106455, 10384, 12483, 6138, 6522106455, 10384, 12483, 6138, 6522]
It is possible the answer is an update to IB API that doesn't accept GMT timezone for backfilling. (after version 10.16)
currently the only fix I could find is to remove backfilling.
setting the data args
backfill_start=False, backfill=Falsefixes the hanging problem but creates other problems if backfilling data is required for indicators
This post is deleted!