Instrument_token

SAURABH
I am getting an empty dictionary when I run the instruments("NSE") command. So I am unable to get the list of instrument tokens.
  • Vivek
    @SAURABH We will be releasing patch for this soon
  • SAURABH
    Is there any other method of gettting the list of instrument tokens? If not, can you please provide me that list, as it is very important for getting the historical data.
  • Vivek
    @SAURABH For now you can use kiteconnect.instruments() call without providing exchange. It will retrive the list of tokens for all the symbols. You can manually iterate through and get instrument tokens

    Example response
     [{'exchange': 'NFO',
    'exchange_token': '37380',
    'expiry': '2016-06-30',
    'instrument_token': '9569282',
    'instrument_type': 'CE',
    'last_price': 0.05,
    'lot_size': 8000,
    'name': '',
    'segment': 'NFO-OPT',
    'strike': 105.0,
    'tick_size': 0.05,
    'tradingsymbol': 'L&TFH16JUN105CE'},
    {'exchange': 'NFO',
    'exchange_token': '37394',
    'expiry': '2016-08-25',
    'instrument_token': '9572866',
    'instrument_type': 'CE',
    'last_price': 0.6,
    'lot_size': 9000,
    'name': '',
    'segment': 'NFO-OPT',
    'strike': 105.0,
    'tick_size': 0.05,
    'tradingsymbol': 'L&TFH16AUG105CE'},
    {'exchange': 'NFO',
    'exchange_token': '37397',
    'expiry': '2016-08-25',
    'instrument_token': '9573634',
    'instrument_type': 'PE',
    'last_price': 25.0,
    'lot_size': 9000,
    'name': '',
    'segment': 'NFO-OPT',
    'strike': 105.0,
    'tick_size': 0.05,
    'tradingsymbol ...]
    ': 'L&TFH16AUG105PE'},
  • SAURABH
    @vivek Is there a way to get the historical data of an expired future or option?
  • Vivek
    Vivek edited August 2016
    @SAURABH If you have the old tokens then you can retrieve the data but unfortunately we don't maintain history of instrument tokens. Also its possible that exchange reused the token and in that case you will be getting data for new scrip.
  • SAURABH
    @vivek There is some discrepancy in the historical data of options. For example, when I am requesting the today's historical data (per minute) of SBIN16AUG240CE (token 21882626), I am getting 368 data points, while I should be getting 375 data points. This is causing an error in my program. Why is the data for 7 minutes is missing? And what are these 7 minutes?
  • Vivek
    @SAURABH We are checking with team in charge of the data and will get back to you.
Sign In or Register to comment.