How to receive quotes of indexes through websocket

I get live quotes for options and stocks, but for indexes I am unable to get data. For example, Nifty 50, with instrument token 256265, I am unable to get live quotes. I understand this could be because no orders can be placed on indices directly, however, I see Kite platform and TradingView platform are updating the price in real-time. How to get this data?
  • rakeshr
    It should come fine if using the correct instrument token. Is on_error method throwing any error?
    Sample response for Nifty 50:
    [{'tradable': False, 'mode': 'quote', 'instrument_token': 256265, 'last_price': 17842.05,
    'ohlc': {'high': 17925.95, 'low': 17836.45, 'open': 17923.35, 'close': 17798.75},
    'change': 0.24327551092070662}]
Sign In or Register to comment.