šŸ”„ Get Historical Data in any time frame! You wished, we built. New releases at Upstox APIšŸ”„

Hey folks,

After a fantastic response from the community and seeing the number of users & platforms relying on our new TBT powered v3 websockets, we wanted to build more on the Data APIs side of things.

We’ve got some fantastic news that will level up your trading strategies and data analysis! We’re thrilled to announce the release of three significant enhancements to our API, designed to provide you with richer data, improved efficiency, and more powerful tools than ever before.

Let’s dive into what’s new:

1. :rocket: Enhanced Historical Candle Data APIs (v3)

Get rid of time-frame constraints.
These new APIs can be used to obtain OHLCV values and more of any timeframe you ask, starting at 1m granularity.
Just choose a within the limits prescribed for mins/hrs/days/wks and pass the call.
Ex. 14mins, 245mins, 3hrs, etc.
[We had major major request from a couple of users for 48mins who said they’d pay anything for it, I wonder what that cooks]

We’ve also increased the number of years you can go back to.
Minutes/Hours time-frame data is available since Jan 2022 & Days/Weeks/Months since Jan 2000.

Check out the detailed documentation here:
Intraday Candle Data V3
Historical Candle Data V3


2. :high_voltage: Next-Gen Market Quote API (v3)

These V3 APIs include additional features and enhancements.

  1. A new endpoint for Option Greeks in the Option Greek API

  2. For the OHLC V3 API, we’ve added two new most requested fields live_ohlc and prev_ohlc along with total traded volume ā€œvolumeā€ and timestamp ā€œtsā€ included in the responses.

  3. For LTP V3 APIs, there are three new fields ltq, volume and cp for last traded quantity, total traded volume and close price of previous day respectively.


3. :page_facing_up: Introducing the MIS File API

We understand the importance of efficient trade management and reconciliation. That’s why we’re excited to introduce the MIS (Margin Intraday Square-off) JSON File API.

This includes both ā€œmarginā€ and ā€œintraday_leverageā€ fields for you to choose the easiest way to work on.


While we’re actively building on Data for Expired historical contracts, fully fledged GTT APIs, new order types and more, we’d love to know your feedback on the latest releases. Feedback from the community has always helped us ship better and we’re grateful!

Thank you, folks!

9 Likes

Great work folks!.. thanks..

2 Likes

I recently realized power of Upstox API and it really gives edge to traders. And now this data feed v3. I am sure it is going to work great.

One small issue- I was looking for rate limits/ subscription limits in v3 api docs but could not find.

Hi @gaurav

Thanks for the kind comment! Would love your continuous feedback.

You can find the rate limits for all APIs here: Rate Limits | Upstox Developer API

Hi @MohitGolecha , thanks for including other time intervals for historical and intraday data v3. Can you please include it for Python SDK as well, I am not able to see it yet for SDKs, including those as well and letting us know when can we expect would be very much helpful :slight_smile:

I TRIED THIS , AND I AM GETTING ONE MOTH OF DATA BUT WHEN I TRY TO FETCH APPROX 2 MONTHS OF DATA THEN GETTING THIS RESPONSE , HERE IS MY CODE AND ERROR MESSAGE : CODE import requests

url = ā€˜https://api.upstox.com/v3/historical-candle/NSE_EQ|INE031A01017/minutes/1/2025-02-25/2025-01-01’
headers = {
ā€˜Accept’: ā€˜application/json’
}

response = requests.get(url, headers=headers)

Check the response status

if response.status_code == 200:
# Do something with the response data (e.g., print it)
print(response.json())
else:
# Print an error message if the request was not successful
print(f"Error: {response.status_code} - {response.text}") ERROR MESSAGE : Error: 400 - {ā€œstatusā€:ā€œerrorā€,ā€œerrorsā€:[{ā€œerrorCodeā€:ā€œUDAPI1088ā€,ā€œmessageā€:ā€œInvalid dateā€,ā€œpropertyPathā€:null,ā€œinvalidValueā€:null,ā€œerror_codeā€:ā€œUDAPI1088ā€,ā€œproperty_pathā€:null,ā€œinvalid_valueā€:null}]}

@SALONI_24197695 Kindly verify the maximum retrieval record limits as specified in the documentation.

@Upstox team, please ley us know if there are any updates on this

@Bhawik_37243451 The team will begin working on SDKs shortly. We will provide updates here once they are available.

Thanks

@Anand_Sajankar Thanks for the update! Anticipating SDKs soon as this would be very useful application.

1 Like

Sir you mentioned V3 is powered by TBT, does it mean Last traded quantity will always add up to Volume traded today on every tick as TBT provide all trades

Hi @AVIPRIYA_1694086

Yes, as long as the internet bandwidth can keep up with the data flowing!

1 Like

Hello,

I could check that ā€œHistorical Candle data V3ā€ is throwing Intraday data also today, while as per documentation intraday data to be retrieved separately.

@Bhawik_37243451 The Python SDK now supports time intervals for both historical and intraday data v3.

Is the documentation updated? can’t see the example code for SDKs still.