Skip to content

Energy-cost tariff

The energy_cost source serves the prices of a tariff you write yourself, in energy-cost’s tariff format: a fixed price, a time-of-use price, or a price that follows the day-ahead market.

Install: pip install "cofy-api[tariff,energy-cost]"

Fits: tariff, directive and timeseries.

Field What it is
tariff The tariff: a list of versions, or a resource holding one. Required.
cost_group Which prices to serve: consumption, injection, capacity or fixed. If left out, each request picks one with a cost_group parameter, consumption by default.
cache How to cache prices. Optional; give it a max_age.
  • Prices in EUR/MWh: the sum of the cost types in the chosen group.
  • Resolutions PT5M, PT15M, PT1H, P1D and P7D.
  • A tariff that follows an index can only be asked for at the resolution of that index, such as PT15M.

Only prices per MWh and time of use can be served as a price per moment. Fixed amounts, tiers, lowest-or-highest, by-meter-type and capacity prices can’t.

A dynamic tariff following the Belgian day-ahead price, at /tariff/dynamic/v1, and its injection price at /tariff/dynamic/v1?cost_group=injection:

type: tariff
name: dynamic
description: Our dynamic tariff, following the Belpex.
source:
type: energy_cost
tariff:
- start: 2024-01-01T00:00:00+01:00
consumption:
constant_cost: 10.0
variable_costs:
- { index: Belpex15min, scalar: 1.05 }
injection:
constant_cost: 14.56
variable_costs:
- { index: Belpex15min, scalar: -0.9876 }

The index has to be known to the Cofy API; ask whoever runs it which indexes are available.

A tariff used in several places can be a resource of type tariff:

resources:
- type: tariff
name: dynamic
value:
- start: 2024-01-01T00:00:00+01:00
consumption: { constant_cost: 95.0 }
modules:
- type: tariff
name: dynamic
source:
type: energy_cost
tariff: { type: resource, name: dynamic }
cost_group: consumption