Kotak-Neo / kotak-neo-api

100 stars 86 forks source link

quote api returns empty #29

Closed renjithsasidharan closed 11 months ago

renjithsasidharan commented 11 months ago

I am trying to get LTP for BANKNIFTY2381745000PE inst_tokens = [{"instrument_token": '39040', "exchange_segment": 'nse_fo'}] self.api.quotes(instrument_tokens=inst_tokens, quote_type='ltp', isIndex=True)

This returns {}. I have this problem only for FO not for CM

syedasif11 commented 11 months ago

I believe isIndex should be False.

shekar3110a commented 11 months ago

This worked for me .. please try it out

client.quotes(instrument_tokens=[{"instrument_token": str(token) , "exchange_segment": 'nse_fo'}] , quote_type='', isIndex=False, session_token=session_token, sid=sid, server_id=serverid)

Kotak-Neo commented 11 months ago

Please put isIndex = False, and then it should work. :)