Dear Smart-API team,
Thanks for all your effort in providing this API service. Unfortunately, I am facing some difficulties regarding the "smart-order-websocket". I am trying to connect to the order status websocket in JavaScript using a WebSocket with a JWT token. My Smart-Stream WebSocket is already connected, but when I attempt to connect to the "smart-order-websocket", it throws an error.
I have tried several approaches to connect to the WebSocket using JavaScript, but all of them result in an error. Please guide me on the correct way to connect to the WebSocket with JavaScript.
Trial-Error method
new WebSocket("wss://tns.angelone.in/smart-order-update?Authorization=Bearer "+encodeURIComponent("JWT-Token-after-login-via-totp"));
new WebSocket("wss://tns.angelone.in/smart-order-update?Authorization=Bearer JWT-Token-after-login-via-totp");
new WebSocket("wss://tns.angelone.in/smart-order-update?Authorization=JWT-Token-after-login-via-totp");
new WebSocket("wss://tns.angelone.in/smart-order-updateJWT-Token-after-login-via-totp");
Is there any other way to connect "smart-order-websocket", or do I need to pass any extra parameters other than jwt-token?