Websockets Authorization 1006 Error

Hi Everyone – I’m playing around and testing the Websockets functionality of the API. When I submit the plaintext string to the open websockets in order to authorize, the connection gets terminated and records an error value of 1006, which is the websockets “abnormal closure” message.

This is the string I’m submitting to the websockets connection:


access token received using the accessTokenRequest POST request, which I have running on an automated script that returns a new value for the access token upon the current time reaching the previous token’s expiration time.

Can you please post the code that you’re using?

for the authorization? I’m testing it out using wscat in node.js. this is what the terminal looks like

wscat -c wss://demo.tradovateapi.com/v1/websocket
< o
Disconnected (code: 1006, reason: “”)

ACCESS_TOKEN is the actual string thats returned as the access token. not using variable substitution at the moment, just testing

I’m having a fairly hard time being successful with wscat in general. Have you tried running a websocket from our JavaScript tutorial?

1 Like

I’ll try that next. I think it might be an issue with wscat. I’ll let you know how it works

1 Like