unable to get order feed - AG8004


  • unable to get order feed
    which token shall I use? Currently I am using jwtToken.

    client id is T185904

    nodejs snippet
    Kindly review

    let initFeed = (jwt)=>{
        let web_socket = new WebSocketClient({
            clientcode: "T185904",
            jwttoken: jwt,
            apikey: PRIVATE_KEY,
            feedtype: "order_feed",
        });
        web_socket.connect()
            .then(() => {
                web_socket.fetchData("subscribe", "order_feed");  // ACTION_TYPE: subscribe | unsubscribe FEED_TYPE: order_feed
            });
        web_socket.on('tick', receiveTick);
        function receiveTick(data) {
            console.log("receiveTick:::::", data);
        }
    }
    
    //EXCEPTION
    SyntaxError: Unexpected token A in JSON at position 0
        at JSON.parse (<anonymous>)
        at WebSocket.ws.onmessage (C:\Users\tusharsingh\projects\angel_adapter\node_modules\smartapi-javasc
    ript\lib\websocket_client.js:37:43)
    
    

    data received from websocket - AG8004

    ![0_1671490135340_angel.png](Uploading 100%)