binance-exchange/binance-java-api

Using multi thread to stream OneSymbol in each thread or using one thread to stream many symbols

naserkaka opened this issue · 0 comments

Hi , I just need some tips about best practice. I would like to

  1. stream many different symbols with socket
  2. create a task in the socket that checks if marketprice = myTargetPrice -> send Order to Binance else end task

Which approach is recommended?
Approach 1. Using Multi-thread , each thread for streaming each Symbol and rest of the logic
Approach 2. Using One single thread that streams all the symbols in one socket and rest of the logic ?