Commodity Option OHLC Intraday not available

This is future data for commodity, it is working fine

but the option data for one of the strike is not returning the data

Can you please help

Hello @Shashidhar

This is an inactive strike and no data is available for this instrument. Hence, there is no data being returned here.

Could you please provide code example or links for accessing MCX crude oil and F&O related using dhan api python.

Hello @saisaigraph

Sure. Can you tell me whether you want this for placing order or fetching data?

both please. Fetch the latest expiry place order and then check for target profit and stop loss which ever is satisfied then exit order.

Okay. So for placing order, you need to ensure exchange_segment as MCX (dhan.MCX for python) and product type can be dhan.INTRA or dhan.MARGIN, depending on order you want to place.

For fetching prices, you can again refer to Security ID master, which will have the security ID for all instruments.