Change unix time stamp on loop
Hi - i have spent a lot of time searching the forum, but cant work it out.
Wondering if anyone can help me please. I am trying to loop using a macro and changing a value that is inserted in to the URL (a different UNIX timestamp) on each iteration,.
I want to do this in order to loop sucessive calls to the API to get more history data as per call it is limited to 2000 records (hours in this case).
So I would like to get a longer history in order to try some predictions on it.
I have worked out how to get the last value of the UNIX time stamp from the first run, and then use that in a loop as the starting point for a second run and merge both sets of data to one file to get 4000 hours.
The problem is I cant work out how to loop gain and change the value for a more sucessive times each loop. to get more history.
- The data is hour based ticker price, from cryptocompare limited to 2000 hours per call,
It is posible to insert the value from the earliest UNIX time stamp date from the first run to complete sucessive runs to get earlier data.
&limit=2000&toTs={the earliest timestamp received}
https://min-api.cryptocompare.com/data/histohour?fsym=%{fsym}&tsym=%{tsym}&limit=%{limit}&toTs=%{toTs}&api_key={api_key}
Process attached
(i have removed my API) you can get one free to test it. from here https://min-api.cryptocompare.com/documentation?key=Historical&cat=dataHistohour
Any help appreciated - thanks, Lee







Wondering if anyone can help me please. I am trying to loop using a macro and changing a value that is inserted in to the URL (a different UNIX timestamp) on each iteration,.
I want to do this in order to loop sucessive calls to the API to get more history data as per call it is limited to 2000 records (hours in this case).
So I would like to get a longer history in order to try some predictions on it.
I have worked out how to get the last value of the UNIX time stamp from the first run, and then use that in a loop as the starting point for a second run and merge both sets of data to one file to get 4000 hours.
The problem is I cant work out how to loop gain and change the value for a more sucessive times each loop. to get more history.
- The data is hour based ticker price, from cryptocompare limited to 2000 hours per call,
It is posible to insert the value from the earliest UNIX time stamp date from the first run to complete sucessive runs to get earlier data.
&limit=2000&toTs={the earliest timestamp received}
https://min-api.cryptocompare.com/data/histohour?fsym=%{fsym}&tsym=%{tsym}&limit=%{limit}&toTs=%{toTs}&api_key={api_key}
Process attached
(i have removed my API) you can get one free to test it. from here https://min-api.cryptocompare.com/documentation?key=Historical&cat=dataHistohour
Any help appreciated - thanks, Lee






