Historical Data API Not Returning Latest Available Data

Historical Data API Not Returning Latest Available Data

Hi Team,

I’m using the Dhan HQ Historical Data API to fetch price data for the security with ID 11915. However, the latest data point returned is:

16.2 16.37 16.16 16.19 62477298 2025-03-12T18:30:00.000000Z

This corresponds to March 12, 2025, even though March 13, 2025, was a valid trading day. I understand that March 14 was a holiday, but the API should ideally return data for the last active trading session, which was March 13.

Steps Taken:

  1. Re-queried the API to check for updates.

  2. Verified that March 13 was a trading day.

  3. Ensured no filtering parameters were restricting the response.

    historicalDataRequest := dhan.HistoricalDataRequest{
    SecurityID: “11915”,
    ExchangeSegment: “NSE_EQ”,
    Instrument: “EQUITY”,
    ExpiryCode: 0,
    FromDate: “2001-01-01”,
    ToDate: “2025-03-18”,
    }

Could you please confirm if this is a known issue or if there’s a specific way to request the latest available data correctly?

Thanks in advance!

Hello @Sudeep_Batra

Welcome to MadeForTrade community!

Yes, it should return data for the last trading day as well. Can you send this over at help@dhan.co with your Client ID, will get this checked.

I tried to replicate this scenario now and it is working fine.

Hello have sent the email with my client id

Hello @Hardik
Today morning when i am trying still not getting the historical data for yesterday. When is historical data for last day updated ?

Warm Regards,
Sudeep Batra

Hello @Hardik ? please help on this. no reply on the email as well

Hey @Sudeep_Batra

The data is updated around mid-night, once all the markets are closed and we receive the bhavcopy from the exchange, which gives the day’s OHLC values.