Historical Data returning incorrect volume

Hi Dhan Team, @Hardik

I’d like to report an issue I’ve observed with the Intraday Historical API, specifically related to volume data inconsistency and unexpected response behavior.

1. Volume Mismatch with Chart Data

I am fetching 5-minute intraday data for a security using the following request:

{
  "securityId": "3499",
  "fromDate": "2026-05-06 09:15:00",
  "toDate": "2026-05-06 09:20:00",
  "instrument": "EQUITY",
  "oi": false,
  "exchangeSegment": "NSE_EQ",
  "interval": "5"
}

From the API response (during market hours), I received:

“volume”: [761856.0, 626.0]

However, when I compare this with the chart data for the same time window (09:15–09:20), the volume displayed is approximately 1.01 million, which does not align with the API value (~7.6 lakhs).

This discrepancy is significant and is directly impacting my trading strategy, as volume is a key input for decision-making.

Note-: There are two values in the array, even though the time frame is only for 5 mins, why are we getting 2 values when only one was expected.


2. Inconsistent API Response (Time Range Ignored)

When I executed the same API request after market hours (around 07:10 PM), instead of returning data strictly between *09:15 and 09:20, the API returned the *entire day’s intraday data.

This behavior is unexpected since the request explicitly specifies a limited time range.


3. Logs for Reference

Below are the logs captured during the API call:

Request:
[{"securityId":3499,"fromDate":"2026-05-06 09:15:00","toDate":"2026-05-06 09:20:00","instrument":"EQUITY","expiryCode":0,"oi":false,"exchangeSegment":"NSE_EQ","interval":5}]
Response:
{"open":[214.0,213.93],"high":[214.45,213.93],"low":[213.52,213.93],"close":[213.9,213.93],"volume":[761856.0,626.0],"timestamp":[1.7780391E9,1.7780394E9]}

And the post-market response includes the full-day dataset despite the same request parameters.


Questions / Clarifications Needed

  1. What is the correct interpretation of the volume field in the intraday API?

    • Is it cumulative, per candle, or partial data?
    • Why does it not match the chart values?
  2. Why does the API return full-day data after market hours instead of respecting the fromDate and toDate filters?

  3. Is there any recommended approach to ensure accurate volume data for intraday strategies?


This issue is affecting trading decisions, so I’d appreciate your guidance or a fix at the earliest.

Please let me know if you need any additional details from my side.