It looks like you're new here. If you want to get involved, click one of these buttons!
Node JS client
.Net API client
.Net / VBA / Excel (3rd party)
Algorithms and Strategies
Mobile and Desktop apps
Market data (WebSockets)
In this Discussion
How to get specific instrument FNO contacts other than kite.instruments('NFO')
Is there any other function/way to get BANKNIFTY Options contracts based on expiry date straightaway, instead of filtering out from all FNO contracts (kite.instruments('NFO') )?
Code is fine with kite.instruments('NFO') but it's taking more than 1 to 1.5 min to filter out BANKNIFTY contracts based on given expiry. Looking for alternative to get in less time
There is no other way ,you have to filter from the instruments file.
And to reduce the time,the best way is to download the instruments file as csv directly rather than calling instruments method,and use that . It will take less than half a second to achieve what you want.
That's right, you must not download kite.instruments('NFO') each time you want to select an instrument. You must fetch kite.instruments('NFO') or kite.instruments('NSE') and load it into a pandas dataframe after filtering out the instruments that you wont need.
For example, if you would be trading options only in current expiry then filter only current expiry instruments and then save as a pandas dataframe, or if you would trade only Nifty & Banknifty current & next expiry then filter them before saving as a pandas dataframe and discard the rest.
By doing as suggested above anytime you want an instrument you can directly filter and get it within max 100-150 milliseconds if running on Linux VM and 200-300 ms if running on local Windows machine.
This discussion has been closed.