Energy flow
GET
/history/flow
const url = 'https://demo.evcc.io/api/history/flow?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/flow?from=2026-07-01T00%3A00%3A00Z&to=2026-07-02T00%3A00%3A00Z'Returns the energy attributed from sources (pv, battery, grid) to sinks (home, battery, loadpoint, export) over the period, plus grid cost and CO₂ sums where tariff data exists.
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”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”Energy flow data
Media typeapplication/json
object
flows
Array<object>
object
from
string
to
string
energy
KWh
number
cost
Cost of the energy, for home and loadpoint
number
pricedEnergy
KWh where a price exists
number
entities
Flows into each consumer and loadpoint, priced per slot
Array<object>
object
group
string
title
string
virtual
Home consumption not covered by a consumer
boolean
flows
Array<object>
object
from
string
to
string
energy
KWh
number
cost
Cost of the energy, for home and loadpoint
number
pricedEnergy
KWh where a price exists
number
cost
Grid cost sums, omitted without grid price data
object
import
number
export
number
importEnergy
KWh where a price exists
number
exportEnergy
KWh where a price exists
number
avgGrid
number
co2
Grid CO₂ sums in kg, omitted without CO₂ data
object
consumption
Emissions of the grid share that went to home and loadpoints
number
consumptionEnergy
KWh
number
baseline
number
avgCo2
G/kWh
number
Example
{ "flows": [ { "from": "pv", "to": "home" } ], "entities": [ { "group": "consumer", "flows": [ { "from": "pv", "to": "home" } ] } ]}Invalid parameters or database offline