Common errors of connected websocket to Tradovate API

I’m working on Tradovate API for receiving the live stream data. For a long live WebSocket connection, sometimes I receive the following errors when the WebSocket is disconnected:

  • [WinError 10054] An existing connection was forcibly closed by the remote host
  • [SSL: SSLV3_ALERT_BAD_RECORD_MAC] sslv3 alert bad record mac (_ssl.c:2635)
  • [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:2635)
  • Handshake status 502 Bad Gateway

Most of the time, I can reconnect the WebSocket when it is closed. However, very rarely, I cannot reconnect it, which is related to Handshake status 502 Bad Gateway. I read about this issue on different sites and they say it is an issue on the server (Please, see this link). Is this a common problem? Can I fix this problem? Can the other errors be solved?

It’s possible that you have a protocol mismatch. Meaning your TLS version doesn’t match or isn’t compatible with the server’s accepted versions. Check the TLS version you’re using, our servers support TLS v1.1 or higher.