Testing RELIANCE 1-hour…
{‘status’: ‘failure’, ‘remarks’: {‘error_code’: ‘DH-905’, ‘error_type’: ‘Input_Exception’, ‘error_message’: ‘Missing or Invalid fields: toDate, fromDate’}, ‘data’: {‘errorType’: ‘Input_Exception’, ‘errorCode’: ‘DH-905’, ‘errorMessage’: ‘Missing or Invalid fields: toDate, fromDate’}}
Exception in Getting OHLC data as {‘status’: ‘failure’, ‘remarks’: {‘error_code’: ‘DH-905’, ‘error_type’: ‘Input_Exception’, ‘error_message’: ‘Missing or Invalid fields: toDate, fromDate’}, ‘data’: {‘errorType’: ‘Input_Exception’, ‘errorCode’: ‘DH-905’, ‘errorMessage’: ‘Missing or Invalid fields: toDate, fromDate’}}
2025-06-06 21:38:57,216 - ERROR - Exception in Getting OHLC data as {‘status’: ‘failure’, ‘remarks’: {‘error_code’: ‘DH-905’, ‘error_type’: ‘Input_Exception’, ‘error_message’: ‘Missing or Invalid fields: toDate, fromDate’}, ‘data’: {‘errorType’: ‘Input_Exception’, ‘errorCode’: ‘DH-905’, ‘errorMessage’: ‘Missing or Invalid fields: toDate, fromDate’}}
Traceback (most recent call last):
File “C:\Users\rbrun\miniconda3\envs\trading_env\lib\site-packages\Dhan_Tradehull\Dhan_Tradehull.py”, line 464, in get_historical_data
raise Exception(ohlc)
Exception: {‘status’: ‘failure’, ‘remarks’: {‘error_code’: ‘DH-905’, ‘error_type’: ‘Input_Exception’, ‘error_message’: ‘Missing or Invalid fields: toDate, fromDate’}, ‘data’: {‘errorType’: ‘Input_Exception’, ‘errorCode’: ‘DH-905’, ‘errorMessage’: ‘Missing or Invalid fields: toDate, fromDate’}}
2025-06-06 21:38:57,228 - INFO - Response type: <class ‘NoneType’>
2025-06-06 21:38:57,228 - INFO - RELIANCE 1-hour - Unexpected response: None
2025-06-06 21:38:57,229 - INFO - ----------------------------------------
2025-06-06 21:38:57,229 - INFO - Testing NIFTY 15-minute…
{‘status’: ‘failure’, ‘remarks’: {‘error_code’: ‘DH-905’, ‘error_type’: ‘Input_Exception’, ‘error_message’: ‘Missing or Invalid fields: toDate, fromDate’}, ‘data’: {‘errorType’: ‘Input_Exception’, ‘errorCode’: ‘DH-905’, ‘errorMessage’: ‘Missing or Invalid fields: toDate, fromDate’}}
Exception in Getting OHLC data as {‘status’: ‘failure’, ‘remarks’: {‘error_code’: ‘DH-905’, ‘error_type’: ‘Input_Exception’, ‘error_message’: ‘Missing or Invalid fields: toDate, fromDate’}, ‘data’: {‘errorType’: ‘Input_Exception’, ‘errorCode’: ‘DH-905’, ‘errorMessage’: ‘Missing or Invalid fields: toDate, fromDate’}}
2025-06-06 21:38:59,410 - ERROR - Exception in Getting OHLC data as {‘status’: ‘failure’, ‘remarks’: {‘error_code’: ‘DH-905’, ‘error_type’: ‘Input_Exception’, ‘error_message’: ‘Missing or Invalid fields: toDate, fromDate’}, ‘data’: {‘errorType’: ‘Input_Exception’, ‘errorCode’: ‘DH-905’, ‘errorMessage’: ‘Missing or Invalid fields: toDate, fromDate’}}
Traceback (most recent call last):
File “C:\Users\rbrun\miniconda3\envs\trading_env\lib\site-packages\Dhan_Tradehull\Dhan_Tradehull.py”, line 464, in get_historical_data
raise Exception(ohlc)
Exception: {‘status’: ‘failure’, ‘remarks’: {‘error_code’: ‘DH-905’, ‘error_type’: ‘Input_Exception’, ‘error_message’: ‘Missing or Invalid fields: toDate, fromDate’}, ‘data’: {‘errorType’: ‘Input_Exception’, ‘errorCode’: ‘DH-905’, ‘errorMessage’: ‘Missing or Invalid fields: toDate, fromDate’}}
2025-06-06 21:38:59,427 - INFO - Response type: <class ‘NoneType’>
2025-06-06 21:38:59,427 - INFO - NIFTY 15-minute - Unexpected response: None
2025-06-06 21:38:59,427 - INFO - ----------------------------------------
2025-06-06 21:38:59,427 - INFO - Testing ACC 1-minute…
{‘status’: ‘failure’, ‘remarks’: {‘error_code’: ‘DH-905’, ‘error_type’: ‘Input_Exception’, ‘error_message’: ‘Missing or Invalid fields: toDate, fromDate’}, ‘data’: {‘errorType’: ‘Input_Exception’, ‘errorCode’: ‘DH-905’, ‘errorMessage’: ‘Missing or Invalid fields: toDate, fromDate’}}
Exception in Getting OHLC data as {‘status’: ‘failure’, ‘remarks’: {‘error_code’: ‘DH-905’, ‘error_type’: ‘Input_Exception’, ‘error_message’: ‘Missing or Invalid fields: toDate, fromDate’}, ‘data’: {‘errorType’: ‘Input_Exception’, ‘errorCode’: ‘DH-905’, ‘errorMessage’: ‘Missing or Invalid fields: toDate, fromDate’}}
2025-06-06 21:39:01,697 - ERROR - Exception in Getting OHLC data as {‘status’: ‘failure’, ‘remarks’: {‘error_code’: ‘DH-905’, ‘error_type’: ‘Input_Exception’, ‘error_message’: ‘Missing or Invalid fields: toDate, fromDate’}, ‘data’: {‘errorType’: ‘Input_Exception’, ‘errorCode’: ‘DH-905’, ‘errorMessage’: ‘Missing or Invalid fields: toDate, fromDate’}}
Traceback (most recent call last):
Hi @Hardik
there was issue in Get Intrarday data, there was DH-905 error code, I attached image for your refaranse,
Even I am experiencing same error since last evening. Is this a known issue to Dhan and working towards resolution or ?
same problem date
2025-06-07 10:55:01,438 - WARNING - Failed to fetch data from 2025-06-01 09:15:00 to 2025-06-06 15:30:00. Remarks: {‘error_code’: ‘DH-905’, ‘error_type’: ‘Input_Exception’, ‘error_message’: ‘Missing or Invalid fields: toDate, fromDate’}
Yes getting same error , please resolve it asap, Thanks
errorMessage":“Missing or Invalid fields: toDate, fromDate”
yes getting same error since yesterday evening historic data that to intraday not working rest data api like option chain working why only historic data blocked, initially i faced token issue i sign in and give new token then next onwards getting same errors as above in fetching historic intraday data.
Same for me.
Anyone who using DHAN Api from long time, can confirm me if these kind of issues keeps popping up or what? I need a reliable API, its been around 2 days since this problem don’t they have any monitoring system in place? reported in another thread but still no response from the support team, if this unreliable DHAN Api is, seriously i would consider shifting to Zerodha API.