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.
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.