Skip to content

Best practice solutions for a maximum stable connection!

Oliver Zehentleitner edited this page May 9, 2024 · 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. Dont exceed the max subscription limit per stream!
  • 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.
  • Use the latest version of unicorn-binance-websocket-api