How to get historical data of say last "n" 5 minutes candles ? What FROM DATE should put ??

Mangesh
if i want to get historical data of say last 20 candles of M5 then what "from Date" should I put ?...

If I call the function at say 2.45 PM then it has 20 candles for today...

BUT, If I call the function at say 9.45 AM then it has only 6 M5 candles for that day and other 14 candles should be from yesterday closing...

This will vary all the time with different current times and current date etc..
  • rakeshr
    BUT, If I call the function at say 9.45 AM then it has only 6 M5 candles for that day and other 14 candles should be from yesterday closing
    It all depends on the params you are sending.
    You can check an example regarding sending the required param to fetch historical data here.
Sign In or Register to comment.