NIFTY BANK and NIFTY 50 quote is not printing with average value

praveen_101
https://kite.trade/docs/connect/v3/market-quotes/#retrieving-ltp-quotes
went through the above link and tried using quote with INFY and other stocks, it is giving all the required details as mentioned in the document.

When I try with BANK NIFTY or NIFTY 50 it is not giving out average value.
below is what i have used in the code please suggest

check3 = kite.quote('NSE:NIFTY BANK')
print(check3)

and

check3 = kite.quote('NSE:NIFTY 50')
print(check3)

and

check3 = kite.quote('NSE:INFY')
print(check3)

OUTPUT:

NSE:NIFTY BANK': {'instrument_token': 260105, 'tradingsymbol': 'NIFTY BANK', 'timestamp': datetime.datetime(2023, 3, 17, 11, 50, 45), 'last_price': 39143.6, 'net_change': 11, 'ohlc': {'open': 39442.4, 'high': 39597.2, 'low': 39029.1, 'close': 39132.6}}}

{'NSE:NIFTY 50': {'instrument_token': 256265, 'tradingsymbol': 'NIFTY 50', 'timestamp': datetime.datetime(2023, 3, 17, 11, 48, 12), 'last_price': 17021.9, 'net_change': 36.3, 'ohlc': {'open': 17111.8, 'high': 17145.8, 'low': 16990.7, 'close': 16985.6}}}

{'NSE:INFY': {'instrument_token': 408065, 'timestamp': datetime.datetime(2023, 3, 17, 11, 46, 23), 'last_trade_time': datetime.datetime(2023, 3, 17, 11, 46, 22), 'last_price': 1436.95, 'last_quantity': 35, 'buy_quantity': 333667, 'sell_quantity': 313164, 'volume': 2122400, 'average_price': 1433.65, 'oi': 0, 'oi_day_high': 0, 'oi_day_low': 0, 'net_change': 0, 'lower_circuit_limit': 1263.7, 'upper_circuit_limit': 1544.5, 'ohlc': {'open': 1430, 'high': 1442, 'low': 1425.6, 'close': 1404.1}, 'depth': {'buy': [{'price': 1436.95, 'quantity': 116, 'orders': 3}, {'price': 1436.9, 'quantity': 32, 'orders': 2}, {'price': 1436.85, 'quantity': 130, 'orders': 1}, {'price': 1436.8, 'quantity': 60, 'orders': 2}, {'price': 1436.75, 'quantity': 160, 'orders': 2}], 'sell': [{'price': 1437.05, 'quantity': 231, 'orders': 1}, {'price': 1437.15, 'quantity': 400, 'orders': 1}, {'price': 1437.25, 'quantity': 848, 'orders': 3}, {'price': 1437.3, 'quantity': 51, 'orders': 3}, {'price': 1437.35, 'quantity': 52, 'orders': 1}]}}}

Please let me know how i can get the average price for the same
  • sujith
    @praveen_101,
    Nifty and Nifty bank are indices. They are not traded. Only their derivatives are traded. Hence there won't be average traded price for those instruments.
  • praveen_101
    Hi thank you for your response,
    1. Is there anyway I would get calculated average value or VWAP from the API. if not how do I calculate it.
Sign In or Register to comment.