Instrument csv dump

AnujaJ
Hello,
I am new to python and kite.trade. I want the list of instruments for BANKNIFTY. I have got the list in response object(as mentioned in documentation) but I am not able to read the data from response object. Also any leads for getting BANKNIFTY specific instruments?
  • rakeshr
    @AnujaJ
    You need to send NFO param when requesting for instrument file, for python client:
    kite.instruments(exchange='NFO').Check documentation here.
  • AnujaJ
    @rakeshr
    I am not getting nifty/banknifty weekly options instrument token through the function mentioned above. Any leads for the same?
  • rakeshr
    rakeshr edited March 2019
    @AnujaJ
    Yeah, it will have all NFO scrip,you need to loop through whole response and then check for require trading symbol.Something as below for python client:
    instrument_file=kite.instruments(exchange='NFO')
    for value in instrument_file:
    #Filter out required trading symbol
    if(value['tradingsymbol'][:6]=='BANKNIFTY'):
    print(value['tradingsymbol'])
  • coolkoti
    Is there a way to get the old instrument tokens? For example, I want the token for ACC19FEBFUT or ACC19JANFUT. Where can I get them? The instrument csv only have the current, next and far month tokens.
  • sujith
    sujith edited March 2019
    The exchange re-uses the tokens once expired so even though you store tokens for expired instruments. You won't be able to fetch data for expired instruments.
    You can use continuous data feature of the historical data API. You can refer documentation here.
  • sujith
    @coolkoti,
    Please create a new thread for new queries. Please don't hijack threads.
This discussion has been closed.