@Hardik @Tradehull_Imran
Request for MCX Option Chain Data Availability on Dhan API
I would like to request clarification and support from the Dhan team regarding the availability of Option Chain data for MCX commodities through the Dhan API.
During my recent communication with Dhan Customer Care, I was informed that the Dhan API supports Options data and MCX market data, and I was advised to review Dhan HQ 2.0. However, the current API documentation does not clearly mention MCX Option Chain data, nor does it provide dedicated endpoints or examples related to MCX options.
For traders and developers who rely on automated systems, clear and dedicated MCX Option Chain APIs are essential. If such data is already available, kindly provide detailed documentation or endpoint references.
If not yet available, I request the Dhan team to arrange and make MCX Option Chain data accessible through the API at the earliest.
This feature will significantly help traders who work with commodities options and depend on accurate, real-time option chain insights.
Hi @Hemal_Chhatrala ,
If you are using Dhan_Tradehull codebase.
- Open your command prompt
- Run the following command to find where the
Dhan_Tradehull.py file is located:
pip show Dhan-Tradehull
- Look for the line starting with
Location: in the output.
- Example:
Location: C:\Users\<username>\AppData\Local\Programs\Python\Python311\Lib\site-packages
- Inside that folder, navigate to:
Dhan_Tradehull.py
- Scroll or search (Ctrl + F) for:
def get_option_chain():
- Inside the function, locate this line:
else:
raise Exception(f"No option chain data available for the {Underlying}")
Before this line add the below code-
elif Underlying in self.commodity_step_dict:
strike_step = self.commodity_step_dict[Underlying]
And save the file. This will solve the problem, Let me know if you face any issues. We will update the codebase for this in our upcoming version.
1 Like
MCX Option Chain in my Algo is now fully available and working perfectly.
Thank you so much, Sir, really appreciate your fast and accurate support.
Much respect and gratitude. 
Love you Sir.
1 Like