var qs = getQueryStrings(); var tok1 = qs["request_token"]; var tok2="wss://websocket.kite.trade/?api_key=&user_id=&public_token="; var tok3=tok2.concat(tok1); //alert(tok3); document.getElementById('message1').innerHTML=tok3; var ws = new WebSocket(tok3); //ws.binaryType = 'arraybuffer';
@kartik.trade What is the response code from websocket.kite.trade? It should `101 Switching protocols`. You will not get a response body.
Also, I just noticed that you're doing a JSON.parse() and sending the resultant objects to the API. That is incorrect. You should send the actual JSON string to the API. So `ws.send(message)`
PS: You are passing the api_key and user_id, yes?
But can't able to get data.
Also, I just noticed that you're doing a JSON.parse() and sending the resultant objects to the API. That is incorrect. You should send the actual JSON string to the API. So `ws.send(message)`
Do you not think that you should include websocket streaming and postback in "Kite Connect PHP library"?