☰
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
12.5K
All Categories
100
Node JS client
35
Go client
741
.Net API client
345
Kite Publisher
528
.Net / VBA / Excel (3rd party)
411
Algorithms and Strategies
920
Java client
958
API clients
389
PHP client
3.5K
Python client
318
Mobile and Desktop apps
1.2K
Market data (WebSockets)
3K
General
In this Discussion
November 2020
crazy_donke
July 2020
Ysads98rja
July 2020
sujith
WebSocket streaming
Ysads98rja
July 2020
edited July 2020
in
Market data (WebSockets)
Using python for WebSocket stream data
while True:
ws.recv()
I'm getting data in bytes. But, unable to decode it. Used ws.recv().decode("utf-8") , brotli.decompress(ws.recv()). Any help?
One of the frame is as follows:
b"\x00\x02\x00\xb8\x00\r\x80\x01\x00\x00(}\x00\x00\x00,\x00\x00(_\x01W#\x1a\x00,\xc7h\x008\\\xa3\x00\x00(\xa0\x00\x00(\xe6\x00\x00'\xf6\x00\x00(}_#\xcf\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00_#\xcf\xdc\x00\x00Kp\x00\x00(x\x00+\x00\x00\x00\x00jA\x00\x00(s\x00:\x00\x00\x00\x00\x9a\x11\x00\x00(n\x00O\x00\x00\x00\x00k\x16\x00\x00(i\x00%\x00\x00\x00\x00\xa0\x06\x00\x00(d\x003\x00\x00\x00\x00\x08\xd7\x00\x00(}\x00\x06\x00\x00\x00\x00\x91\xde\x00\x00(\x82\x00<\x00\x00\x00\x00\x80\xa8\x00\x00(\x87\x00\x1f\x00\x00\x00\x00\xfad\x00\x00(\x8c\x00N\x00\x00\x00\x00\xc6\x86\x00\x00(\x91\x00U\x00\x00\x00\xb8\x00\x06:\x01\x00\x01wx\x00\x00\x00?\x00\x01}\x13\x00\x82\x9c9\x00\x06\xe1\xdf\x00\x10 \x82\x00\x01z\x9d\x00\x01\x81U\x00\x01wx\x00\x01w\x91_#\xcf\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00_#\xcf\xdc\x00\x00\x03\xd5\x00\x01wx\x00\x03\x00\x00\x00\x00\x02\xc5\x00\x01ws\x00\x05\x00\x00\x00\x00\x01\xe4\x00\x01wn\x00\n\x00\x00\x00\x00\x01\x95\x00\x01wi\x00\n\x00\x00\x00\x000\xfb\x00\x01wd\x00|\x00\x00\x00\x00\x00\x10\x00\x01w\x87\x00\x02\x00\x00\x00\x00\x02e\x00\x01w\x8c\x00\x04\x00\x00\x00\x00\x00\x02\x00\x01w\xa0\x00\x02\x00\x00\x00\x00\x00\x1a\x00\x01w\xa5\x00\x02\x00\x00\x00\x00\x00\xf7\x00\x01w\xaa\x00\x07\x00\x00"
Tagged:
webSocket python
decode
sujith
July 2020
You can refer to the documentation
here
.
You may also check out the pykiteconnect repository to know more about the binary data parsing of Websocket API.
Ysads98rja
July 2020
Yes, I just decoded it. Will try tomorrow to get live data. Thanks.
crazy_donke
November 2020
How did you decode the above byte stream ?
Sign In
or
Register
to comment.
You may also check out the pykiteconnect repository to know more about the binary data parsing of Websocket API.