zerodha / pykiteconnect

The official Python client library for the Kite Connect trading APIs
MIT License
996 stars 472 forks source link

option chain volume for live data #153

Closed Lakshmi9787 closed 2 years ago

Lakshmi9787 commented 2 years ago

hi, i enrolled for kite connect api. when i write a code for live option chain feed. i'm not getting volume in my excel. but i'm getting remaining all oi, last price, change but why i'm not getting volume data. could you please help me through this issue. here i'm attaching the volume code.

def stream(dict):

oi = dict.get('oi')
ltp = dict.get('last_price')
change = dict.get('change')
vol = dict.get('volume')
inst_token = dict.get('instrument_token')
strike = strike_list[inst_token]
row = row_list[strike]

in this code i'm getting all data except volume. if i run a code on a particular strike there i'm getting volume. but here i'm not getting it...

ranjanrak commented 2 years ago

when i write a code for live option chain feed

Are you using WebSocket streaming?

Also, can you let us know the trading symbol/instrument_token for which you are not getting volume data?

Lakshmi9787 commented 2 years ago

when i write a code for live option chain feed

Are you using WebSocket streaming?

Also, can you let us know the trading symbol/instrument_token for which you are not getting volume data?

No i'm not using websocket i'm using api only. and i'm not getting volume for nifty options

Lakshmi9787 commented 2 years ago

As i tried to write a python code for Nifty Options, i'm getting oi ltp ltp change and all, but i'm getting volume and iv data as zero. Could you please guide me to get that data as i'm a new to programming.

ranjanrak commented 2 years ago

but i'm getting volume and iv data as zero

Kiteconnect doesn't provide IV(implied volatility) data. For a list of available quote response attributes, you can refer to the doc here. And volume might be zero, as an illiquid contract. So, we asked you above to let us know the trading symbol/instrument_token, for which you are trying to fetch quote data. Going forward, you can go through our forum FAQs here for such queries.