How do I get historical Index Data for NIFTY/SENSEX?
-
Hi, the token code for NIFTY is 26000 and I am trying to get ONE_DAY data from the HistoricData API but no response is being returned by the API, why is that the case? Also, what is the token code for SENSEX?
-
I was searching for ways to get historical index data for Nifty and Sensex when I stumbled upon this gem of an article! Thanks for the clear guide. By the way, if you're up for another kind of data challenge, check out the online game Slope. It's like navigating through market trends—fast, unpredictable, and incredibly addictive!
-
@Moderator_1 thanks, I understand your point, but I guess what I am looking for is "shares traded" as shown by NSE (https://www.nseindia.com/reports-indices-historical-index-data) for the indices. I think that'd be a more useful value for volume than 0.
Thanks btw, rest of the APIs work great! -
Hello @Linux-Smiths,
We provide volume data for individual scrips. But in the case of NIFTY/ SENSEX, i.e. indices, it is not available as Indices are not traded on NSE/BSE. If you check for specific contracts with strike prices and expiry dates, you'll be able to get it.
Please let us know if you need help with anything else.
Thank you.
Regards
SmartAPI Team -
@Moderator_2 I'm able to fetch historical data for NIFTY50 and other indices, but the volume comes as 0. Is this something you are fixing?
-
Apologies for the delayed response
Please save and refresh the everyday file with below curl. The symbols of indices can be fetched by searching as start of 999. [Instance: Banknifty - 99926009]
curl -X GET "https://margincalculator.angelbroking.com/OpenAPI_File/files/OpenAPIScripMaster.json" > symbol1.txt
Also Kindly note, Currently we are not providing data for expired contracts.Regards,
SmartAPI team -
@Moderator_2 Hi Thanks for reply. It worked to fetch Nifty50 data.
Can you also write the token for Bank Nifty and other Nifties since it quite hard to find in file.
Also, please tell if we can get the historical data for expired options for Nifty.
example:If I have backtest Nifty50 along with its derivatives i.e Options for last 1 year, I will need historical Nifty Option data for last 1 year. Is it possible ?
If yes, how to get symbol tokens for expired contracts ? -
Nifty 50 token is 99926000. Kindly reverify on the Historical API with the proper token.
Please refer our instrument json file for the same.
https://margincalculator.angelbroking.com/OpenAPI_File/files/OpenAPIScripMaster.json{"token":"99926000","symbol":"Nifty 50","name":"NIFTY","expiry":"","strike":"0.000000","lotsize":"1","instrumenttype":"AMXIDX","exch_seg":"NSE","tick_size":"0.000000"}
Regards,
SmartAPI Team -
@Moderator_2 : Hi historical api for nifty50 doesn't work.
Please let me know which token should be used ? or the api is down?
i tried 2 and 26000 both , but doesn't work.
I will have to shift to another platform for algo trading if it doesn't work, since it is super important for me for options backtesting -
Hi all,
Apologies for delayed response.
We have recently started providing the index data.
Kindly reverify for the same if the issue still persistsThanks & Regards,
SmartAPI team -
-
@admin Hello admin, why angel is not offering the index historical data? For options trading specifically for Nifty and Banknifty, their historical data is very very important for algo traders. However you are providing the future data of index then why not of the index directly?
-
@dstelangre backrooms game
Don't offer Indexes data right now. -
@dstelangre I use manual reading of index data on TV channel and feed to my program
-
@admin Any update on index historical data ?
-
Hi @ananya said in How do I get historical Index Data for NIFTY/SENSEX?:
@admin It would be helpful to create a list of features that are coming soon (like this historical data for index)
It can be easiy done by listing features with a separate label (as issues in github). This has to be done on a separate project maintained by angel, as public reporting of issues might thorw everything in the air !
your feedback has been reported. -
@admin It would be helpful to create a list of features that are coming soon (like this historical data for index)
It can be easiy done by listing features with a separate label (as issues in github). This has to be done on a separate project maintained by angel, as public reporting of issues might thorw everything in the air ! -
Hi, @satasiyavivek @yash12392 we are currently evaluating the options to offer indices historical data.. it may take longer than expected. We will let you know once we have a definitive timeline.
-
@admin Do you have any timeline for release of indices data in the historical API?
-
Hi @yash12392 currently we do not provide Indexes data.