Hello @Tradehull_Imran sir,
This is after updating of codebase in accordance with Episode 3.1.
Issue 1:
Code:
import pdb
import time
import datetime
import traceback
import talib
from Dhan_Tradehull import Tradehull
import pandas as pd
client_code = "xxxxxx"
token_id = "xxxxxx"
tsl = Tradehull(client_code,token_id) # tradehull_support_library
ltp1 = tsl.get_ltp_data('ACC')
print(ltp1)
I am getting empty output, like:
C:\Users\subud\Dhan Algo\3.2 Codebase & Websocket\To be used>"Dhan_codebase usage.py"
Codebase Version 3
-----Logged into Dhan-----
reading existing file all_instrument 2025-11-05.csv
Got the instrument file
{}
I am not getting ltp for any instrument.
Issue 2:
Code:
intraday_hist_data = tsl.get_intraday_data(tradingsymbol = 'ACC',exchange = 'NSE',timeframe = "1")
Output:
(Pdb++) intraday_hist_data = tsl.get_intraday_data(tradingsymbol = 'ACC',exchange = 'NSE',timeframe = "1")
{'status': 'failure', 'remarks': {'error_code': 'DH-905', 'error_type': 'Input_Exception', 'error_message': 'System is unable to fetch data due to incorrect parameters or no data present'}, 'data': {'errorType': 'Input_Exception', 'errorCode': 'DH-905', 'errorMessage': 'System is unable to fetch data due to incorrect parameters or no data present'}}
Traceback (most recent call last):
File "C:\Users\subud\AppData\Local\Programs\Python\Python38\lib\cmd.py", line 214, in onecmd
func = getattr(self, 'do_' + cmd)
AttributeError: 'Pdb' object has no attribute 'do_intraday_hist_data'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\subud\AppData\Local\Programs\Python\Python38\lib\site-packages\Dhan_Tradehull\Dhan_Tradehull.py", line 525, in get_intraday_data
raise Exception(ohlc)
Exception: {'status': 'failure', 'remarks': {'error_code': 'DH-905', 'error_type': 'Input_Exception', 'error_message': 'System is unable to fetch data due to incorrect parameters or no data present'}, 'data': {'errorType': 'Input_Exception', 'errorCode': 'DH-905', 'errorMessage': 'System is unable to fetch data due to incorrect parameters or no data present'}}
Issue 3:
Code:
ce_name, pe_name, strike = tsl.ATM_Strike_Selection(Underlying='NIFTY',Expiry=0)
Output:
exception got in ce_pe_option_df 'NIFTY'
Issue 4:
Code:
otm_ce_name, otm_pe_name, ce_OTM_strike, pe_OTM_strike = tsl.OTM_Strike_Selection(Underlying='NIFTY',Expiry=0,OTM_count=3)
Output:
Getting Error at OTM strike Selection as 'NIFTY'
Issue 5:
Code:
itm_ce_name, itm_pe_name, ce_ITM_strike, pe_ITM_strike = tsl.ITM_Strike_Selection(Underlying='NIFTY',Expiry=0,ITM_count=4)
Output:
Error at OTM strike Selection as 'NIFTY'
can you help me on this sir? I couldn’t proceed further.
Thank you in advance.