Discrepancy in 1-Minute OHLC Data Between Upstox API and Charts

Dear Upstox Support,

I am reaching out regarding a discrepancy in the 1-minute OHLC data retrieved via the Upstox API compared to the OHLC values displayed on the Upstox trading charts.

I am pulling the candles using the OHLC quote method as per the Upstox API documentation, yet I am observing variations between the API data and the chart values for the same stock and timeframe. For instance, at [specific time and stock name, e.g., 24 Feb 2025, 11:05 AM, ZOMATO], the OHLC values retrieved from the API are:

  • Open: 225.5
  • High: 225.6
  • Low: 225.18
  • Close: 225.32

Whereas, the Upstox chart displays:

  • Open: 225.36
  • High: 225.39
  • Low: 224.92
  • Close: 224.98

Given that both data sources are from Upstox, I would like to understand the cause of this discrepancy. Specifically:

  1. Are the OHLC values from the API and the charts sourced differently, or is there a known adjustment process applied to the chart data?
  2. Is there any lag, rounding, or filtering mechanism applied that results in differing OHLC values?
  3. What would be the best way to ensure consistency in data for backtesting, live trading, and execution strategies?

Since accurate OHLC data is crucial for my calculations and trading decisions, I would appreciate any clarification or guidance on this matter.

Looking forward to your response.

Regards,
Neel

Hi @Neelabha_Samadder,

Welcome to the Upstox Community!

We are checking this now and will get back to you soon, thanks.

Hi @Neelabha_Samadder

Can you confirm to me if youā€™re using the V2 or the V3 socket?

Thank you, Ushnota and Mohit, for your quick response.

I am using V2, the market quote OLHC request

Hi @Neelabha_Samadder

Checking on this. Let me get back to you once our tech checks for any bugs.

1 Like

Hey Mohit!

following up with the above query. Any updates?

Seems like the candlestick OHLC that you got was from the previous candle. Have you observed that for all candlesticks OHLC values?

Hey Mohit

thank you for your response!
I will check once for Today and I will get back with updates and picture of new olhcā€¦ I hope that would help!

1 Like