Skip to main content
The Cost of Energy API allows you to calculate the cost of energy consumption in any Swedish Metering Grid Area. The API is structured around Tariffs that contain Tariff Components, each describing some aspect like tax, transfer fees etc. The Tariff Components use a machine-readable Calculation Pipeline to describe exactly how to calculate energy cost.

Approach

The API gives you abstract machine-readable Calculation Pipelines that describe how to calculate the cost of energy. To actually do the calculation, your code - or our API depending on your needs - executes the calculation pipelines. This abstraction comes with several benefits:
  • Implementation is fast as there are only a handful of operations to implement, compared to implementing hundreds of DSOs rate plans individually
  • It works both to implement as regular code and for constructing optimisation problems
  • It allows any language to be used
  • Applications can be built without a need to call our APIs in runtime hot loops, improving speed and robustness
To execute the abstract calculation pipelines you pick an approach that suits your needs:
  • Coming Soon Call our Calculate API and we’ll calculate the cost for you
  • Implement code in your application to execute them

Usage

Common usage of the API revolves around:
  1. Find the Tariffs that apply for the metering point(s) you are interested in
  2. Choose all or some Tariff Components of the tariff that you care about
  3. Evaluate the Calculation Pipelines of those Tariff Components using your metering point’s datasets.
You can find Tariffs in multiple ways:
  • Look up system-operator Party by name, country or other filters, then ask for Tariffs that are offered by that system-operator
  • Look up Metering Grid Area by metering point lat/lon, address, name or other filters and then ask for Tariffs that are available in that MGA.