The codes required to fetch the futures are al follows:
Nift oct is 35079
Nift nov is 57920
Nifty dec is 63197
These have to be used as follows:
How do we get these codes?
Using the below strings gives an invalid error.
Kindly assist me with how to do this
Thank you for reaching out. I trust the Upstox APIs are serving your needs effectively.
Concerning your inquiry, the term
NSE_FO|35079 you mentioned is identified as the instrument key. You can access a complete list of these instrument keys by downloading the respective files from here. Please note that these files are updated daily.
Do inform us if this information is beneficial.
Appreciate your engagement!
Thank you for your help.
I know that the instrument keys available in the files. But I want to create an application that keeps getting the live data without any assistance. In your approach, every month I will need to download the file and manually enter the instrument key for the NSE_FO of that month. This is very inconvenient.
Is there any provision where I can automate this process? So that I just specify the Index Future and then the code keeps selecting the current month (Oct expiry) and near month (Nov expiry) futures on its own.
You can automate both the download of files and reading it into python program or any other. Take help of a programmer or refer to python tutorial videos available on you tube.
@prsh : Thank you for your response.
@aarnav_marathe : We recommend automating daily file downloads and providing your application with the necessary instrument keys from this source. The management of these keys should be handled on the client application side, and we have supplied files that can be utilized based on your application’s specific needs.
Thank you for your guidance.
There is no api endpoint that I can hit to get the instrument key?
My only option is to download the file, extract the instrument key and then feed it into my application, correct? And this will be done using third party technologies? UpStox doesn’t provide any facility to get the instrument key directly?
Yes, you’ve understood correctly. Currently, there is no API endpoint available to fetch the instrument key directly. You’ll need to download the pertinent file, extract the necessary instrument key, and then implement it into your application. The data should be processed on your side using relevant logic that matches your application.
We offer files tailored for individual exchanges, as well as a comprehensive file which encapsulates all exchanges, each containing the vital instrument_key information.
Your understanding and cooperation in managing this client-side processing are greatly appreciated. Please be assured that any updates or enhancements to our functionalities that may simplify this process in the future will be communicated to you at the earliest.
Thank you for the confirmation and assistance with the earlier questions.
It would become far more convenient if you can make a feature where I can receive the codes from your API.