Historical candle data with a 1-minute interval only gives the last 1 weak data

code for getting the data

problem : Why getting the last 1 weak data in a 1 minute time frame? If I need more days of data, what should I do?

Hi @AmitJ
Please refer to the historical API documentation, where you can specify to_date and from_date in the API call to retrieve data for the desired date range.

For example, here is a call to retrieve approximately six months of data:

https://api.upstox.com/v2/historical-candle/NSE_INDEX|Nifty 50/1minute/2024-10-08/2024-04-13

You may also find additional example codes useful for implementation.

Thank you.

1 Like

thanks sir,
mistake in my code
I do not use the from_date parameter

1 Like

@AmitJ Glad to hear the issue is resolved on your end!

1 Like