-
I subscribe to a set of tickers as in the code below but it often fails with a "This event loop is already running" error. My hunch it happens when the event callbacks get triggered simultaniously.
Callstack:
Any suggestion on how to hook up multiple updateEvent callbacks and avoid this issue? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Problem was here:
self._run seems to have caused the "This event loop is already running" problem. When I resorted to use |
Beta Was this translation helpful? Give feedback.
Problem was here:
account = ib.accountSummary() ^^^^^^^^^^^^^^^^^^^ File "C:\git\Raytail.XGBoost\venv\Lib\site-packages\ib_async\ib.py", line 516, in accountSummary return self._run(self.accountSummaryAsync(account))
self._run seems to have caused the "This event loop is already running" problem. When I resorted to use
await ib.accountSummaryAsync()
instead then problem was gone.