It looks like you're new here. If you want to get involved, click one of these buttons!
const ws = new WebSocket(`wss://ws.kite.trade?api_key=XXXXXX&access_token=XXXXXXXXXXX&uid=${(new Date().getTime().toString())}`);
ws.binaryType = 'arraybuffer';
ws.onopen = function (evt) {
// Subscribe to quotes for INFY (408065) and TATAMOTORS (884737)
const message = { "a": "subscribe", "v": [408065, 884737] };
ws.send(JSON.stringify(message));
};
ws.onerror = function (evt) {
console.log('Error', evt)
};
ws.onmessage = (e) => {
var server_message = e.data;
console.log(server_message);
}
I'm trying to connect as shown in the code but getting this error:
If you are developing a platform for mass then you need to check with the compliance team before starting.
You can reach out to the compliance team in the above-mentioned email.