How to get websocket data of index such as NIFTY, BANKNIFTY, SENSEX etc

I want to get indices data such as NIFTY, BANKNIFTY, SENSEX etc. in websocket. But i don’t see any symbol in the symbol chart, how can i subscribe to these indices.

@karthi_chandran - can you have a look into this please.

To get data for these index first get the listing_id of them. It can be obtained if you just do simple quote for them.

Next once that is done, you can subscribe by passing listing_id where you pass symbol_code.

Example -21 is listing_id for Nifty 50.

Try to use that.