Inconsistency in Historical Candle Data V3 API Response

Hi Upstox Team,

I’m observing inconsistent behavior with the Historical Candle Data V3 API when fetching 1-minute candles for certain instrument keys.


Instrument Key:

NSE_FO|47286

Endpoint Used:

/historical-candle/:instrument_key/:unit/:interval/:to_date/:from_date


Issue Description:

  1. Request with only to_date (2025-07-13):
  • Example:

swift

CopyEdit

/historical-candle/NSE_FO|47286/minutes/1/2025-07-13
  • Result: Returns data only for 2025-06-20 (unexpected and incomplete).
  1. Request with both from_date and to_date:
  • Example:

swift

CopyEdit

/historical-candle/NSE_FO|47286/minutes/1/2025-07-13/2025-07-09
  • Result: Returns complete 1-minute candle data for the expected date range (2025-07-09 to 2025-07-13).
  1. Other Instrument Keys:
  • For some instrument keys, even when both from_date and to_date are specified, no data is returned at all.

Expected Behavior:

  • When to_date is specified alone, the API should return recent candle data up to that date (defaulting a reasonable lookback range).
  • When both dates are specified, data should reliably be returned for the entire range (this works in some cases, not all).
  • No data or partial data response without clear error/status makes it hard to handle gracefully on the client side.

Could you please check and confirm if this is a known issue, or if there’s a limitation or behavior we should account for programmatically?

Thanks in advance for your help!