Fetch ATM Strike Price
atm_strike, option_chain = tsl.get_option_chain(Underlying="CRUDEOIL", exchange="MCX", expiry=0, num_strikes=4)
Codebase Version 3
-----Logged into Dhan-----
reading existing file all_instrument 2025-03-05.csv
Got the instrument file
Getting Error at Option Chain as No option chain data available for the CRUDEOIL
Traceback (most recent call last):
File “Nifty Option Chain.py”, line 32, in
atm_strike, option_chain = tsl.get_option_chain(Underlying=“CRUDEOIL”, exchange=“MCX”, expiry=0, num_strikes=4)
TypeError: cannot unpack non-iterable NoneType object
@Tradehull_Imran Sir Is this a Correct Code to get MCX Option Chain ?