Advanced Algo Trading 2026 | Codes | Youtube

(Pdb++) data = tsl.get_expired_option_data(tradingsymbol=name,exchange=“NFO”,interval=1,expiry_flag=“WEEK”,expiry_code=1,strike=“ATM”,option_type=“CALL”,from_date=from_date,to_date=expiry)
*** AttributeError: ‘Tradehull’ object has no attribute ‘get_expired_option_data’

Getting this error while executing the code. pl guide sir.

Hi @ayaa

let us know which codebase and dhanhq version are you using
check by sending below commands on cmd

pip show Dhan-Tradehull
pip show dhanhq