# Getting error while subscribing an index

**URL:** <https://community.aliceblueonline.com/t/getting-error-while-subscribing-an-index/11796>\
**Category:** API\
**Created:** [May 27, 2024, 5:49am UTC](https://community.aliceblueonline.com/t/getting-error-while-subscribing-an-index/11796 "2024-05-27T05:49:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pennytrader](https://sea1.discourse-cdn.com/flex015/user_avatar/community.aliceblueonline.com/pennytrader/32/3727_2.png) [@pennytrader](https://community.aliceblueonline.com/u/pennytrader)\
**Post date:** [May 27, 2024, 5:49am UTC](https://community.aliceblueonline.com/t/getting-error-while-subscribing-an-index/11796/1 "2024-05-27T05:49:11Z")

</div>

I tried to subscribe Midcap nifty and I am getting the error.  
The value being picked to aliceblue.py subscribe method is ‘NSE|26074’

AliceBlue Ticker Subscribing instruments [Instrument(exchange=‘NSE’, token=26074, symbol=‘NIFTY MIDCAP SELECT’, name=‘’, expiry=‘’, lot\_size=‘’)]

```auto

bluepy.Aliceblue object at 0x7fa4b29ad720>>: list index out of range
2024-05-27 11:15:52: Thread-9 (__ws_run_forever): Error : list index out of range
2024-05-27 11:15:52: Thread-9 (__ws_run_forever): error from callback <bound method Aliceblue.on_message of <pya3.alicebluepy.Aliceblue object at 0x7fa4b29ad720>>: list index out of range
2024-05-27 11:15:52: Thread-9 (__ws_run_forever): Error : list index out of range

```

For F&O its working, but while subscribing to an index, it is giving this error. Guide me on how to subscribe indices.

‘{“t”:“tf”,“e”:“NSE”,“tk”:“26037”,“lp”:“22007.60”,“pc”:“0.19”,“ft”:“1716872846”}’. Even when I enabled market depth, I dont see OI data  
how can I get open interest of a ticket.
