Limit in History

Hello,

I’m new to coding. But my intension is to backtest my strategy in the past 4-5 years of data.

I use 5 mins trading set up for intraday.

I saw the below limits in the V3 DOCS

Limits for History

  • Unlimited number of stocks history data can be downloaded in a day.
  • Up to 100 days of data per request for 1, 2, 3, 5, 10, 15, 20, 30, 45, 60, 120, 180, and 240 minutes resolution.
  • For 1D resolutions up to 366 days of data per request for 1D (1 day) resolutions.
  • For Seconds Charts the history will be available only for 30-Trading Days

In the 2nd bullet point its mentioned as i will get 100 days of data on one request.

Suppose i got the historical data for the latest 100 days.

And if i need to get more data that falls before the recent 100 days, then can i change the time frame to previous 100 days and run the code to get more data.

Can that be done, i mean, to change the time frame everytime and run the code to get the results of my strategy for the last 4-5 years.

Hi Soorej R,

To fetch historical data, you need to pass the parameters "range_from": " " and "range_to": " ".

For example:

  • In the first request, fetch data from 100 days back to today.
  • In the second request, fetch the previous 100 days’ data.
  • Continue this pattern by passing each subsequent 100-day range to retrieve the data incrementally.

Please feel free to reach out to us, if there are any challenges.

Thank you for choosing FYERS!

You can use a for loop with start date as much as you want and keep the limit to 100 days in 1 min for each loop hope this helps

Thank you guys,

Happy to know its possible​:heart_eyes: , And Yeah, now i can learn more and convert my strategies into codes.

Sure will reach out to you guys if i face any complicated issues.