Tariff history
GET
/history/tariffs
const url = 'https://demo.evcc.io/api/history/tariffs?aggregate=15m&from=2026-07-01T00%3A00%3A00Z&to=2026-07-02T00%3A00%3A00Z';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://demo.evcc.io/api/history/tariffs?aggregate=15m&from=2026-07-01T00%3A00%3A00Z&to=2026-07-02T00%3A00%3A00Z'Returns the persisted 15 minute tariff slots in the period, or their averages per hour, day or month.
Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters”aggregate
string
Bucket size, 15 minute slots by default
from
string format: date-time
Example
2026-07-01T00:00:00ZStart time (RFC3339)
to
string format: date-time
Example
2026-07-02T00:00:00ZEnd time (RFC3339)
Responses
Section titled “ Responses ”Tariff slots
Media typeapplication/json
Array<object>
object
start
string format: date-time
grid
Grid price per kWh, the bucket average when aggregated
number
gridMin
Lowest slot price in the bucket, aggregated only
number
gridMax
Highest slot price in the bucket, aggregated only
number
feedin
Feed-in rate per kWh, the bucket average when aggregated
number
feedinMin
number
feedinMax
number
co2
G/kWh
number
temperature
°C
number
Examplegenerated
[ { "start": "2026-04-15T12:00:00Z", "grid": 1, "gridMin": 1, "gridMax": 1, "feedin": 1, "feedinMin": 1, "feedinMax": 1, "co2": 1, "temperature": 1 }]Invalid parameters or database offline