Downloading 5 minute equity data in chunks

Hello Guys,
I am new to python, and I was wondering if we can download 5-minute historical data in chunks, I mean I know it can be done.
the problem is I needed data for underlying instruments of futures which is 144. for a total period of 5 years, do total days will be 365*5, and since 100 days can be downloaded in each chunk so no of repetitions will be (365*5)/100 so around 18.5 rep.
Problem 1 ===> I know it can be done through a for loop, but I don't have any idea regarding how to code it.
Problem 2 ===> It around 3-4 minutes to download data for 144 instruments for 100 days. So for the data I am trying to collect it should easily take 4min*18.5reps, anyway through which I can reduce the time? as it might be very demanding on my laptop which has 12GB ram and rayzen 5 chipset no GPU. any other way zerodha API has provided or any other way to code.
I have subscribed to Zerodha historical data API.
thanks in advance already !!!!
  • rakeshr
    You will have to fetch historical data in a loop. Go through this thread to know more.
  • Professor_Severus
    Hi Rakesh, thanks for your kind response, that discussion you pointed out is the dead-end to exactly what I am asking here.
  • sujith
    The idea is to dump the historical data at your end and use that as the source for computation.
    For live candles, you can use Websocket data and make candles at your end. You can get started here.
Sign In or Register to comment.