开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Error Code -> 366 w/ reqHistoricalData() in ib_insync for realtime stream


 

Hi,
?
Anyone else seeing this error start popping up today? Only started since about 3 P.M. The contract is valid and has been working since this morning. This is through ib_insync and is using callbacks with self.ib.run() following the call below catching event updates. Here is the following error:
?
reqHistoricalData: Timeout for Future(conId=563947733, symbol='NQ', lastTradeDateOrContractMonth='20241220', multiplier='20', exchange='CME', currency='USD', localSymbol='NQZ4', tradingClass='NQ')
Error 366, reqId 5: No historical data query found for ticker id:5, contract: Future(conId=563947733, symbol='NQ', lastTradeDateOrContractMonth='20241220', multiplier='20', exchange='CME', currency='USD', localSymbol='NQZ4', tradingClass='NQ')
?
Call:
bars = self.ib.reqHistoricalData(
self.contract,
endDateTime='',
durationStr='1 D',
barSizeSetting='5 mins',
whatToShow='Trades',
useRTH=False,
formatDate=1,
keepUpToDate=True
)
#event handler for updates to realtime historical OHLC data...
bars.updateEvent += self.OnBarUpdate
?

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