# Common errors of connected websocket to Tradovate API

**URL:** <https://community.tradovate.com/t/common-errors-of-connected-websocket-to-tradovate-api/3917>\
**Category:** Community Support\
**Created:** [February 5, 2022, 8:13pm UTC](https://community.tradovate.com/t/common-errors-of-connected-websocket-to-tradovate-api/3917 "2022-02-05T20:13:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ALI\_ESLAMI](https://avatars.discourse-cdn.com/v4/letter/a/7bcc69/32.png) [@ALI\_ESLAMI](https://community.tradovate.com/u/ALI_ESLAMI)\
**Post date:** [February 5, 2022, 8:13pm UTC](https://community.tradovate.com/t/common-errors-of-connected-websocket-to-tradovate-api/3917/1 "2022-02-05T20:13:23Z")

</div>

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](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/502)). Is this a common problem? Can I fix this problem? Can the other errors be solved?

---

<div class="post-metadata">

**Author:** ![Alexander](https://sea1.discourse-cdn.com/flex015/user_avatar/community.tradovate.com/alexander/32/988_2.png) [@Alexander](https://community.tradovate.com/u/Alexander)\
**Post date:** [February 7, 2022, 1:58pm UTC](https://community.tradovate.com/t/common-errors-of-connected-websocket-to-tradovate-api/3917/2 "2022-02-07T13:58:22Z")

</div>

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.
