I'm using python to connect via websocket, but upon receiving the data Im not able to parse the binary data. any link or some sample solution will be appreciated.
@Kailash awesome.. i was preparing the same change for a pull request.Now that its coming,i will discard the commit locally.Also I noticed fetching instruments is failing and there is an exception handling missed while parsing the csv in case the csv is an empty string.Is this also taken care?If not I will submit the change tomorrow after the release
You don't have to parse it. We are doing it for you. checkout https://kite.trade//docs/pykiteconnect/#kiteconnect.WebSocket
write it to file then reda from it .
You get list of Ticks, check size and make same number of for loop and use that data. This is the only way.
https://github.com/apurvaChaudhari/KiteCore/blob/master/Core/KiteStream.cs
look at public List Getpackets()
I hope it helps you .
I m sorry I got lost in your code.. Can you please tell what does your code do?
[{'change': 0.5210918114143921, 'last_price': 8102.0, 'tradeable': True, 'instrument_token': 12217602, 'last_quantity': 150, 'ohlc': {'low': 8053.55, 'open': 8072.25, '
close': 8060.0, 'high': 8113.0}, 'buy_quantity': 244950, 'mode': 'quote', 'average_price': 8086.33, 'volume': 3669075, 'depth': {'sell': [], 'buy': []}, 'sell_quantity'
: 197325}]
how can i extract only last_price and ohlc
for tick in ticks:
print tick["last_price"]