Request for Extended Intraday Data in API for Indicator-Based Algo Trading

Hi Upstox Team,

I’m currently building algorithmic trading strategies using your Developer API and have encountered a limitation with the intraday data endpoint. As of now, the intraday API only provides data for the current trading day, which restricts the ability to apply meaningful technical indicators like Supertrend, MACD, RSI, or moving averages that require historical context.
:pushpin: Feature Request: Please extend the intraday API to return at least 3 days of historical intraday data (preferably in 3-minute or 5-minute intervals). This enhancement would enable:

  • Accurate calculation of multi-period indicators

  • Better signal validation and noise reduction

  • Seamless integration with existing algo frameworks

:light_bulb: Use Case Example: To compute a 14-period RSI or a 10-period Supertrend, we need data from previous sessions. Without this, the indicator values are either inaccurate or unavailable, making real-time decision-making unreliable.

This small change would significantly empower developers and traders building data-driven systems. Looking forward to your consideration and support!

Thanks, Abhi

1 Like

There are two different API setups for market data: Intraday API and Historical API.

  • Historical API provides data with a minimum lookback of one month. Since this data is static (past candles don’t change), it can be cached efficiently at multiple levels (L1, L2, L3). This caching reduces compute load, improves response times, and boosts overall API performance. You can explore the historical API here: Historical Candle Data V3 | Upstox Developer API

  • Intraday API, on the other hand, delivers incremental candles as the trading day progresses. Because this data is continuously changing until market close, it cannot be cached in the same way. Keeping intraday data separate ensures better performance and reduces the data surface area that needs to be scanned in real time.

At the end of each day, we process intraday data and convert it into historical data. Maintaining two separate APIs (intraday + historical) allows us to scale effectively while serving a large customer base.

This is also the same approach we use in our web and mobile applications, and it works very well. For real-time data, we recommend using our WebSocket API.

Hope this helps!

Hi Pradeep Sir,

Thanks for the detailed breakdown of the API architecture. I understand the rationale behind separating Intraday and Historical APIs for performance and scalability.

That said, I’d like to emphasize a critical gap that affects real-world strategy deployment: the absence of prior session intraday candles (3-minute or 5-minute intervals) in the Intraday API.

:bar_chart: Why Historical Intraday Context Is Essential:

Most technical indicators—Supertrend, MACD, RSI, moving averages—require a lookback window that spans beyond the current session. Without this, the first few hours of trading yield incomplete or misleading signals.

Take ATR-based stop loss for example: To calculate a reliable ATR, we need volatility data from previous candles. Without it, the stop loss becomes arbitrary or dangerously tight. And honestly, I wonder who trades without a stop loss—especially in algo setups where risk management is non-negotiable.

:high_voltage: WebSocket API Isn’t a Substitute:

WebSocket is great for streaming live ticks, but it doesn’t support historical backfill. That makes it unsuitable for initializing indicators or computing session-over-session metrics. Without warm-up data, strategies are flying blind at market open.

:wrench: Minimal Enhancement, Maximum Impact:

Even just one prior session’s intraday data would allow:

  • Proper indicator initialization

  • Accurate stop loss and target calculations

  • Seamless integration with real-time algo frameworks

This small addition would empower developers to build safer, smarter, and more scalable trading systems on your platform.

Thanks again for considering this. Looking forward to your thoughts!

Best regards, Abhi

We understand the use case for indicators that require a lookback window. You can fetch intraday data using the Intraday API and combine it with the Historical API (which provides at least 1 month of data) to cover the previous day’s candles. This approach should work well for your scenario.

The WebSocket reference was only an example for real-time data use cases.

Happy to help!

1 Like