Skip to content

Best practice solutions for a maximum stable connection!

Oliver Zehentleitner edited this page Oct 8, 2020 · 12 revisions

Here we collect all informations that help to build stable websocket connections to Binance.

  • Dont mix up stream channels too much. Even if Binance and UNICORN Binance Websocket API are supporting it, those streams are not as stable as one-channel-streams. One channel with < 1024 markets!
  • Use the stream_buffer, instead of the process_stream_data callback function.
  • Its all about CPU, network connectivity and the amount of subscriptions. If you have a lot of 1006 errors and CPU warnings in the log file, use less subscriptions or more CPU power. If your network bandwidth is not sufficient or stable enough, use a server in a data center.