(Resolve) Get Day timeframe data for GOLDM in MCX

Hi,

  I am not able to fetch 1 Day Timeframe data for GOLDM in MCX. Below is the summary of the error. 

Exception in Getting OHLC data as For Future or Commodity, DAY - Timeframe not supported by API, SO choose another timeframe

Hey @Prateek ,

In order to fetch the daily candle make sure you are using the below endpoint
–url https://api.dhan.co/v2/charts/historical.

Below is the sample request structure:
{
“securityId”: “472779”,
“exchangeSegment”: “MCX_COMM”,
“instrument”: “FUTCOM”,
“expiryCode”: 1,
“fromDate”: “2025-12-12”,
“toDate”: “2025-12-15”
}

You may test the same on our sandbox environment Dhan API

Also , you may refer to our api documentation Historical Data - DhanHQ Ver 2.0 / API Document

1 Like