☰
Login
Signup
Home
›
Market data (WebSockets)
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Register
Categories
Recent Discussions
Activity
Categories
15.1K
All Categories
0
Incidents
180
Node JS client
52
Go client
861
.Net API client
402
Kite Publisher
555
.Net / VBA / Excel (3rd party)
505
Algorithms and Strategies
1.1K
Java client
1.2K
API clients
410
PHP client
4.4K
Python client
365
Mobile and Desktop apps
1.5K
Market data (WebSockets)
3.7K
General
In this Discussion
May 2019
sujith
Getting "Invalid JSON message" error while connect with websocket.
V2R
May 2019
in
Market data (WebSockets)
Hi,
I am using below code for connecting websocket with API.
Its giving me error message "Invalid JSON message". Please suggest if anything wrong in code.
var conn = new WebSocket('wss://ws.kite.trade?api_key=XXXXX&access_token=XXXXXXX');
conn.onmessage = function(e){ console.log(e.data); };
conn.onopen = () => conn.send('hello');
Tagged:
WebSocket
sujith
May 2019
You can check out the documentation
here
.
Sign In
or
Register
to comment.