Method of calculating price variation rate


#1

At the moment, the Currencies Interval endpoint seems to be outputting an hourly price, how does nomics Web calculate price fluctuation rate of 24 hours?

If I want to get the same value, is it good to compare the current price with the value output by entering 24 hours ago in “&start=” of the Currencies Interval endpoint?


#2

Which endpoint are you using, if you look at the ‘dashboard’ method it has the daily open as well as hourly stats for every pair


#5

The interval endpoint will take a “start” and “end” value and return an “open” and “close” price based on this range. So if you set your “start” value to 24 hours ago from the current time, you should get the price from yesterday at this time (open) and the current price (close). Then, to calculate the change, it is simply close - open. And for the percentage change, it would be (close - open) / open