Issue in Historical data from dhan

1.In dhan tradehull support library no provision for to fetch historical data of 3min and 10 min timeframe.
Please provide this.it is must needed for my algo strategy.
2.also please show how to get MCX historical data in dhanhq

Hi @debabratabari ,

Currently dhan does not support 3min and 10min timeframe data. But you can resample the 1min data .

Refer the below code to get MCX historical data.

data  = tsl.get_historical_data(tradingsymbol = 'CRUDEOIL MAY FUT',exchange = 'MCX' ,timeframe="1") 

Do you have angel one support library?
And is there 3min,5min,10min,and 15min timeframe historical data available?

Hi @debabratabari ,

Below is the Angel one support library.
https://drive.google.com/drive/folders/165i21BHPOzuWQZoHSGLR9hvGgTl1xKjE

Yes it supports 3min,5min,10min,and 15min timeframe .
Refer the below code

candle_data = taf.get_historical_data(name = 'TATAPOWER-EQ', interval = "1min", timeperiod = 5)

is MCX historical data in daily timeframe available in dhan hq?And how to get it?

Hi @debabratabari ,

Use the below code to fetch MCX historical data for DAY timeframe:

data  = tsl.get_historical_data(tradingsymbol = 'CRUDEOIL JUN FUT',exchange = 'MCX' ,timeframe="DAY")

Refer the below pypi link for more details:
https://pypi.org/project/Dhan-Tradehull/

at my end data in daily timeframe not coming. please check once.in other timeframe it is working but only issue in daily timeframe.
data = tsl.get_historical_data(tradingsymbol = ‘CRUDEOIL JUN FUT’,exchange = ‘MCX’ ,timeframe=“DAY”)

Hi @debabratabari ,

In Dhan_Tradehull file locate to get_historical_data() function and do comment out the following lines:

if 'FUT' in instrument_type and timeframe.upper()=="DAY":
	raise Exception('For Future or Commodity, DAY - Timeframe not supported by API, SO choose another timeframe')

Earlier Dhan was not supporting Day timeframe for MCX data. We will update our codebase soon.