dateFrom and dateTo set the range, and hourly picks the granularity. This page covers what each one does, what happens when you leave them out, and how far back each endpoint lets you look.
Granularity and how far back you can go
Sethourly=true to get one data point per hour. Leave it out, or set hourly=false, to get one data point per day.
Hourly data covers the last 30 days. A request with hourly=true and a dateFrom older than 30 days fails with this error:
dateFrom older than one year fails with this error:
Defaults when you omit the dates
hourly=truewith no dates returns the last 30 days.hourly=false, or nohourlyparameter, with no dates returns data starting from the same day on the proceeding month.dateFromon its own setsdateToto now.
How the API reads your dates
The API rounds the range to whole days.dateFrom rounds down to the start of its day and dateTo rounds up to the end of its day, so you get complete days back even when you pass a time of day.
GET /statistics also accepts exactRange=true, which keeps the hour components of dateFrom and dateTo as you sent them. It only takes effect together with hourly=true.
Endpoint limits
Picking a range
For anything within the last 30 days that you want broken down by hour, sethourly=true. For anything older than that, and up to a year back, use daily granularity by leaving hourly out.