Commodity Option OHLC Intraday not available

This is future data for commodity, it is working fine
{“securityId”:252453,“exchangeSegment”:“MCX_COMM”,“instrument”:“FUTCOM”}

but the option data for one of the strike is not returning the data
{“securityId”:257336,“exchangeSegment”:“MCX_COMM”,“instrument”:“OPTFUT”}

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.

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

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.

@saisaigraph
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.