python-binance icon indicating copy to clipboard operation
python-binance copied to clipboard

Question about multiple sockets usecase

Open Mitolius opened this issue 3 years ago • 2 comments

Hi,

I start a trade socket and a user data socket. My question is what happen if I infinity loop in the trade socket callback, will I receive events in the user data callback while looping in the trade socket ?

I saw that both sockets are ran in the same thread and callbacks are managed by Twisted but I'm afraid I missed something.

Greetings

Mitolius avatar Apr 12 '21 18:04 Mitolius

Were you able to resolve this? I'm trying to listen to user data streams while listening to market data at the same time

Karlheinzniebuhr avatar Mar 30 '22 14:03 Karlheinzniebuhr

I just made my callbacks threaded https://github.com/saurabhrb/python-binance/commit/3e30e3b5a577873fa975fc9d8b8578abf788f5a0

saurabhrb avatar May 29 '22 06:05 saurabhrb