Issue with Missing Current 1-Min Candle in Market Data Feed V3

Hi Upstox Team,

I am currently using the Market Data Feed V3, and I’ve observed an issue regarding the 1-minute candles. The feed provides the previous 1-minute candle instead of the current one, which does not seem logical from a real-time data perspective.

To verify this, you can check the V3 full data feed after market hours. Instead of receiving the 3:29 PM candle, the feed provides the 3:28 PM candle, and the 3:29 PM candle is never shared. This behavior suggests that the latest minute’s candle is missing, which could be an oversight.

Could you please confirm if this is expected behavior or a bug? I believe having the current 1-minute candle is more important than the previous one for real-time decision-making.

I appreciate your help in investigating and fixing this issue. Looking forward to your response.

1 Like

@algo_trader_56 - Appreciate the insight! We’ll look into it.

for 3:29PM candle you can use the LTP, This previous candle works as a way to recover from websocket connection issue.

Hi @athma_prathisti,

I understand that the previous candle can help recover from a lost WebSocket connection, but the current 1-minute candle is still essential. It should update the close price and cumulative volume with every tick to accurately reflect the live market situation.

While it’s possible to reconstruct OHLC data from LTP, even a single missed tick can result in incorrect OHLC values for that minute. Instead of relying on such workarounds, providing the current 1-minute candle directly would make it much easier for users to design their trading algorithms.

Additionally, I highlighted the missing 3:29 PM candle as an easy way to identify the issue, but the problem is also noticeable in live data. The 1-minute OHLC updates lag behind because the timestamp is outdated, and the close price and volume do not update with each tick.

Would love to hear your thoughts on this!

1 Like

Thanks to you I find one issue in the candle generation Scheduler in my code it picks 0.33 seconds before the ticks completes the candles and result in wrong candles.

I can only comment after i run the fixed code and generate correct 3:29PM candles.
Thanks

1 Like

Having both live (current 1-min) and previous 1-min candle data in the feed would be ideal, but since Upstox can provide only one, Choosing the previous 1-minute candle is the better option because it allows us to make real-time trading decisions at the start of the new candle. When we receive the 9:19 candle at 9:20:00, its closing price reflects the exact market condition at that second, enabling immediate strategy execution with hardly a 1-2 second delay. This ensures accuracy without a significant lag. So, at that point of time ‘previous candle’ does not mean we get 1-min delayed data.

Regarding the missing last candle (3:29 PM) , TEMPORARY SOLUTION FOR NOW is to backfill historical data before starting the system at 9:15 AM by historical API. This way, we get the correct 3:29 PM candle from the previous day, and make a fresh start on new day with accurate values and maintaining data integrity and accuracy.

1 Like

Hi @Nirav_vora,

I am not sure if that’s how it works. As far as I understand, you won’t receive candle data exactly at the start of an interval. Instead, it seems you’ll get it on the next tick—when a trade happens—which might occur at the beginning of the interval or later. There could even be intervals with no trades at all, meaning you wouldn’t receive any candle data during those periods. If that’s the case, relying on a previous candle can be problematic because it would always reflect an outdated price. In such scenarios, it might be better to use the LTPC data directly.

Thank you for your suggestion regarding the 3:29 PM candle fix. I do use that method . I only pointed out the missing candle to highlight that the Market Data Feed V3’s 1-minute candle is not the current candle but the previous one.

I hope the Upstox team will provide a final clarification. Regardless of whether the feed provides the current or previous candle, it would be best if it were clearly documented so that other developers are not led astray by incorrect assumptions.

1 Like

Hi @algo_trader_56

We’re looking to solve for the last min candle. Shall update once we make upgrades on it!

I have one doubt if it is previous candle and market close at 3:30PM then it is expected behavior, even if he get the candle of 3:29PM he cannot execute any orders.
Between I am observing delays in websockets I am using around 729 symbols so my scheduler sometimes miss it and picks two candles in the next cycle i have scheduled it with 5 seconds delay but still I believe there is some delay.

Yeah, internally we also had some delays after the prev 1 min candle update. Shall patch things soon!

2 Likes