dmikushin / binance-cxx-api

Binance Bincoin Exchange C++ API
MIT License
66 stars 42 forks source link

multiple streams #20

Open journeytosilius opened 3 years ago

journeytosilius commented 3 years ago

hi, is it possible to subscribe and parse different streams at the same time ? if so, can you provide with an example if possible ? Also, do you think it's safe to multi-thread ? My aim is to open one many streams per symbol and pipe the data through a local socket to another module. Thanks !

dmikushin commented 3 years ago

Hi @chromafunk Currently, websocket API is static, but it should not be hard to make it reentrant.

journeytosilius commented 3 years ago

I see ... well that's kind of important, since otherwise I need to spawn a container for each stream and the binary + libraries are already taking 27MB :/

dmikushin commented 3 years ago

Actually this is a good point, and should be on our TODO list.