I am trying to fetch 5-min candle data for futures using https://api.dhan.co/v2/#/operations/intradaycharts
From the api-scrip-master file: Using the below row to fetch data for BANKNIFTY futures. But since the security id is only for BANKNIFTY-Dec2024-FUT, data is only given for that.
NSE D 35025 FUTIDX 0 BANKNIFTY-Dec2024-FUT 15 BANKNIFTY DEC FUT 12/24/24 14:30 -0.01 XX 5 M FUT
However, this only gives data for BANKNIFTY-Dec2024-FUT
I want to get continuous data for futures for the last 10 years, but the api-scrip-master does not include the security-ids for the historical futures symbols.
Like I want to get data for:
BANKNIFTY-Jan2023-FUT,
BANKNIFTY-Feb2023-FUT,
BANKNIFTY-Mar2023-FUT,
BANKNIFTY-Apr2023-FUT,
BANKNIFTY-May2023-FUT,
and so on..
How do I get that through dhan api? Please help me out
@Hardik
Upstox is providing this feature of getting the historical futures data which are even expired. Even ICICI direct is providing this. Can DHAN provide this as well?
For stock and index futures, we have continuous charts available for the daily and higher time frames. This means if you fetch the near-month expiry date for any contract — for example, Banknifty Aug Futures expiry (security ID 64100) you’ll get daily candle data from 2011 right up to the current date.
If you fetch intraday data though, it will only be available for the last 3 months since NSE future contracts remain active for that period.
Please note; we don’t provide expired contracts data, but this method is a handy workaround you can use.
@Trishul_Devadiga
Ok Got it.
But even for equity data, I can fetch intraday data only from 2017 onwards. Data is not available since inception which is claimed on the website.
Like for example, ‘BHEL’ is available on charts from sept. 2003.
But from the api, I can only fetch it from March 2017.
Using this endpoint :
As checked, the endpoint shared by you appears to be for intraday charts. Please note that you can fetch data only up to 5 years in intraday, and in a single stretch, you can retrieve data for a maximum of 90 days.