401 error when not using demo

When I use the demo credentials and demo websocket endpoints, the orders work just fine. Changing to the name and userId returned from the api request, I can authorize but sending orders return a 401 error.

Any assistance with this?

The only difference is that I change from my demo credentials and I also use the below websocket endpoints.


'api_wss': 'wss://live.tradovateapi.com/v1/websocket', 
'md_wss': 'wss://md.tradovateapi.com/v1/websocket',

Seems like the entire system is down… Nope, just the live environment…

Can you share a full log of the error please?

There was no log per se. I could bring up the websockets and authorize with 200 response but after that all other api called failed.

It seems like there were some technical difficulties earlier because all the live platforms were down for me but now they are back up.

Hey @beebee, is this still an issue or did the problem resolve when the platform came back up for you?

The issue went away. I think I spend way too many hours connected to your servers because I can often tell when you guys go down for maintenance.

That’s possible. Make sure you always are using a valid token. Check the local time against the token’s expiry periodically and call out to auth/renewAccessToken when it’s close - the token renewal endpoint requires a valid token. Also make sure you have a ‘reconnect’ or connection-lost’ type of procedure set up for unexpected WebSocket closure.