开云体育

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

ib.reqTickers() conflicts with ib.reqTickByTickData()


 

Hello Everyone, when building the APP (not in a notebook Jupyter), if call the ib.reqTickers() after having called ib.reqTickByTickData() it goes in overflow and crashes. But, if I call reqTickers() before reqTickByTickData works perfectly! I have tried with ib.sleep(30) but nothing. Any help? Thank you.


 

These two methods are very different:
?
reqTickers(*contracts,?regulatorySnapshot=False)

Request and return a list of snapshot tickers. The list is returned when all tickers are ready.

This method is blocking.

?

reqTickByTickData(contract,?tickType,?numberOfTicks=0,?ignoreSize=False)

Subscribe to tick-by-tick data and return the Ticker that holds the ticks in ticker.tickByTicks.

?

Can you post more code snippet, and more importantly what you are trying to achieve?


 

thank you for replying, I have identified the problem: the reqTickers was nested in the reqTickByTickData, so I changed the App structure. BTW do you know the function to use for nested call (even though I remember that nested asyncio and blocking was not recommended)? best


 

Looking for this: ?