Where to manually find list of stock codes for Breeze API
To start exploring the multiple features of Breeze API, one would need to enter certain parameters for a successful output. For example, in trying to download minute by minute historical data for Ashok Leyland’s stock price on NSE exchange for the 1st week of May, the code should like something like below:
Please note that the api_key and api_secret are shown for demo purpose only. Users would need to enter their own api key and secret key, as can be seen in the view app section of Breeze Hompage. Refer to our articles on “How to register an App” and “How to generate the session key” to know about the starting process. The links for those are mentioned below:
What inputs are allowed to go in parameters?
The key thing to note in the above code is that the parameters (like interval, to_date, from_date, stock_code, exchange_code and product_type) can take input in a specific format only. For instance, parameter ‘interval’ will accept “1minute” but not if you enter “1min” or “01m”. Even if you miss a double quote “at the end or start of the parameter, the code would throw an error. This is standard protocol of any programming language (python in this case) and we have to abide by this.
Now the next thing that one would like to know is how to get all the list of available inputs that go in these parameters. For example, at the time of writing this article the parameter “interval” can accept the following inputs:
“1minute” , “5minute” , “30minute” , “1day”
While we are building new capabilities for the Breeze API on a regular basis, make sure you check out our community for regular updates.
Link to Breeze Community:
Where to get the list of stock codes?
To get the parameter “stock_code” you will have to go to à
You can download the Security Master file from the above link. It is generated/updated daily at 8:00 AM.
Above is a snapshot of how the .txt file looks from inside. If you want to search the stock code for a particular instrument, simply use “ctrl + f” to find the related instrument.
#Note: You can open the file in excel too, just that, you would need to use a delimiter “,” to separate the field values and create a dataset.
Notice the second column “Short Name” in the dataset. This corresponds to the stock code required in the input parameter of API endpoints.
So let’s say you want to download daily closing price for Reliance Industries Limited from NSE for the entire 2021 year. You should first look for Reliance Industries in the stock master file and on doing so should come across “RELIND” as the short name for Reliance Industries as listed on NSE.
The final code should look something like below:
Similarly, you can look for stock codes for all the asset classes – equity, futures, options etc. using the respective master security file (example : NSE script master or FnO scrip master file) available on the same link as mentioned above on our documentation page à instruments section.
For more information on Breeze API, please check out our homepage, which contains access to articles, videos and webinars for the same. The link for the same is mentioned below:
Disclaimer: ICICI Securities Ltd.( I-Sec). Registered office of I-Sec is at ICICI Securities Ltd. - ICICI Venture House, Appasaheb Marathe Marg, Prabhadevi, Mumbai - 400025, India, Tel No:- 022 - 2288 2460, 022 - 2288 2470. I-Sec is a Member of National Stock Exchange of India Ltd (Member Code:-07730) and BSE Ltd (Member Code :103) and having SEBI registration no. INZ000183631. Name of the Compliance officer (broking): Mr. Anoop Goyal, Contact number: 022-40701000, E-mail address: firstname.lastname@example.org. Investment in securities market are subject to market risks, read all the related documents carefully before investing. The contents herein above shall not be considered as an invitation or persuasion to trade or invest. I-Sec and affiliates accept no liabilities for any loss or damage of any kind arising out of any actions taken in reliance thereon.