# Get Accounting Point Source: https://docs.engrate.io/api-reference/accounting-points/get-accounting-point /openapi.json get /market-access/v1alpha1/accounting-points/{id} Read one accounting point, with its master data, supply periods and aggregate allocations. Use `as_of` to read the master data for another date. Use `known_at` to read the data as Engrate knew it at an earlier time. See [Accounting points](/market-communication/structuring/accounting-points). Errors: - `404`: your organization is not set up for market communication, or it has no accounting point with this identifier. - `422`: a parameter is not valid. For example, `known_at` has no time zone. # List Accounting Point Observations Source: https://docs.engrate.io/api-reference/accounting-points/list-accounting-point-observations /openapi.json get /market-access/v1alpha1/accounting-points/{id}/observations List each statement that the market made about one accounting point. Each statement gives one fact for a period of validity. The list is in order of `stated_at`, then in the order that the messages came in. Engrate applies the statements in this order to make the `master_data` of the accounting point. Errors: - `404`: your organization is not set up for market communication, or it has no accounting point with this identifier. - `422`: `id` is not a UUID. # List Accounting Points Source: https://docs.engrate.io/api-reference/accounting-points/list-accounting-points /openapi.json get /market-access/v1alpha1/accounting-points List the accounting points of your organization, in the order of their market identifiers. Every filter you give must match. Engrate reads the master data as of today on the calendar of the market. The listing does not include `aggregate_allocations`: read one accounting point for them. Errors: - `404`: your organization is not set up for market communication. Contact Engrate. - `422`: a filter is not valid. For example, `id` is not a UUID. # Accounting Point Source: https://docs.engrate.io/api-reference/accounting-points/models/accounting-point # Connection Status Source: https://docs.engrate.io/api-reference/accounting-points/models/connection-status # Master Data Source: https://docs.engrate.io/api-reference/accounting-points/models/master-data # Settlement Method Source: https://docs.engrate.io/api-reference/accounting-points/models/settlement-method # Supply Period Source: https://docs.engrate.io/api-reference/accounting-points/models/supply-period # Accounting points API Source: https://docs.engrate.io/api-reference/accounting-points/overview Read the accounting points of your organization, their master data and their supply periods. > [!NOTE] > > This API is alpha. It can change without notice. Today it covers the German market. An accounting point is the point in the grid where supply can change from one supplier to another. Engrate adds an accounting point to your organization when you create a supplier switch for it. [Accounting points](/market-communication/structuring/accounting-points) explains the model. | Endpoint | What it does | | - | - | | [List Accounting Points](/api-reference/accounting-points/list-accounting-points) | List your accounting points, with today's master data and their supply periods. | | [Get Accounting Point](/api-reference/accounting-points/get-accounting-point) | Read one accounting point, with its aggregate allocations. Read the master data for any date, or as Engrate knew it at an earlier time. | | [List Accounting Point Observations](/api-reference/accounting-points/list-accounting-point-observations) | List each statement that the market made about one accounting point. | ## Master data and observations The grid operator states each fact about an accounting point for a period of validity, and can correct it later. Engrate keeps every statement as an observation. The master data is what the observations give for one date: * `as_of` selects the date. It defaults to today on the calendar of the market. * `known_at` selects the time. The master data then includes only the statements that Engrate had received at that time. It defaults to now. A fact is null when the market states no value for the date. All endpoints take your organization's API key in the `authorization` header. See [Authentication](/guides/authentication). # Aggregate allocation Source: https://docs.engrate.io/api-reference/allocations/models/aggregate-allocation # Aggregate allocation record Source: https://docs.engrate.io/api-reference/allocations/models/aggregate-allocation-record # Aggregator role Source: https://docs.engrate.io/api-reference/allocations/models/aggregator-role # Allocation basis Source: https://docs.engrate.io/api-reference/allocations/models/allocation-basis # Allocation quality Source: https://docs.engrate.io/api-reference/allocations/models/allocation-quality # Allocation record Source: https://docs.engrate.io/api-reference/allocations/models/allocation-record # Allocation series Source: https://docs.engrate.io/api-reference/allocations/models/allocation-series-item # Finality Source: https://docs.engrate.io/api-reference/allocations/models/finality # Allocations API Overview Source: https://docs.engrate.io/api-reference/allocations/overview Accounting point energy allocations The Allocations API returns the energy volumes the market allocates to your accounting points. It provides both per-accounting-point energy volumes, which we call Allocations, as well as aggregated series that the market sends us, which we call Aggregate Allocations. This is an alpha API. It may change without notice. ## How this API is structured The Allocations and Aggregate Allocations endpoints expose a sort of "giant table" view of timeseries data. The tables contain "Series", representing some timeseries dataset the market has sent. When using the API, you request the subset of the data that you care about - for instance all Allocations pertaining to some Accounting Point, or all Aggregate Allocations pertaining to a particular area, balance responsible party or supplier. See [List Allocations](/api-reference/timeseries/list-allocations) and [List Aggregate Allocations](/api-reference/timeseries/list-aggregate-allocations) for what filtering options are available to you. You can also list the series themselves, under [List Allocation Series](/api-reference/timeseries/list-allocation-series) and [List Aggregate Allocation Series](/api-reference/timeseries/list-aggregate-allocation-series). ## Multiple values per timestep Within a series, there can be multiple values for each timestep! The reason for this is that markets send multiple versions of most timeseries of differing "quality" and "finality" levels. Initially you may receive coarse estimates or forecasts, moving to increasingly correct values and, in some cases, corrections arriving much later. See [Quality in each market](/market-communication/allocations/accounting-points#quality-in-each-market) and [Finality and quality in each market](/market-communication/allocations/aggregate-allocations#finality-and-quality-in-each-market) for how each market's codes map to quality and finality. Engrate stores all the values that arrive, and exposes them in this API such that you can see all of them. This serves two primary purposes: 1. It lets you train models on the data as it will be when the model runs. By only training on data that's known by, for example, 10AM, you don't produce misfit models. 2. It allows you to make decisions on your level of trust in the data. For critical pipelines like controlling, you may choose to monitor how much data is of high quality or high finality levels, and delay running the pipelines until sufficient quality data has arrived. This does mean that you need to handle multiple values per series and timestep. To get the current value of a timestep, in both Allocations and Aggregate Allocations: 1. Use the value with the highest finality. 2. Among values without a finality, use the value with the most trusted quality. 3. If more than one value is still left, use the one with the latest `stated_at`. 4. If more than one value is still left, use the first of them in the response. Finality comes before quality because a later settlement run replaces an earlier one, even when the market gives the later value a lower quality. [List Allocations](/api-reference/timeseries/list-allocations) and [List Aggregate Allocations](/api-reference/timeseries/list-aggregate-allocations) return the values of each timestep in this order, so the first value is the current one. Each value has two timestamps: * `stated_at` is the market's timestamp for the value. The market uses it to tell a new version of a value from an older one. * `known_at` is when Engrate learned the value. Use it to read the data as it was at an earlier time. It does not tell you which value is current, because a newer version can arrive before an older one. # List Audit Logs Source: https://docs.engrate.io/api-reference/audit-logs/list-audit-logs /openapi.json get /schedule-management/v1/audit-logs Query audit logs with optional filters. Filters: - schedule_uid: Filter by related schedule - order: NEWEST_FIRST (default) or OLDEST_FIRST - limit: Maximum number of results (default 50, max 1000) # Calculate Tariff Source: https://docs.engrate.io/api-reference/calculate-tariff /openapi.json post /cost-of-energy/v1/calculate Calculate costs for a [Tariff](/api-reference/cost-of-energy/models/tariff). Executes the calculation pipeline for each tariff component that is active within the requested period. The caller must supply data for every dataset required by the active components, either as inline `time_series`, persisted `profiles`, or a combination of both. Dataset names must not overlap between the two inputs. # Confirmations API Overview Source: https://docs.engrate.io/api-reference/confirmations/overview The values that the Scheduling Area Responsible uses for your schedules Confirmed schedules give the values that the Scheduling Area Responsible uses for your schedules, across delivery days. Use them to check an imbalance invoice against the values that settlement uses, or to compare a schedule with your allocations. This is an alpha API. It may change without notice. ## Series A confirmed schedule series is one series of your schedules in the scheduling area of the schedule, across delivery days. Its `series_id` stays the same on each delivery day. An external series is in the schedules of both its scheduling areas, and the Scheduling Area Responsible of each area confirms it separately. Thus it is a different series in each area. [List Confirmed Schedule Series](/api-reference/timeseries/list-confirmed-schedule-series) gives each series with its kind, areas and parties. ## One record for each settlement period [List Confirmed Schedules](/api-reference/timeseries/list-confirmed-schedules) gives a list of records in `values`. Each record is one point of a series: the confirmation for one settlement period. There is at most one record for each series and settlement period, with the confirmation that is in force. | `kind` | The Scheduling Area Responsible | `volume_wh` | | - | - | - | | `confirmed` | uses your value. | The value | | `modified` | uses a different value. | The value it uses | | `imposed` | sets a value for a series or a period that you did not send. | The value it sets | | `rejected` | rejected the series, and uses no value of it. | `null` | A settlement period without a record has no confirmation that Engrate has recorded. `volume_wh` is the energy over the settlement period in Wh. ## Finality `finality` is the confirmation finality. It is `intermediate` while the confirmation can change, and `final` when settlement uses it. Use the filter `finality=final` to read only the values that settlement uses. In the Netherlands, TenneT does not state when a confirmation is final, thus each value there is `intermediate`. ## Range One request covers at most 32 days, thus a whole calendar month fits in one request. # List holidays Source: https://docs.engrate.io/api-reference/core/holidays GET /core/v1/holidays List public holidays in a range of years. Returns the holiday occurrences for years in `[start_year, end_year)` (`start_year` inclusive, `end_year` exclusive). Optionally filterable by country (ISO 3166-1 alpha-2 lowercase) and by specific holiday identifiers (e.g. `se/julafton`). Each occurrence carries the IANA timezone in which the holiday is observed. ## Holiday identifiers | Value | Description | | - | - | | `no/forste_nyttarsdag` | January 1st. | | `no/skjartorsdag` | The Thursday before Easter Sunday (moveable). | | `no/langfredag` | The Friday before Easter Sunday (moveable). | | `no/forste_paskedag` | Easter Sunday (moveable). | | `no/andre_paskedag` | The Monday after Easter Sunday (moveable). | | `no/arbeidernes_dag` | May 1st. | | `no/kristi_himmelfartsdag` | Ascension Day, the Thursday 39 days after Easter (moveable). | | `no/grunnlovsdag` | May 17th. | | `no/forste_pinsedag` | Whit Sunday / Pentecost (moveable). | | `no/andre_pinsedag` | Whit Monday (moveable). | | `no/forste_juledag` | December 25th. | | `no/andre_juledag` | December 26th. | | `se/nyarsdagen` | January 1st. | | `se/trettondagsafton` | January 5th (Epiphany Eve). | | `se/trettondedag_jul` | January 6th (Epiphany). | | `se/skartorsdagen` | The Thursday before Easter Sunday (moveable). | | `se/langfredagen` | The Friday before Easter Sunday (moveable). | | `se/paskafton` | The Saturday before Easter Sunday — Easter Eve (moveable). | | `se/paskdagen` | Easter Sunday (moveable). | | `se/annandag_pask` | The Monday after Easter Sunday (moveable). | | `se/forsta_maj` | May 1st. | | `se/kristi_himmelsfard` | Ascension Day, the Thursday 39 days after Easter (moveable). | | `se/pingstafton` | Whitsun Eve, the Saturday before Pentecost (moveable). | | `se/nationaldagen` | June 6th. | | `se/midsommarafton` | The Friday before Midsummer Day (moveable). | | `se/allhelgonaafton` | The Friday between October 30th and November 5th — All Saints' Eve. | | `se/julafton` | December 24th. | | `se/juldagen` | December 25th. | | `se/annandag_jul` | December 26th. | | `se/nyarsafton` | December 31st. | # Accounting Point Source: https://docs.engrate.io/api-reference/core/models/accounting-point An Accounting Point is a concept from the [ENTSO-E Harmonized Electricity Market Role Model](https://www.entsoe.eu/data/cim/role-models/), which defines it as: > A domain under balance responsibility where Energy Supplier change can take place and for which commercial business processes are defined. > > This is a type of [Metering Point](/api-reference/core/models/metering-point). # Bidding Zone Source: https://docs.engrate.io/api-reference/core/models/bidding-zone # Control Area Source: https://docs.engrate.io/api-reference/core/models/control-area # Extra Identifier Source: https://docs.engrate.io/api-reference/core/models/extra-identifier # Meter Source: https://docs.engrate.io/api-reference/core/models/meter A Meter is a concept from the [ENTSO-E Harmonized Electricity Market Role Model](https://www.entsoe.eu/data/cim/role-models/), which defines it as: > A physical device containing one or more [registers](/api-reference/core/models/register). # Metering Grid Area Source: https://docs.engrate.io/api-reference/core/models/metering-grid-area # Metering Point Source: https://docs.engrate.io/api-reference/core/models/metering-point A Metering Point is a concept from the [ENTSO-E Harmonized Electricity Market Role Model](https://www.entsoe.eu/data/cim/role-models/), which defines it as: > An entity where energy products are measured or computed. # Party Source: https://docs.engrate.io/api-reference/core/models/party # Register Source: https://docs.engrate.io/api-reference/core/models/register A Register is a concept from the [ENTSO-E Harmonized Electricity Market Role Model](https://www.entsoe.eu/data/cim/role-models/), which defines it as: > A physical or logical counter measuring energy product. # Resource Source: https://docs.engrate.io/api-reference/core/models/resource A Resource is a concept from the [ENTSO-E Harmonized Electricity Market Role Model](https://www.entsoe.eu/data/cim/role-models/), which defines it as: > A market representation of an asset or a group of assets related to the energy industry. > > A Resource represents for example grid assets, consumption assets or production assets, such as generating units, consumption units, energy storage units or virtual power plants. # Scheduling Area Source: https://docs.engrate.io/api-reference/core/models/scheduling-area # Core API Overview Source: https://docs.engrate.io/api-reference/core/overview Engrate Core API covers the fundamentals The Core API defines fundamental building blocks we use to talk about the Electricity System. The European electricity grid is undergoing large changes, and the language used to talk about it is in flux. Each country has its own legal and regulatory frameworks, language and roles structure defining who does what. At the same time, the system is increasingly regulated on the European level, which means a shared language is emerging. As much as possible the Engrate API leans on the official [Harmonized Electricity Role Model](https://www.entsoe.eu/data/cim/role-models/). This helps our APIs be general, making it possible for clients to think about all of Europe in one holistic domain model. At the same time, local differences are still present. Engrate tries to be pragmatic but forward looking: * We aspire to a single pan-European model * We keep the scope small, naming only those concepts we need for the API * Where necessary we augment the harmonized model, [Extra Identifier](/api-reference/core/models/extra-identifier) being one such example ## Core concepts * [Party](/api-reference/core/models/party) represents market parties, legal entities that serve one or more roles in the system * [Metering Grid Area](/api-reference/core/models/metering-grid-area) is a collection of metering points operated by some [Party](/api-reference/core/models/party) serving as a `system-operator` # Calculation Pipeline Source: https://docs.engrate.io/api-reference/cost-of-energy/calculation-pipeline An algebra for calculating the cost of energy How energy costs are calculated varies not only across [System Operators](/api-reference/core/models/party), but also over time, energy consumption levels, power usage and so on. A given metering point may have one set of calculations one day, and a different set the next as rules are changed. There is also a very wide *range* of calculations, with market parties broadly left up to their own devices to invent rate "algorithms". Calculation pipelines are a minimal *algebra* that abstracts this away - as new tariffs are invented or you enter new markets, your code keeps working. This lets you build systems that require much less maintenance than manually implementing and updating hundreds of tariffs. The calculation pipelines are a sequential list of a small set of [Functions](/api-reference/cost-of-energy/functions/overview), each taking zero or more input [Datasets](/api-reference/cost-of-energy/models/dataset), and producing a single output [Dataset](/api-reference/cost-of-energy/models/dataset). Evaluating each function in order will give you the final cost dataset. > [!TIP] > > For the technically curious, the calculation pipeline is a form of [Static Single Assignment](https://en.wikipedia.org/wiki/Static_single-assignment_form) representation — each step assigns a new named dataset, which then serves as input for later steps. Pipelines usually start with one or more well-known [Registered Datasets](/api-reference/cost-of-energy/models/dataset). Those are datasets that you'll need to provide to the calculation, like how much energy was or will be consumed per quarter-hour. ## Two execution modes Pipelines support two execution modes against the same definition: deterministic evaluation (calculation, illustrated by the examples below) or compilation into an optimisation model when one or more inputs are decision variables. See [Optimisation](/api-reference/cost-of-energy/optimisation) for the optimisation form. # Example pipelines Let's walk through a series of increasingly powerful examples to help get a feel for how the pipelines express different cost structures. Note each example is available as a diagram and as the equivalent JSON representation. The diagrams are available in LLM-readable mermaid diagrams in [llms-full.txt](https://docs.engrate.io/llms-full.txt). ## Example: Fixed monthly fee This is likely the very simplest example we can give: Each month, the metering point is billed some fixed fee. The fee is the same independent of what the metering point does, so there are no [Registered Datasets](/api-reference/cost-of-energy/models/dataset) needed. The pipeline consists of a single [Constant Function](/api-reference/cost-of-energy/functions/constant) which outputs a fixed cost per month. > [tab] Diagram > > ```mermaid theme={null} > %%{init: {'theme': 'base'}}%% > graph TD > fn_0_constant("constant
110.0 SEK · monthly") > result_cost("Fixed monthly fee") > fn_0_constant -->|cost| result_cost > click fn_0_constant "/api-reference/cost-of-energy/functions/constant" > class fn_0_constant eg-fn > class result_cost eg-output > ``` > [tab] JSON > > ```json theme={null} > { > "name": "Fixed monthly fee", > "applicable_from": "2026-01-01T00:00:00+01:00", > "applicable_to": "2027-01-01T00:00:00+01:00", > "timezone": "Europe/Stockholm", > "datasets": [], > "functions": [ > { > "type": "constant", > "value": { > "value": 110.0, > "unit": "SEK" > }, > "resolution": "monthly", > "output": { > "id": "cost", > "resolution": "monthly", > "unit": "SEK" > } > } > ], > "cost": { > "id": "cost", > "resolution": "monthly", > "unit": "SEK" > } > } > ``` ## Example: Energy tax Let's take it a step further and do a calculation that *does* depend on what the Metering Point does. The energy tax in Sweden is calculated based on energy consumed from the grid. There is a [Registered Dataset](/api-reference/cost-of-energy/models/dataset) for the energy consumption that is tracked on a quarter-hourly basis by the electricity meter. This one we pass as input to the [Multiply](/api-reference/cost-of-energy/functions/multiply) function together with the energy tax price to get the tax cost per quarter-hour. > [tab] Diagram > > ```mermaid theme={null} > %%{init: {'theme': 'base'}}%% > graph TD > ds_quarter-hourly-energy-offtake("quarter-hourly-energy-offtake
quarter_hourly · kWh") > fn_0_multiply("multiply
× 36.0 SEK per kWh") > result_cost("Energy tax") > ds_quarter-hourly-energy-offtake --> fn_0_multiply > fn_0_multiply -->|cost| result_cost > click fn_0_multiply "/api-reference/cost-of-energy/functions/multiply" > class ds_quarter-hourly-energy-offtake eg-dataset > class fn_0_multiply eg-fn > class result_cost eg-output > ``` > [tab] JSON > > ```json theme={null} > { > "name": "Energy tax", > "applicable_from": "2026-01-01T00:00:00+01:00", > "applicable_to": "2027-01-01T00:00:00+01:00", > "timezone": "Europe/Stockholm", > "datasets": [ > { > "id": "quarter-hourly-energy-offtake", > "resolution": "quarter_hourly", > "unit": "kWh" > } > ], > "functions": [ > { > "type": "multiply", > "left": { > "id": "quarter-hourly-energy-offtake", > "resolution": "quarter_hourly", > "unit": "kWh" > }, > "right": { > "value": 36.0, > "unit": "SEK_per_kWh" > }, > "output": { > "id": "cost", > "resolution": "quarter_hourly", > "unit": "SEK" > } > } > ], > "cost": { > "id": "cost", > "resolution": "quarter_hourly", > "unit": "SEK" > } > } > ``` ## Example: Peak tariff Some rate plans charge you for "peak" usage - but what exactly is a "peak"? Unfortunately that depends on which [System Operators](/api-reference/core/models/party) you ask. This example shows a simplified peak calculation: * In each month, find the three highest hourly peaks * Take the average of those three * Multiply that average with some fee To do this we: 1. [Aggregate](/api-reference/cost-of-energy/functions/aggregate) the quarter-hour consumption data to hourly kWh by summing it 2. [Divide](/api-reference/cost-of-energy/functions/divide) the hourly energy consumption data by 1 hour to convert to kW (yes, yes, but otherwise we would have needed to add a separate 'conversion' operator you know) 3. [Select](/api-reference/cost-of-energy/functions/select) the 3 highest values per month (see [Absent Values](/api-reference/cost-of-energy/models/dataset)) 4. [Aggregate](/api-reference/cost-of-energy/functions/aggregate) to monthly peaks by taking the mean of those 3 peaks 5. [Multiply](/api-reference/cost-of-energy/functions/multiply) the monthly peak value by the fee to get the final cost > [tab] Diagram > > ```mermaid theme={null} > %%{init: {'theme': 'base'}}%% > graph TD > ds_quarter-hourly-energy-offtake("quarter-hourly-energy-offtake
quarter_hourly · kWh") > fn_0_aggregate("aggregate
sum · hourly") > fn_1_divide("divide
hourly-energy-offtake ÷ 1.0 hours") > fn_2_select("select
top 3 · monthly") > fn_3_aggregate("aggregate
mean · monthly") > fn_4_multiply("multiply
× 50.0 SEK per kW") > result_cost("Peak power fee") > ds_quarter-hourly-energy-offtake --> fn_0_aggregate > fn_0_aggregate -->|hourly-energy-offtake| fn_1_divide > fn_1_divide -->|hourly-power-offtake| fn_2_select > fn_2_select -->|top3-power-per-month| fn_3_aggregate > fn_3_aggregate -->|monthly-peak| fn_4_multiply > fn_4_multiply -->|cost| result_cost > click fn_0_aggregate "/api-reference/cost-of-energy/functions/aggregate" > click fn_1_divide "/api-reference/cost-of-energy/functions/divide" > click fn_2_select "/api-reference/cost-of-energy/functions/select" > click fn_3_aggregate "/api-reference/cost-of-energy/functions/aggregate" > click fn_4_multiply "/api-reference/cost-of-energy/functions/multiply" > class ds_quarter-hourly-energy-offtake eg-dataset > class fn_0_aggregate eg-fn > class fn_1_divide eg-fn > class fn_2_select eg-fn > class fn_3_aggregate eg-fn > class fn_4_multiply eg-fn > class result_cost eg-output > ``` > [tab] JSON > > ```json theme={null} > { > "name": "Peak power fee", > "applicable_from": "2026-01-01T00:00:00+01:00", > "applicable_to": "2027-01-01T00:00:00+01:00", > "timezone": "Europe/Stockholm", > "datasets": [ > { > "id": "quarter-hourly-energy-offtake", > "resolution": "quarter_hourly", > "unit": "kWh" > } > ], > "functions": [ > { > "type": "aggregate", > "input": { > "id": "quarter-hourly-energy-offtake", > "resolution": "quarter_hourly", > "unit": "kWh" > }, > "resolution": "hourly", > "aggregation_function": "sum", > "output": { > "id": "hourly-energy-offtake", > "resolution": "hourly", > "unit": "kWh" > } > }, > { > "type": "divide", > "numerator": { > "id": "hourly-energy-offtake", > "resolution": "hourly", > "unit": "kWh" > }, > "denominator": { > "value": 1.0, > "unit": "hours" > }, > "output": { > "id": "hourly-power-offtake", > "resolution": "hourly", > "unit": "kW" > } > }, > { > "type": "select", > "input": { > "id": "hourly-power-offtake", > "resolution": "hourly", > "unit": "kW" > }, > "condition": { > "type": "highest", > "n": 3, > "resolution": "monthly" > }, > "output": { > "id": "top3-power-per-month", > "resolution": "hourly", > "unit": "kW" > } > }, > { > "type": "aggregate", > "input": { > "id": "top3-power-per-month", > "resolution": "hourly", > "unit": "kW" > }, > "resolution": "monthly", > "aggregation_function": "mean", > "output": { > "id": "monthly-peak", > "resolution": "monthly", > "unit": "kW" > } > }, > { > "type": "multiply", > "left": { > "id": "monthly-peak", > "resolution": "monthly", > "unit": "kW" > }, > "right": { > "value": 50.0, > "unit": "SEK_per_kW" > }, > "output": { > "id": "cost", > "resolution": "monthly", > "unit": "SEK" > } > } > ], > "cost": { > "id": "cost", > "resolution": "monthly", > "unit": "SEK" > } > } > ``` ## Following the values through To see what each function does, follow a few real values through a peak fee: Mälarenergi's Effektavgift for a 20 A house in January 2026. It charges for the highest hour on weekdays between 07:00 and 19:00, holidays excluded, at 47.4 SEK per kW. ```mermaid theme={null} %%{init: {'theme': 'base'}}%% graph TD ds_quarter-hourly-energy-offtake("quarter-hourly-energy-offtake
quarter_hourly · kWh") fn_0_aggregate("aggregate
sum · hourly") fn_1_divide("divide
÷ 1.0 hours") fn_2_select("select
weekdays 07:00–19:00, no holidays") fn_3_aggregate("aggregate
max · monthly") fn_4_multiply("multiply
× 47.4 SEK per kW") result_cost("Effektavgift") ds_quarter-hourly-energy-offtake --> fn_0_aggregate fn_0_aggregate -->|hourly_energy| fn_1_divide fn_1_divide -->|power| fn_2_select fn_2_select -->|filtered_power| fn_3_aggregate fn_3_aggregate -->|monthly_peak| fn_4_multiply fn_4_multiply -->|cost| result_cost click fn_0_aggregate "/api-reference/cost-of-energy/functions/aggregate" click fn_1_divide "/api-reference/cost-of-energy/functions/divide" click fn_2_select "/api-reference/cost-of-energy/functions/select" click fn_3_aggregate "/api-reference/cost-of-energy/functions/aggregate" click fn_4_multiply "/api-reference/cost-of-energy/functions/multiply" class ds_quarter-hourly-energy-offtake eg-dataset class fn_0_aggregate eg-fn class fn_1_divide eg-fn class fn_2_select eg-fn class fn_3_aggregate eg-fn class fn_4_multiply eg-fn class result_cost eg-output ``` Take one weekday evening in January, 18:00 to 20:00, and suppose it is the house's only usage that month: | Step | Output | Values | | - | - | - | | Input | quarter-hourly · kWh | 18:00 **0.6**, 18:15 **0.7**, 18:30 **0.5**, 18:45 **0.6**, 19:00 **0.9**, 19:15 **1.0**, 19:30 **0.8**, 19:45 **0.7** | | Aggregate, sum per hour | hourly · kWh | 18:00 **2.4**, 19:00 **3.4** | | Divide by one hour | hourly · kW | 18:00 **2.4**, 19:00 **3.4** | | Select weekdays 07:00–19:00 | hourly · kW | 18:00 **2.4**. The 19:00 hour falls outside the window and is dropped. | | Aggregate, max per month | monthly · kW | January **2.4** | | Multiply by 47.4 SEK per kW | monthly · SEK | January **113.76** | Eight values in, 113.76 SEK out. The bigger hour, 19:00, never counted. Pass `include_intermediate_time_series=true` to [Calculate](/api-reference/calculate-tariff) to get every one of these steps back for your own data. # Condition: And Source: https://docs.engrate.io/api-reference/cost-of-energy/conditions/and # Condition: DayOfWeek Source: https://docs.engrate.io/api-reference/cost-of-energy/conditions/day-of-week # Condition: ExcludeHolidays Source: https://docs.engrate.io/api-reference/cost-of-energy/conditions/exclude-holidays Condition that excludes certain holidays. The dates each holiday resolves to are available via the [`GET /core/v1/holidays`](/api-reference/core/holidays) endpoint. ## Holiday strings | Value | Description | | - | - | | `no/forste_nyttarsdag` | January 1st. | | `no/skjartorsdag` | The Thursday before Easter Sunday (moveable). | | `no/langfredag` | The Friday before Easter Sunday (moveable). | | `no/forste_paskedag` | Easter Sunday (moveable). | | `no/andre_paskedag` | The Monday after Easter Sunday (moveable). | | `no/arbeidernes_dag` | May 1st. | | `no/kristi_himmelfartsdag` | Ascension Day, the Thursday 39 days after Easter (moveable). | | `no/grunnlovsdag` | May 17th. | | `no/forste_pinsedag` | Whit Sunday / Pentecost (moveable). | | `no/andre_pinsedag` | Whit Monday (moveable). | | `no/forste_juledag` | December 25th. | | `no/andre_juledag` | December 26th. | | `se/nyarsdagen` | January 1st. | | `se/trettondagsafton` | January 5th (Epiphany Eve). | | `se/trettondedag_jul` | January 6th (Epiphany). | | `se/skartorsdagen` | The Thursday before Easter Sunday (moveable). | | `se/langfredagen` | The Friday before Easter Sunday (moveable). | | `se/paskafton` | The Saturday before Easter Sunday — Easter Eve (moveable). | | `se/paskdagen` | Easter Sunday (moveable). | | `se/annandag_pask` | The Monday after Easter Sunday (moveable). | | `se/forsta_maj` | May 1st. | | `se/kristi_himmelsfard` | Ascension Day, the Thursday 39 days after Easter (moveable). | | `se/pingstafton` | Whitsun Eve, the Saturday before Pentecost (moveable). | | `se/nationaldagen` | June 6th. | | `se/midsommarafton` | The Friday before Midsummer Day (moveable). | | `se/allhelgonaafton` | The Friday between October 30th and November 5th — All Saints' Eve. | | `se/julafton` | December 24th. | | `se/juldagen` | December 25th. | | `se/annandag_jul` | December 26th. | | `se/nyarsafton` | December 31st. | # Condition: Highest Source: https://docs.engrate.io/api-reference/cost-of-energy/conditions/highest # Condition: Lowest Source: https://docs.engrate.io/api-reference/cost-of-energy/conditions/lowest # Condition: Month Source: https://docs.engrate.io/api-reference/cost-of-energy/conditions/month # Condition: Not Source: https://docs.engrate.io/api-reference/cost-of-energy/conditions/not # Condition: Or Source: https://docs.engrate.io/api-reference/cost-of-energy/conditions/or # Conditions Source: https://docs.engrate.io/api-reference/cost-of-energy/conditions/overview Available Conditions Conditions are used by operations like [Select](/api-reference/cost-of-energy/functions/select) and [Mask](/api-reference/cost-of-energy/functions/mask) to define when the operation applies. Conditions are represented as a [tagged union](https://en.wikipedia.org/wiki/Tagged_union), using the field `type` which every condition contains. Anywhere a condition is accepted you may find any of the conditions listed here, and you tell them apart using the value of the `type` field. ### Time conditions | Condition | Tag | Description | | - | - | - | | [Month](/api-reference/cost-of-energy/conditions/month) | `month` | Only applies in the specified months. | | [DayOfWeek](/api-reference/cost-of-energy/conditions/day-of-week) | `day_of_week` | Only applies on the specified days of the week. | | [TimeOfDay](/api-reference/cost-of-energy/conditions/time-of-day) | `time_of_day` | Only applies within the specified time-of-day range. | | [ExcludeHolidays](/api-reference/cost-of-energy/conditions/exclude-holidays) | `exclude_holidays` | Applies on all days except the specified holidays. | | [And](/api-reference/cost-of-energy/conditions/and) | `and` | Applies when all sub-conditions are met. | | [Or](/api-reference/cost-of-energy/conditions/or) | `or` | Applies when any sub-condition is met. | | [Not](/api-reference/cost-of-energy/conditions/not) | `not` | Applies when the sub-condition doesn't apply. | ### Value conditions | Condition | Tag | Description | | - | - | - | | [Highest](/api-reference/cost-of-energy/conditions/highest) | `highest` | Keep the N highest values per resolution window. | | [Lowest](/api-reference/cost-of-energy/conditions/lowest) | `lowest` | Keep the N lowest values per resolution window. | # Condition: TimeOfDay Source: https://docs.engrate.io/api-reference/cost-of-energy/conditions/time-of-day # Python SDK Source: https://docs.engrate.io/api-reference/cost-of-energy/engratepy Use engratepy to calculate and optimise cost of energy in Python. `engratepy` is Engrate's Python SDK for Cost of Energy. ```bash theme={null} pip install engratepy ``` Use it to: * calculate tariff cost from your own time-series data * discover which input datasets a tariff needs * embed tariff cost into optimisation models ([HiGHS](https://highs.dev) and [Gurobi](https://www.gurobi.com)) ## Authenticate Create a client with your [API key](/guides/authentication): ```python theme={null} from engratepy import Engrate engrate = Engrate(api_key="YOUR_API_KEY") ``` ## Discover Required Input Datasets Before calculating or optimising, you can ask the SDK which datasets the tariff requires for the calculation period: ```python theme={null} datasets = await engrate.get_input_datasets( tariff_id=tariff_id, start_time=..., end_time=..., ) ``` ## Calculate Cost Run a cost calculation over a period: ```python theme={null} costs_per_tariff_component = await engrate.calculate_cost( tariff_id=tariff_id, start_time=..., end_time=..., data={dataset: {timestamp: value, ...}}, # dataset from get_input_datasets ) ``` ## Use in Optimisation Models `engratepy` can even add tariff costs directly to solver models: ```python HiGHS theme={null} import highspy model = highspy.Highs() costs_per_tariff_component = await engrate.add_to_highs_model( tariff_id=tariff_id, start_time=..., end_time=..., data={dataset: {timestamp: value, ...}}, # fixed inputs, e.g. spot prices variables={dataset: {timestamp: variable, ...}}, # your decision variables model=model, ) ``` ```python Gurobi theme={null} import gurobipy model = gurobipy.Model() costs_per_tariff_component = await engrate.add_to_gurobi_model( tariff_id=tariff_id, start_time=..., end_time=..., data={dataset: {timestamp: value, ...}}, # fixed inputs, e.g. spot prices variables={dataset: {timestamp: variable, ...}}, # your decision variables model=model, ) ``` The model is extended in place, and cost is returned per component, either as a variable into the model, with constraints tying it to your decision variables, or as plain numbers where it is fixed. Need support for another solver? We would love to hear from you - contact [support@engrate.io](mailto:support@engrate.io) and we can discuss your use case. ## Cookbook For full working examples, take a look at our [cookbook](https://github.com/engrate/engrate-cookbook). ## License `engratepy` is available under an evaluation license. You are welcome to use it for internal evaluation, testing, learning, and prototyping in non-production environments. Production or commercial use requires a separate signed commercial license with Engrate. To discuss commercial licensing, contact [support@engrate.io](mailto:support@engrate.io). ## Related Docs * [Cost of Energy API Overview](/api-reference/cost-of-energy/overview) * [Calculation Pipeline](/api-reference/cost-of-energy/calculation-pipeline) * [Tariff](/api-reference/cost-of-energy/models/tariff) * [Tariff Component](/api-reference/cost-of-energy/models/tariff-component) # Function: Add Source: https://docs.engrate.io/api-reference/cost-of-energy/functions/add # Function: Aggregate Source: https://docs.engrate.io/api-reference/cost-of-energy/functions/aggregate | Value | Description | | - | - | | `sum` | Add up all values. | | `mean` | Take the mean - average - of all values. | | `max` | Take the maximum value. | | `min` | Take the minimum value. | # Function: Clip Source: https://docs.engrate.io/api-reference/cost-of-energy/functions/clip # Function: Constant Source: https://docs.engrate.io/api-reference/cost-of-energy/functions/constant # Function: Divide Source: https://docs.engrate.io/api-reference/cost-of-energy/functions/divide # Function: Lookup Source: https://docs.engrate.io/api-reference/cost-of-energy/functions/lookup # Function: Mask Source: https://docs.engrate.io/api-reference/cost-of-energy/functions/mask # Function: Multiply Source: https://docs.engrate.io/api-reference/cost-of-energy/functions/multiply # Function Source: https://docs.engrate.io/api-reference/cost-of-energy/functions/overview Available Functions Functions are the building blocks that define [Calculation Pipelines](/api-reference/cost-of-energy/calculation-pipeline), a domain-specific algebra for computer-readable cost calculations. Functions are represented as a [tagged union](https://en.wikipedia.org/wiki/Tagged_union), using the field `type` which every function contains. Anywhere a function is accepted you may find any of the functions listed here, and you tell them apart using the value of the `type` field. | Function | Tag | Description | | - | - | - | | [Constant](/api-reference/cost-of-energy/functions/constant) | `constant` | Emit a constant value at a given resolution. | | [Add](/api-reference/cost-of-energy/functions/add) | `add` | Sum two or more operands. | | [Subtract](/api-reference/cost-of-energy/functions/subtract) | `subtract` | Compute left - right. | | [Divide](/api-reference/cost-of-energy/functions/divide) | `divide` | Compute numerator / denominator with unit algebra. | | [Multiply](/api-reference/cost-of-energy/functions/multiply) | `multiply` | Multiply two operands with unit algebra. | | [Aggregate](/api-reference/cost-of-energy/functions/aggregate) | `aggregate` | Aggregate a dataset over a coarser resolution window. | | [Resample](/api-reference/cost-of-energy/functions/resample) | `resample` | Resample a coarse-resolution series to finer resolution. | | [Select](/api-reference/cost-of-energy/functions/select) | `select` | Keep only values matching a condition (temporal or value-based). | | [Mask](/api-reference/cost-of-energy/functions/mask) | `mask` | Conditional substitution based on a condition. | | [Clip](/api-reference/cost-of-energy/functions/clip) | `clip` | Clamp values to a min/max range. | | [Lookup](/api-reference/cost-of-energy/functions/lookup) | `lookup` | Tier-based table lookup. | # Function: Resample Source: https://docs.engrate.io/api-reference/cost-of-energy/functions/resample # Function: Select Source: https://docs.engrate.io/api-reference/cost-of-energy/functions/select # Function: Subtract Source: https://docs.engrate.io/api-reference/cost-of-energy/functions/subtract # Get Simplified Tariff Source: https://docs.engrate.io/api-reference/cost-of-energy/get-simplified-tariff GET /cost-of-energy/v1/tariffs/{tariff_id}/simplified Get a simplified, indicative view of a [Tariff](/api-reference/cost-of-energy/models/tariff)'s rates over a time range. The response is a set of rate timeseries, one per (input dataset, rate unit). In each interval, `rate` is what is paid per kWh of energy on the input (for per-kWh series) or per kW of power peak derived from the input (for per-kW series), in the series' own currency. This is an approximation of the tariff's price shape, meant for heuristics that need a coarse "when is energy cheap/expensive" signal — not for exact cost calculation or optimisation. Components that don't fit a simple per-kWh or per-kW rate (fixed fees, spot-price-linked charges, overdraft fees …) are surfaced by name and applicability window in `unprojectable_components` rather than appearing in the rate timeseries. Use [Calculate Tariff](/api-reference/calculate-tariff) for exact cost calculation, or [In Optimisation](/api-reference/cost-of-energy/optimisation) for using tariffs in optimisation models. # Dataset Source: https://docs.engrate.io/api-reference/cost-of-energy/models/dataset A named timeseries with known resolution and unit. Used both for describing registered datasets (see below) as well as for naming the intermediate results that get created by each step in a function pipeline. ## Absent values All datasets in this API are fixed resolution. For an hourly dataset, there is some "slot" for each hour's value. However, some operations - [Select](/api-reference/cost-of-energy/functions/select) for instance - can remove values from datasets, leaving "holes" or absent values behind. This is used for instance to select only weekends or certain times of year, "clearing" the rest of the dataset. We leave it up to users of the API to decide how they wish to represent absent values. A common strategy is to use `NaN` to represent absent values, another common option is bit masking. ## Registered datasets These are "well known" datasets that [Tariff Components](/api-reference/cost-of-energy/models/tariff-component) take as inputs. These you need to provide "from the outside" to the calculation to determine the cost. Note that most calculations only use a subset of these - and for some metering points a dataset may not exist, in which case you can safely skip the dataset. | Name | Resolution | Unit | Description | | - | - | - | - | | quarter-hourly-energy-offtake | `quarter_hourly` | `kWh` | Energy consumed (imported) per quarter hour | | quarter-hourly-energy-injection | `quarter_hourly` | `kWh` | Energy exported (injected) per quarter hour | | yearly-firm-subscribed-offtake-capacity | `yearly` | `kW` | Firm (prima) subscribed power offtake capacity | | yearly-additional-firm-subscribed-offtake-capacity | `yearly` | `kW` | Additional firm (prima) subscribed power offtake capacity, typically only applicable during the winter period | | yearly-firm-subscribed-injection-capacity | `yearly` | `kW` | Firm (prima) subscribed power injection capacity | | yearly-conditional-subscribed-offtake-capacity | `yearly` | `kW` | Conditional (secunda) subscribed power offtake capacity | | yearly-conditional-subscribed-injection-capacity | `yearly` | `kW` | Conditional (secunda) subscribed power injection capacity | | hourly-available-conditional-offtake-capacity | `hourly` | `kW` | Conditional (secunda) offtake capacity actually available each hour — equals the subscribed level when not curtailed, lower or zero during DSO-initiated curtailment | | hourly-available-conditional-injection-capacity | `hourly` | `kW` | Conditional (secunda) injection capacity actually available each hour — equals the subscribed level when not curtailed, lower or zero during DSO-initiated curtailment | | quarter-hourly-day-ahead-price-no1 | `quarter_hourly` | `NOK_per_kWh` | Day-ahead spot price, zone NO1 | | quarter-hourly-day-ahead-price-no2 | `quarter_hourly` | `NOK_per_kWh` | Day-ahead spot price, zone NO2 | | quarter-hourly-day-ahead-price-no3 | `quarter_hourly` | `NOK_per_kWh` | Day-ahead spot price, zone NO3 | | quarter-hourly-day-ahead-price-no4 | `quarter_hourly` | `NOK_per_kWh` | Day-ahead spot price, zone NO4 | | quarter-hourly-day-ahead-price-no5 | `quarter_hourly` | `NOK_per_kWh` | Day-ahead spot price, zone NO5 | | quarter-hourly-day-ahead-price-se1 | `quarter_hourly` | `SEK_per_kWh` | Day-ahead spot price, zone SE1 | | quarter-hourly-day-ahead-price-se2 | `quarter_hourly` | `SEK_per_kWh` | Day-ahead spot price, zone SE2 | | quarter-hourly-day-ahead-price-se3 | `quarter_hourly` | `SEK_per_kWh` | Day-ahead spot price, zone SE3 | | quarter-hourly-day-ahead-price-se4 | `quarter_hourly` | `SEK_per_kWh` | Day-ahead spot price, zone SE4 | # Level Source: https://docs.engrate.io/api-reference/cost-of-energy/models/level # Periodic Amount Source: https://docs.engrate.io/api-reference/cost-of-energy/models/periodic-amount # Resolution Source: https://docs.engrate.io/api-reference/cost-of-energy/models/resolution # Tariff Source: https://docs.engrate.io/api-reference/cost-of-energy/models/tariff # Tariff Component Source: https://docs.engrate.io/api-reference/cost-of-energy/models/tariff-component # Unit Source: https://docs.engrate.io/api-reference/cost-of-energy/models/unit # In Optimisation Source: https://docs.engrate.io/api-reference/cost-of-energy/optimisation How calculation pipelines map to optimisation models A calculation pipeline is a directed dataflow of functions, each producing one output dataset from one or more inputs. The same definitions support two execution modes. **Calculation mode.** When all input datasets carry concrete values, each function computes its output deterministically. **Optimisation mode.** When one or more input datasets are declared as decision variables, each function emits output variables and constraints that link them to the inputs. Across the pipeline, these variables and constraints aggregate into a model that an optimisation solver can evaluate against an objective function. ## Example: peak power fee Consider the [peak power fee pipeline](/api-reference/cost-of-energy/calculation-pipeline) from the calculation reference. To optimise consumption against this tariff, declare quarter-hourly energy offtake $E_t$ as the decision variable. Each function emits its optimisation form: **Aggregate to hourly energy** ($T_k$: the four quarter-hours in hour $k$): $E^h_k = \sum_{t \in T_k} E_t \qquad \forall k$ **Divide by 1 hour** to get hourly power: $P^h_k = E^h_k / 1\,\text{h}$ **Select the 3 highest hours per month** ($T_m$: the hours in month $m$). Introduce a binary $\delta_{m,k} \in \lbrace 0,1 \rbrace$ and threshold $\theta_m$: $\sum_{k \in T_m} \delta_{m,k} = 3, \quad \delta_{m,k} = 1 \;\Rightarrow\; P^h_k \geq \theta_m, \quad \delta_{m,k} = 0 \;\Rightarrow\; P^h_k \leq \theta_m$ **Aggregate(mean) over selected hours.** Average the 3 selected values: $P^\text{peak}_m = \frac{1}{3} \sum_{\substack{k \in T_m \\ \delta_{m,k}=1}} P^h_k$ **Multiply by 50 SEK/kW** to get the monthly cost: $C_m = 50 \cdot P^\text{peak}_m$ The optimiser minimises $\sum_m C_m$ against $E_t$, subject to whatever consumption constraints the customer's assets impose. ### Alternative linear implementation The select-3-highest formulation above introduces a binary $\delta_{m,k}$ per hour per month, which turns the problem into a Mixed Integer Linear Programming model (MILP). The solver must reason discretely about *which* 3 hours are selected. If only the **cost** matters, which is typically the case, the same exact monthly top-$3$ peak cost can be obtained from a purely linear formulation, with no binaries. For this we introduce positive *excess variables* $z_{m,k}$ above our monthly threshold: $z_{m,k} \geq P^h_k - \theta_m \qquad \forall k \in T_m$ The monthly peak power is then simply calculated as: $P^\text{peak}_m = \theta_m + \frac{1}{3} \sum_{k \in T_m} z_{m,k}$ (monthly peak = threshold + average excess of the 3 highest hourly power values above the threshold) ## Functions > [accordion] Add > > $x_{\text{out},t} = \sum_n x_{\text{in},n,t} \qquad \forall t$ > > (where $n$ ranges over operand labels.) > [accordion] Subtract > > $x_{\text{out},t} = x_{\text{in},L,t} - x_{\text{in},R,t} \qquad \forall t$ > [accordion] Multiply > > When at least one operand is fixed (a constant or known data, $c_t$): > > $x_{\text{out},t} = c_t \cdot x_{\text{in},t} \qquad \forall t$ > > If both operands are decision variables, the relation is bilinear — most > solvers cannot handle this directly. In tariffs this is essentially never > the case: multiplies are quantity × rate, where the rate is a known `Level` > or constant data. > [accordion] Divide > > When the denominator is fixed (a constant or known data, $c_t$): > > $x_{\text{out},t} = \frac{x_{\text{in},t}}{c_t} \qquad \forall t$ > > If the denominator is a decision variable, the relation is bilinear — most > solvers cannot handle this directly. In tariffs the denominator is almost > always a known quantity (e.g. dividing energy by 1 hour to convert to power, > or dividing by a fixed time-window length). > [accordion] Aggregate > > The form depends on `aggregation_function`. ($T_k$ denotes the set of > fine-resolution timesteps in group $k$.) > > **Sum:** > > $x_{\text{out},k} = \sum_{t \in T_k} x_{\text{in},t} \qquad \forall k$ > > **Mean:** > > $x_{\text{out},k} = \frac{1}{|T_k|} \sum_{t \in T_k} x_{\text{in},t} \qquad \forall k$ > > **Max:** > > $x_{\text{out},k} \geq x_{\text{in},t} \qquad \forall t \in T_k, \forall k$ > > When minimising a cost where $x_{\text{out},k}$ has a positive coefficient, > this inequality alone is sufficient — the solver pushes $x_{\text{out},k}$ > down to $\max_t x_{\text{in},t}$. The non-convex case — when cost pressure > doesn't push $x_{\text{out},k}$ toward $\max_t x_{\text{in},t}$ — > introduces binary variables and indicator or big-M constraints. > > **Min:** > > $x_{\text{out},k} \leq x_{\text{in},t} \qquad \forall t \in T_k, \forall k$ > > Mirror of max: the inequality suffices when the cost coefficient is > negative (e.g. a credit being maximised); the non-convex case is handled > the same way. > [accordion] Resample > > Broadcasting only: each fine-resolution slot takes the value of the > coarse-resolution input for its group. > > $x_{\text{out},t} = x_{\text{in},k(t)} \qquad \forall t$ > > where $k(t)$ is the coarse-resolution group containing $t$. > [accordion] Select > > The form depends on the condition. > > **Time-based conditions** (`month`, `day_of_week`, `time_of_day`, > `exclude_holidays`, and their logical combinations): matching timesteps > are known a priori from timestamps — the output references the input for > matching timesteps, non-matching timesteps are absent. > > **`highest` / `lowest`:** discrete selection per group. Introduces a > binary variable $\delta_{k,t} \in \lbrace 0,1 \rbrace$ per element and a continuous > threshold $\theta_k$ per group: > > $\sum_{t \in T_k} \delta_{k,t} = n \qquad \forall k$ > > For `highest`: > > $\delta_{k,t} = 1 \;\Rightarrow\; x_{\text{in},t} \geq \theta_k, \qquad \delta_{k,t} = 0 \;\Rightarrow\; x_{\text{in},t} \leq \theta_k$ > > `lowest` mirrors with the inequalities flipped. The implications are > modelled with indicator or big-M constraints. > [accordion] Mask > > Conditional substitution: matching timesteps are known a priori from > timestamps — the output references the replacement where the condition > matches, the input otherwise. > [accordion] Clip > > The form depends on which bounds are configured. > > **`minimum` only** (where $L_t$ is the configured minimum): > > $x_{\text{out},t} \geq x_{\text{in},t} \qquad x_{\text{out},t} \geq L_t$ > > When minimising a cost where $x_{\text{out},t}$ has a positive coefficient, > these inequalities alone are sufficient — the solver pushes > $x_{\text{out},t}$ down to $\max(x_{\text{in},t}, L_t)$. The non-convex > case introduces a binary variable per timestep and indicator or big-M > constraints. > > **`maximum` only** (where $U_t$ is the configured maximum): > > $x_{\text{out},t} \leq x_{\text{in},t} \qquad x_{\text{out},t} \leq U_t$ > > Mirror of `minimum` only: the inequalities suffice when the cost > coefficient is negative; the non-convex case is handled the same way. > > **Both `minimum` and `maximum`:** introduces two binary variables per > timestep (one per bound) and indicator or big-M constraints. > [accordion] Lookup > > Stepwise tier selection with $R$ tiers, boundaries $b_1, \ldots, b_{R-1}$ > (ascending), and level values $\ell_1, \ldots, \ell_R$. Introduces a > binary variable $\delta_{r,t} \in \lbrace 0,1 \rbrace$ per timestep per tier, > i.e. only 1 tier active at a time: > > $\sum_{r=1}^{R} \delta_{r,t} = 1 \qquad \forall t$ > > $\delta_{r,t} = 1 \;\Rightarrow\; b_{r-1} \leq x_{\text{in},t} < b_r$ > > The output is the active tier's level: > > $x_{\text{out},t} = \sum_{r=1}^{R} \delta_{r,t} \cdot \ell_r$ # Cost of Energy API Overview Source: https://docs.engrate.io/api-reference/cost-of-energy/overview Calculate the cost of energy The Cost of Energy API allows you to calculate or optimise the cost of energy consumption in any Swedish [Metering Grid Area](/api-reference/core/models/metering-grid-area). The API is structured around [Tariffs](/api-reference/cost-of-energy/models/tariff) that contain [Tariff Components](/api-reference/cost-of-energy/models/tariff-component), each describing some aspect like tax, transfer fees, etc. The [Tariff Components](/api-reference/cost-of-energy/models/tariff-component) use a machine-readable [Calculation Pipeline](/api-reference/cost-of-energy/calculation-pipeline) to describe exactly how to calculate energy cost. ## Approach The API gives you *abstract* machine-readable [Calculation Pipelines](/api-reference/cost-of-energy/calculation-pipeline) 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 * Pipelines can be evaluated deterministically (calculation mode) or compiled into an optimisation model (optimisation mode), against the same definitions * 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: * Call our Calculate endpoint and we'll calculate the cost for you * Implement code in your application to execute them ```mermaid theme={null} %%{init: {'theme': 'base'}}%% graph TD ds_quarter-hourly-energy-offtake("quarter-hourly-energy-offtake
quarter_hourly · kWh") fn_0_multiply("multiply
× 0.36 SEK per kWh") fn_1_aggregate("aggregate
sum · monthly") fn_2_constant("constant
187.5 SEK · monthly") fn_3_add("add") result_cost("Total cost") ds_quarter-hourly-energy-offtake --> fn_0_multiply fn_0_multiply -->|energy-tax| fn_1_aggregate fn_1_aggregate -->|monthly-energy-tax| fn_3_add fn_2_constant -->|subscription-fee| fn_3_add fn_3_add -->|cost| result_cost click fn_0_multiply "/api-reference/cost-of-energy/functions/multiply" click fn_1_aggregate "/api-reference/cost-of-energy/functions/aggregate" click fn_2_constant "/api-reference/cost-of-energy/functions/constant" click fn_3_add "/api-reference/cost-of-energy/functions/add" class ds_quarter-hourly-energy-offtake eg-dataset class fn_0_multiply eg-fn class fn_1_aggregate eg-fn class fn_2_constant eg-fn class fn_3_add eg-fn class result_cost eg-output ``` ## Usage Common usage of the API revolves around: 1. Find the [Tariffs](/api-reference/cost-of-energy/models/tariff) that apply for the metering point(s) you are interested in. 2. Choose all or some [Tariff Components](/api-reference/cost-of-energy/models/tariff-component) of the tariff that you care about. 3. Evaluate the [Calculation Pipelines](/api-reference/cost-of-energy/calculation-pipeline) of those [Tariff Components](/api-reference/cost-of-energy/models/tariff-component) using your metering point's datasets. You can find Tariffs in multiple ways: * Look up `system-operator` [Party](/api-reference/core/models/party) by name, country or other filters, then ask for [Tariffs](/api-reference/cost-of-energy/models/tariff) that are offered by that `system-operator`. * Look up [Metering Grid Area](/api-reference/core/models/metering-grid-area) by metering point lat/lon, address, name or other filters and then ask for [Tariffs](/api-reference/cost-of-energy/models/tariff) that are available in that MGA. For optimisation, step 3 becomes embedding the pipelines in your model rather than evaluating them — see [In Optimisation](/api-reference/cost-of-energy/optimisation). # Get Geodata Source: https://docs.engrate.io/api-reference/geo/get-geodata /openapi.json get /core/v1/geo Get GeoJSON data for electricity grid entities. Returns a standard [GeoJSON FeatureCollection](https://datatracker.ietf.org/doc/html/rfc7946) in WGS84. The properties field contains the normal data fields for the entity returned, plus a `type` field indicating the entity type. This currently supports [Metering Grid Area](/api-reference/core/models/metering-grid-area). Multiple values for the same filter are OR-ed; different filters are AND-ed. # Get Tariff Source: https://docs.engrate.io/api-reference/get-tariff /openapi.json get /cost-of-energy/v1/tariffs/{tariff_id} Get a single [Tariff](/api-reference/cost-of-energy/models/tariff) by ID. # Imbalance record Source: https://docs.engrate.io/api-reference/imbalances/models/imbalance-record An imbalance record is one volume of one imbalance series in one settlement period. [List Imbalances](/api-reference/timeseries/list-imbalances) gives the records, and [List Imbalance Series](/api-reference/timeseries/list-imbalance-series) gives the dimensions of each series. ## Sign `volume_wh` is signed. On the total, a positive volume means that the balance group was long: it injected more, or withdrew less, than its trade schedule. A negative volume means that it was short. An adjustment has the sign of its effect on the imbalance. A positive adjustment makes the balance group longer, and a negative adjustment makes it shorter. ## Regulation direction The suffix of an adjustment class tells what the transmission system operator did: * `_up`: it activated upward regulation, with more injection or less withdrawal. * `_down`: it activated downward regulation, with less injection or more withdrawal. * `_net`: one signed series. The market sends the class as one net value, or the class has no regulation direction. The direction and the sign are different things. Upward regulation adds energy at the meters of the balance group, and the adjustment takes it out of the imbalance again. Thus an `_up` volume is usually negative. For example, in one settlement period the transmission system operator activates a battery in your balance group upward by 2 MWh, and later downward by 0.5 MWh. The meter shows 1.5 MWh more than the trade schedule. The adjustments take that energy out again: | `component_value` | `volume_wh` | | - | - | | `afrr_up` | -2000000 | | `afrr_down` | 500000 | Together they are -1.5 MWh, so the activations do not change the imbalance of the balance group. ## More than one record per settlement period The market sends a new run when it settles a period again, and Engrate keeps every run. To get one value per series and settlement period, use the record with the highest `finality`, then the latest `stated_at`. When records have the same values in both fields, use the first of them in the response. Each market gives its runs a finality in its own way. See [In each market](/market-communication/imbalance/overview#in-each-market). ## Do not add across levels The series of one balance group in one scheduling area form levels. Each level already includes the levels below it: * The imbalance (`total`, `ALL`) includes all adjustments. * The net adjustment (`adjustment`, `ALL`) includes all adjustment classes. * A `_net` class, for example `afrr_net`, includes the same class with `_up` and `_down`. Do not add volumes from different levels: you would count the same energy twice. Also, do not expect the classes to add up to the net adjustment. The market does not always send every class. You do add series that are parts of one level. A balance group can have more than one series with the same `component_value` in one scheduling area. Their market dimensions tell them apart. For example, if it has two `mfrr_up` series in one area, its `mfrr_up` for a settlement period is the sum of the two records that you keep for that period. # Imbalance series Source: https://docs.engrate.io/api-reference/imbalances/models/imbalance-series An imbalance series holds the imbalance of one balance group in one scheduling area, or one adjustment that the market included in it. One balance group in one scheduling area can have several series. Their `component_kind` and `component_value` tell them apart: | The series holds | `component_kind` | `component_value` | | - | - | - | | The imbalance itself | `total` | `ALL` | | The net of all adjustments | `adjustment` | `ALL` | | One class of adjustment | `adjustment` | The class, for example `mfrr_up` | Do not add series from different rows of this table: the imbalance already includes the adjustments, and the net adjustment includes the classes. Also do not add a `_net` class to the same class with `_up` or `_down`, which it already includes. Series with the same `component_kind` and the same `component_value` that differ only in their market dimensions are parts of one value, and you add them. See [Do not add across levels](/api-reference/imbalances/models/imbalance-record#do-not-add-across-levels). Use `external_id` to read the volumes of a series in [List Imbalances](/api-reference/timeseries/list-imbalances). # Imbalances API Overview Source: https://docs.engrate.io/api-reference/imbalances/overview The imbalance of your balance groups, and the adjustments in it The Imbalances API gives the imbalance that the market calculates for your balance groups, for each settlement period. Use it to check an imbalance invoice, or to see how the market adjusted the imbalance for activations of balancing energy. This is an alpha API. It may change without notice. See [Imbalance](/market-communication/imbalance/overview) for which markets send imbalance, and what each one sends. ## Series An imbalance series holds the imbalance of one balance group in one scheduling area, or one adjustment that the market included in it. See [Imbalance series](/api-reference/imbalances/models/imbalance-series) for how to tell the series apart. [List Imbalance Series](/api-reference/timeseries/list-imbalance-series) gives the series and their dimensions. [List Imbalances](/api-reference/timeseries/list-imbalances) gives the volumes of the series over a range of settlement periods. ## Volumes Each volume is signed. On a total, a positive volume means that the balance group was long. The market can send more than one volume for one series and settlement period, and the total includes its adjustments. See [Imbalance record](/api-reference/imbalances/models/imbalance-record) for how to read the sign, how to get one value for each settlement period, and which volumes you must not add. # List Bidding Zones Source: https://docs.engrate.io/api-reference/list-bidding-zones /openapi.json get /core/v1/bidding-zones List & filter bidding zones. If you specify multiple values for some filter parameter they are OR-ed. If you specify multiple separate filters they are "AND"-ed. # List Control Areas Source: https://docs.engrate.io/api-reference/list-control-areas /openapi.json get /core/v1/control-areas List & filter control areas. If you specify multiple values for some filter parameter they are OR-ed. If you specify multiple separate filters they are "AND"-ed. # List Datasets Source: https://docs.engrate.io/api-reference/list-datasets /openapi.json get /cost-of-energy/v1/datasets List all [Registered Datasets](/api-reference/cost-of-energy/models/dataset) # List Metering Grid Areas Source: https://docs.engrate.io/api-reference/list-metering-grid-areas /openapi.json get /core/v1/metering-grid-areas List & filter Metering Grid Areas. If you specify multiple values for some filter parameter they are OR-ed. If you specify multiple separate filters they are "AND"-ed. For instance if you specify country=SE&country=DK, you'll get MGAs in Denmark and Sweden. If you specify country=DK&city=Stockholm you'll get no results as no MGAs cover both Stockholm and Denmark. See [Metering Grid Area](/api-reference/core/models/metering-grid-area) for details on MeteringGridArea. # List Parties Source: https://docs.engrate.io/api-reference/list-parties /openapi.json get /core/v1/parties List & filter market parties. If you specify multiple values for some filter parameter they are OR-ed. If you specify multiple separate filters they are "AND"-ed. See [Party](/api-reference/core/models/party) for details on Parties. # List Scheduling Areas Source: https://docs.engrate.io/api-reference/list-scheduling-areas /openapi.json get /core/v1/scheduling-areas List & filter scheduling areas. If you specify multiple values for some filter parameter they are OR-ed. If you specify multiple separate filters they are "AND"-ed. # List stored delivery days Source: https://docs.engrate.io/api-reference/list-stored-delivery-days /portfolio-forecasts-openapi.json get /portfolio-forecasts/v1alpha1/submissions List every delivery day the forecast service holds, newest first, with the `input_hash` of its stored submission and whether that exact input was already processed downstream. # List Tariffs Source: https://docs.engrate.io/api-reference/list-tariffs /openapi.json get /cost-of-energy/v1/tariffs List [Tariffs](/api-reference/cost-of-energy/models/tariff). Multiple values within a single parameter are combined with OR. Different parameters are combined with AND. Omitting all parameters returns all published tariffs. # Market Communication API Source: https://docs.engrate.io/api-reference/market-communication/overview The endpoints for schedules, confirmations, allocations, imbalances and structuring, grouped by process. One API for what you exchange with each electricity market. The [Market Communication docs](/market-communication/overview) explain the model behind these endpoints. | Group | What it covers | Stability | | - | - | - | | Schedules | Declare the series of a delivery day, follow each revision, and read the match status and confirmation of each series | Stable. Series state and match reports are alpha. | | Confirmations | The values that the Scheduling Area Responsible uses for your schedules, across delivery days | Alpha | | Allocations | Energy allocated per accounting point, and aggregate allocations | Alpha | | Imbalances | The imbalance of your balance groups, and the adjustments in it | Alpha | | Structuring | Take over supply of accounting points with supplier switches, and read the master data and supply periods of your accounting points | Alpha | | Reference data | Exchange priority of German balance groups | Stable | All endpoints take your organization's API key in the `authorization` header. See [Authentication](/guides/authentication). > [!NOTE] > > The API calls a revision of a schedule a version: [List Schedule Versions](/api-reference/schedules/list-schedule-versions), `version_number` and `version_uid`. See [Revisions](/market-communication/schedules/revisions). # Portfolio Forecasts API Overview Source: https://docs.engrate.io/api-reference/portfolio-forecasts/overview Submit production and consumption forecasts for a delivery day, and read back what is stored The Portfolio Forecasts API accepts portfolio production and consumption forecasts for one delivery day, and lets you read back what it holds. This is an alpha API. It may change or be removed without notice. ## Submitting a forecast Submit one or more production or consumption series with `POST /portfolio-forecasts/v1alpha1/submissions`. Tag each series by either a German TSO control area or an eleven-digit MaLo. MaLo-tagged series require a MaLo-to-control-area mapping. Each series contains one value per quarter-hour, from local (Europe/Berlin) midnight to midnight: 96 values on a normal day, 92 on the spring-forward day, 100 on the fall-back day. Specify values in MW or MWh. A successful acknowledgment includes the received series and interval counts, daily production and consumption totals in MWh, a content hash, and a `received` status (or `validated` when validating without submitting, see below). Re-submitting a forecast for the same delivery day replaces the previous submission. Submitting an identical payload changes nothing, so retries are safe. ## Validating without submitting Set `validate_only` to `true` to run the full validation without storing the forecast. The acknowledgment carries `status: "validated"`, and its `input_hash` matches the one a stored submission of the same payload gets. ## Reading back stored forecasts `GET /portfolio-forecasts/v1alpha1/submissions` lists every stored delivery day, newest first. Each entry carries the `input_hash` of its submission and a `processed` flag that turns true once the schedules for exactly that input were submitted downstream and accepted. Compare the hash with the one from your acknowledgment to confirm which submission is in place. `GET /portfolio-forecasts/v1alpha1/submissions/{delivery_day}` returns the stored forecast for one day: exactly the series the last accepted submission carried, plus the derived totals, the `input_hash`, and the processing state. What you read back is what a re-submission would replace. A day with no stored forecast returns `404`. Submissions made with `validate_only` store nothing, so they never appear in either response. # Create a profile Source: https://docs.engrate.io/api-reference/profiles/create-a-profile /openapi.json post /cost-of-energy/v1/profiles Create a new profile owned by the caller's organization. The number of values must match the expected count for the given time range and resolution. # Delete a profile Source: https://docs.engrate.io/api-reference/profiles/delete-a-profile /openapi.json delete /cost-of-energy/v1/profiles/{profile_id} Delete a profile. # Get a profile Source: https://docs.engrate.io/api-reference/profiles/get-a-profile /openapi.json get /cost-of-energy/v1/profiles/{profile_id} Retrieve a profile by ID including its full timeseries values. Optionally downsample the returned values to a coarser resolution. # List profiles Source: https://docs.engrate.io/api-reference/profiles/list-profiles /openapi.json get /cost-of-energy/v1/profiles List all profiles visible to the caller. Returns global profiles (available to everyone) plus any profiles owned by the caller's organization. # Update a profile Source: https://docs.engrate.io/api-reference/profiles/update-a-profile /openapi.json put /cost-of-energy/v1/profiles/{profile_id} Replace the contents of an existing profile. # Read back stored forecast Source: https://docs.engrate.io/api-reference/read-back-stored-forecast /portfolio-forecasts-openapi.json get /portfolio-forecasts/v1alpha1/submissions/{delivery_day} Return exactly the series the last accepted submission for the delivery day carried, plus the derived totals, the `input_hash` from the acknowledgment, and the processing state. What you read back is what a re-submission would replace. Submissions with `validate_only` set store nothing, so they never appear here. # Check Exchange Priority Source: https://docs.engrate.io/api-reference/reference/check-exchange-priority /openapi.json get /schedule-management/v1/reference/exchange-priority-check/{eic_code} Check if a specific balance group has exchange priority. Useful for the UI to flag counterparties with Börsenvorrang when displaying ANO reconciliation data. Args: eic_code: EIC code of the balance group to check. # List Exchange Priority Balance Groups Source: https://docs.engrate.io/api-reference/reference/list-exchange-priority-balance-groups /openapi.json get /schedule-management/v1/reference/exchange-priority-balance-groups List all balance groups with exchange priority (Börsenvorrang). These balance groups have priority per clause 12.b of the Bilanzkreisvertrag. When scheduling conflicts occur (ANO), the exchange party's values may be imposed by the TSO. # Audit Log Source: https://docs.engrate.io/api-reference/schedule-management/models/audit-log Audit log entries record state changes and actions on schedules, clearing periods, and market messages. Each entry captures the state after the event, who triggered it, and the labels carried with it. ## Timestamp precision The `created_ts` field includes millisecond precision (`YYYY-MM-DDTHH:mm:ss.sssZ`) to allow precise ordering of events that occur in rapid succession. # Exchange Priority Source: https://docs.engrate.io/api-reference/schedule-management/models/exchange-priority Exchange priority (Börsenvorrang) is a German market mechanism where certain balance groups can impose their schedule values on counterparties. When your series doesn't match a counterparty with exchange priority, the TSO may impose the counterparty's values per Bilanzkreisvertrag clause 12.b. This matters when you process anomaly reports: if the counterparty's EIC code has `has_exchange_priority=true` on the reference endpoints, the TSO may impose the counterparty's values. The series' confirmation in [Get Series State](/api-reference/schedules/get-series-state) shows the values the TSO actually uses. ## Endpoints The Schedule Management API provides two reference endpoints for exchange priority: | Endpoint | Purpose | | - | - | | `GET /reference/exchange-priority-balance-groups` | List all known balance groups that hold exchange priority status | | `GET /reference/exchange-priority-check/{eic_code}` | Check whether a specific EIC code has exchange priority | ## When to use Check exchange priority status when processing anomaly reports. If a counterparty has exchange priority, the TSO may impose their values after the correction cycle. Read the series' confirmation in [Get Series State](/api-reference/schedules/get-series-state) for the values the TSO uses. # Schedule Source: https://docs.engrate.io/api-reference/schedule-management/models/schedule A schedule represents one delivery date for one TSO. It is the top-level object you create when submitting energy values, and serves as the container for all [Versions](/api-reference/schedule-management/models/schedule-version) and [Series](/api-reference/schedule-management/models/schedule-series) associated with that date. Schedules are scoped to a single organization, market, and TSO. Re-submitting for the same TSO + delivery date creates a new version under the existing schedule rather than a new schedule. ## Identifying a schedule Each schedule is uniquely identified by its `uid`. Within an organization, a schedule is also uniquely identified by the combination of `market` + `tso` + `date`. ## Markets | Market | Value | TSOs | | - | - | - | | Germany | `DE` | `50HERTZ_DE_TSO`, `DE-AMPRION-TSO`, `TTG_DE`, `DE-TRANSNETBWTSO` | | Netherlands | `NL` | `TENNET_TSO` | # Schedule Series Source: https://docs.engrate.io/api-reference/schedule-management/models/schedule-series A schedule series represents one time series within a schedule version — for example one internal trade between two balance responsible parties, or one production injection. ## Series types | Type | Description | | - | - | | `internal` | Trade within the same TSO control area | | `external` | Cross-border trade between two TSO areas | | `foreign` | Cross-border trade where your party is not a direct market participant | | `production` | Own generation injected into the grid | | `consumption` | Own load withdrawn from the grid | `market_agreement_id` is optional on `external` and `foreign` series in the Netherlands. In Germany, leave it out: the API rejects it. # Schedule Version Source: https://docs.engrate.io/api-reference/schedule-management/models/schedule-version A schedule version represents one submission attempt within a [Schedule](/api-reference/schedule-management/models/schedule). Each time you re-submit for the same TSO + delivery date, a new version is created with an incremented version number. The TSO message ID is reused with a `_v{N}` suffix. ## Status lifecycle Versions move through these statuses as the Scheduling Area Responsible answers the revision: | Value | Description | | - | - | | `created` | Engrate has queued the revision and has not sent it yet. | | `submitted` | Engrate sent the revision. The Scheduling Area Responsible has not answered yet. | | `ack_positive` | The Scheduling Area Responsible acknowledged the revision and accepted all its series. | | `ack_negative` | The Scheduling Area Responsible rejected the revision in its acknowledgement. | | `ack_partial` | The Scheduling Area Responsible acknowledged the revision and reported errors in it, for example in a series or in the balance. Germany only. | | `icnf` | An intermediate confirmation report. The confirmed values can still change. | | `dacnf` | A day-ahead confirmation report. Germany only. | | `cnf` | A confirmation report that confirms all series of the revision. Germany only. | | `cnf_partial` | A confirmation report that confirms some series of the revision and rejects or changes others. Germany only. | | `fcnf` | A final confirmation report. In the Netherlands, each confirmation report has this status, but the confirmed values stay intermediate. | ## Acceptance levels The `acceptance_level` field gives the highest answer that the Scheduling Area Responsible gave: | Value | Description | | - | - | | `""` | The Scheduling Area Responsible has not answered yet. | | `ack` | The Scheduling Area Responsible acknowledged the revision. | | `ano` | The Scheduling Area Responsible rejected the revision. | | `par` | The Scheduling Area Responsible confirmed some series of the revision and rejected or changed others. Germany only. | | `cnf` | The Scheduling Area Responsible confirmed the revision. | ## Active version The active version (`is_active=true`) is the latest version the TSO has accepted — the one it currently treats as binding. Versions that were rejected or are still awaiting a response are not active, and a later rejected version never replaces an accepted earlier one. # Create Schedule Source: https://docs.engrate.io/api-reference/schedules/create-schedule /openapi.json post /schedule-management/v1/schedules Create a [Schedule](/api-reference/schedule-management/models/schedule) or replace the desired spec of an existing one. Records the submitted time series as the schedule's desired spec, keyed on organization, scheduling area (derived from `tso`), and delivery date. Re-posting the same key overwrites the spec (last write wins); the returned `uid`/`schedule_uid` identify the schedule either way. The delivery date is taken from `date`, or derived from the first series timestamp (UTC -> market-local midnight) when omitted. Series data must cover the full delivery day on the 15-minute grid (96 intervals, 92 on the spring DST day, 100 on the fall DST day). Each series must describe its own flow, or the request returns 400: two production series, or two consumption series, cannot share an area; two internal series cannot share an area, `in_party` and `out_party`; two external or foreign series cannot share `in_area`, `out_area`, `in_party`, `out_party` and `market_agreement_id`. Each amount must be one the market can carry, or the request returns 400: NL amounts must be multiples of 0.004 MW (1 kWh per quarter-hour), and DE amounts multiples of 0.001 MW. The legacy `test` flag is accepted but has no effect: this endpoint records the spec and does not submit to the TSO. # Get Incoming Message Source: https://docs.engrate.io/api-reference/schedules/get-incoming-message /openapi.json get /schedule-management/v1/schedules/{uid}/incoming-messages/{message_uid} Get the content of one market message that the Scheduling Area Responsible sent about a schedule. The content is the message as Engrate received it, for example an acknowledgement, an anomaly report or a confirmation report. - **404** if no schedule of your organization has this uid, or if the schedule has no incoming message with this `message_uid`. - **422** if the uid is not a UUID, or the `message_uid` is not a number. # Get Schedule Source: https://docs.engrate.io/api-reference/schedules/get-schedule /openapi.json get /schedule-management/v1/schedules/{uid} Get a specific [Schedule](/api-reference/schedule-management/models/schedule) by UID. # Get Schedule Series Source: https://docs.engrate.io/api-reference/schedules/get-schedule-series /openapi.json get /schedule-management/v1/schedule-series/{version_uid} List all [Schedule Series](/api-reference/schedule-management/models/schedule-series) within a schedule version. # Get Series State Source: https://docs.engrate.io/api-reference/schedules/get-series-state /openapi.json get /schedule-management/v1/schedules/{uid}/series-state Get the series state of each series in a schedule. The series state gives the match status of the series. It also shows the values that the Scheduling Area Responsible will use. `match_status` is `not_checked` until the Scheduling Area Responsible gives a match verdict on the series. If the match status is not `matched`, `findings` gives the causes from the Scheduling Area Responsible. For each position, `findings` also gives your value and the value of the counterparty, if the Scheduling Area Responsible sends these values. For each position, `confirmation` gives the value that the Scheduling Area Responsible will use and the finality of that value. An `intermediate` value can change. Settlement uses the `final` value. The response shows the series of the active schedule version first, in the sequence of that version. The active version is the last version that the Scheduling Area Responsible accepted. If no version is active, the response shows the series of the last version first. Then it shows the other series that have a match status or a confirmation from a match report. For example, it shows a series of a different version, or a series that only the counterparty sent (`counterpart_only`). - **404** if no schedule of your organization has this uid. - **422** if the uid is not a UUID. # List Incoming Messages Source: https://docs.engrate.io/api-reference/schedules/list-incoming-messages /openapi.json get /schedule-management/v1/schedules/{uid}/incoming-messages List all incoming TSO messages for a schedule, newest first. Returns metadata for each market message reconciled against this schedule — the responses received from the TSO (ACK / CNF / ANO and, for NL, RI / BAL documents). # List Match Reports Source: https://docs.engrate.io/api-reference/schedules/list-match-reports /openapi.json get /schedule-management/v1/schedule-versions/{version_uid}/reports Get the match reports for one schedule version, in the sequence of `stated_at`, from first to last. A match report contains the information that the Scheduling Area Responsible gave about the version in one market message. The market message is an anomaly report, a confirmation report or an acknowledgement. A match report gives a verdict on each series in `verdicts`. Some match reports give a verdict on series that are not in `verdicts`. Such a report is `complete`. Its `default_verdict` is the verdict on each series of the version that is not in `verdicts`. For example, a report can show only the series with a problem, and give `matched` to all other series. A `complete` report also gives `default_verdict` to each series that a previous report on the version identified, for example a series that only the counterparty sent. - **404** if no schedule version of your organization has this uid. - **422** if the uid is not a UUID. # List Schedule Match Reports Source: https://docs.engrate.io/api-reference/schedules/list-schedule-match-reports /openapi.json get /schedule-management/v1/schedules/{uid}/reports Get a summary of each match report of a schedule, in the sequence of `stated_at`, from first to last. The list has the match reports of each version of the schedule. It also has the match reports that name no version (`version` is `null`): such a report is about the schedule of its delivery day. A summary tells what the report is and which version it is about, without its verdicts. Use it to show what the Scheduling Area Responsible said about a schedule over time. List Match Reports gives the verdicts of the reports of one version. - **404** if no schedule of your organization has this uid. - **422** if the uid is not a UUID. # List Schedule Versions Source: https://docs.engrate.io/api-reference/schedules/list-schedule-versions /openapi.json get /schedule-management/v1/schedules/{uid}/versions List all [Schedule Versions](/api-reference/schedule-management/models/schedule-version) for a schedule, newest version first. # List Schedules Source: https://docs.engrate.io/api-reference/schedules/list-schedules /openapi.json get /schedule-management/v1/schedules List all [Schedules](/api-reference/schedule-management/models/schedule) for the authenticated organization. Filters: - market: Filter by market (`DE` or `NL`; long forms `germany`/`netherlands` accepted) - tso: Filter by TSO (e.g., `50HERTZ_DE_TSO`) - date_from: Start date filter (YYYY-MM-DD), inclusive - date_to: End date filter (YYYY-MM-DD), inclusive Results are ordered newest delivery date first. # Send Status Request Source: https://docs.engrate.io/api-reference/status-request/send-status-request /openapi.json post /schedule-management/v1/send_status_request Send a Status Request (SRQ) to a German TSO. This is a sort of "reset" functionality, where you can request the TSO re-emits messages for a specified schedule, which will then be re-ingested into Engrate. # List EnFG Privilege Reasons Source: https://docs.engrate.io/api-reference/structuring/list-enfg-privilege-reasons /openapi.json get /market-access/v1alpha1/markets/DE/enfg-privilege-reasons List the reasons a customer in Germany can give for reduced levies under the Energy Financing Act (Energiefinanzierungsgesetz, EnFG), in the order that the German market defines them. Use these codes in `enfg_eligibility.privilege_reasons` when you create a supplier switch for an accounting point that consumes energy. Errors: - `404`: your organization is not set up for market communication. Contact Engrate. # List Supplier Switches Source: https://docs.engrate.io/api-reference/structuring/list-supplier-switches /openapi.json get /market-access/v1alpha1/supplier-switches List the supplier switches of your organization, oldest first. Each switch shows its state, the data you declared, and each request that Engrate made to the market. Every filter you give must match. Engrate reads `state` as of today on the calendar of the market: an accepted switch is `accepted` before its effective date and `effected` from that date. Errors: - `404`: your organization is not set up for market communication. Contact Engrate. - `422`: a filter is not valid. For example, `state` is not a switch state. # Structure Batch Source: https://docs.engrate.io/api-reference/structuring/models/structure-batch # Structure Conflict Source: https://docs.engrate.io/api-reference/structuring/models/structure-conflict # Supplier Switch Source: https://docs.engrate.io/api-reference/structuring/models/supplier-switch # Supplier switches API Source: https://docs.engrate.io/api-reference/structuring/overview Create supplier switches in a structure batch, and follow each switch until it takes effect. > [!NOTE] > > This API is alpha. It can change without notice. Today it covers the German market. Use these endpoints to take over supply of accounting points as the new supplier. [Supplier switches](/market-communication/structuring/supplier-switches) explains the process and how it works in Germany. | Endpoint | What it does | | - | - | | [Submit Structure Batch](/api-reference/structuring/submit-structure-batch) | Create 1 to 100 supplier switches. Engrate applies all of them or none of them. | | [List Supplier Switches](/api-reference/structuring/list-supplier-switches) | Read the state, the declared data and the switch requests of your supplier switches. | | [List EnFG Privilege Reasons](/api-reference/structuring/list-enfg-privilege-reasons) | Get the codes for reduced levies that a German consumption switch can declare. | ## The flow 1. Submit a structure batch with one `create.supplier-switch` action for each accounting point. Keep the `supplier_switch_id` of each result. 2. Engrate makes a switch request to the grid operator. The switch goes from `pending` to `requested`. The `delivery_status` of the request shows where its message is on its way to the market. 3. Read the switch with [List Supplier Switches](/api-reference/structuring/list-supplier-switches). The grid operator accepts or rejects the switch. 4. From the effective date, an accepted switch is `effected`. The accounting point shows the new supply period. See [Accounting points API](/api-reference/accounting-points/overview). ## Errors | Status | When | What to do | | - | - | - | | `400` | Your organization is not set up for the market. | Contact Engrate. | | `404` | Your organization is not set up for market communication. | Contact Engrate. | | `409` | An action names an accounting point that already has an open switch, or two actions name the same accounting point. Engrate applied nothing. | Remove or change the actions that `conflicts` names, then submit the batch again. | | `422` | The batch is not valid. For example, a MaLo-ID does not have 11 digits. | Correct the fields that `detail` names. | All endpoints take your organization's API key in the `authorization` header. See [Authentication](/guides/authentication). # Submit Structure Batch Source: https://docs.engrate.io/api-reference/structuring/submit-structure-batch /openapi.json post /market-access/v1alpha1/structure Submit up to 100 structuring actions as one structure batch. Engrate applies all the actions or none of them. Today the only action is `create.supplier-switch`. For each new supplier switch, Engrate adds the accounting point to your organization if it is not there yet, and makes a request to the grid operator. Follow each switch with [List supplier switches](/api-reference/structuring/list-supplier-switches). See [Supplier switches](/market-communication/structuring/supplier-switches). Errors: - `400`: your organization is not set up for the market of the actions. Contact Engrate. - `404`: your organization is not set up for market communication. Contact Engrate. - `409`: an action names an accounting point that already has an open switch, or two actions name the same accounting point. Engrate applied nothing. `conflicts` names the actions. - `422`: the batch is not valid. For example, a MaLo-ID does not have 11 digits. `detail` names the fields. # Submit portfolio forecast Source: https://docs.engrate.io/api-reference/submit-portfolio-forecast /portfolio-forecasts-openapi.json post /portfolio-forecasts/v1alpha1/submissions Submit a portfolio forecast for one delivery day. Re-submitting for the same delivery day replaces the previous submission. Submitting an identical payload changes nothing, so retries are safe. Set `validate_only` to run the full validation without storing the forecast. The acknowledgment then carries `status: validated`. # List Aggregate Allocation Series Source: https://docs.engrate.io/api-reference/timeseries/list-aggregate-allocation-series /openapi.json get /market-access/v1alpha1/timeseries/series/aggregate-allocations List Aggregate Allocation Series. Aggregate Allocations are grouped into separate logical series. Markets assign the series identifiers, and Engrate tracks the dimensions for each series - like what area it applies to, flow direction, and so on. This endpoint lets you list the individual series and their dimensions. If a returned dimension is null, it indicates the series applies for all values of that dimension. The list shows the aggregate allocations in the sequence of `external_id`, then `flow_direction`. To read the full list, use `offset` and `limit` to get one page at a time. `total` is the number of aggregate allocations that agree with the filters, on all pages. The API gives the status code 422 in these conditions: - An `area` filter is not in the format `kind:code`, or it has an unknown area kind. - A `market_dimension` filter is not in the format `key:value`. - A `market_dimension` filter has one key two times. - A `market_meta` filter value is not in the format `key:value`. - A `market_meta` filter repeats a key. - A `flow_direction`, `aggregator` or `allocation_basis` filter has an unknown value. - An `external_id`, `area`, `balance_group`, `supplier`, `market_dimension` or `market_meta` filter exceeds its maximum number of values. - `offset` is less than 0 or more than its maximum, or `limit` is less than 1 or more than its maximum. # List Aggregate Allocations Source: https://docs.engrate.io/api-reference/timeseries/list-aggregate-allocations /openapi.json get /market-access/v1alpha1/timeseries/aggregate-allocations List aggregate allocations timeseries data matching the provided filters. This can return multiple values per ISP for one aggregate allocation. The values of each ISP come in the order of their [finality](/api-reference/allocations/models/finality) and `stated_at`, with the current value first. When these fields tie, the first value in the response is the current one. See [Multiple values per timestep](/api-reference/allocations/overview#multiple-values-per-timestep). To read the energy volumes of one aggregate allocation, use the `external_id` filter, and the `flow_direction` filter if the external id has both directions. List Aggregate Allocation Series gives the external id of each aggregate allocation. # List Allocation Series Source: https://docs.engrate.io/api-reference/timeseries/list-allocation-series /openapi.json get /market-access/v1alpha1/timeseries/series/allocations Show the allocation series that agree with the filters. Each series holds the allocations of one flow direction at one accounting point. Use its `accounting_point_id` to read its values in List Allocations. Use the `market_identifier` filter to find the accounting point that the market identifies by an EAN code or another identifier. The list shows the series in the sequence of `accounting_point_id`, then `flow_direction`. To read the full list, use `offset` and `limit` to get one page at a time. `total` is the number of series that agree with the filters, on all pages. The API gives the status code 422 in these conditions: - An `accounting_point_id` filter is not a UUID. - A `flow_direction` filter has an unknown value. - An `accounting_point_id` or `market_identifier` filter has more values than its maximum. - `offset` is less than 0 or more than its maximum, or `limit` is less than 1 or more than its maximum. # List Allocations Source: https://docs.engrate.io/api-reference/timeseries/list-allocations /openapi.json get /market-access/v1alpha1/timeseries/allocations List the energy volumes allocated to the requested accounting points. This can return multiple values per Imbalance Settlement Period (ISP) for one accounting point. The values of each ISP come in the order of their [finality](/api-reference/allocations/models/finality), then the [quality](/api-reference/allocations/models/allocation-quality) of values without a finality, then `stated_at`, with the current value first. When these fields tie, the first value in the response is the current one. See [Multiple values per timestep](/api-reference/allocations/overview#multiple-values-per-timestep). [List Allocation Series](/api-reference/timeseries/list-allocation-series) gives the accounting points that have allocations. # List Confirmed Schedule Series Source: https://docs.engrate.io/api-reference/timeseries/list-confirmed-schedule-series /openapi.json get /market-access/v1alpha1/timeseries/series/confirmed-schedules Show the series of your confirmed schedules. Each series is one series identity in the scheduling area of its schedule, across delivery days. The list shows only the series that have a confirmation. Use its `series_id` to read its values in List Confirmed Schedules. The list shows the series in the sequence of `series_id`. To read the full list, use `offset` and `limit` to get one page at a time. `total` is the number of series that agree with the filters, on all pages. The API gives the status code 422 in these conditions: - A `scheduling_area` filter has more values than its maximum. - `offset` is less than 0 or more than its maximum, or `limit` is less than 1 or more than its maximum. # List Confirmed Schedules Source: https://docs.engrate.io/api-reference/timeseries/list-confirmed-schedules /openapi.json get /market-access/v1alpha1/timeseries/confirmed-schedules List the confirmed values of your schedules over a range of settlement periods. Each record in `values` is one point of a series: the confirmation for one settlement period. It is the confirmation that the Scheduling Area Responsible has in force: the value it uses, or a rejection of the series. `values` has at most one record for each series and settlement period, in the sequence of `series_id`, then `isp_time`. A settlement period without a record has no confirmation that Engrate has recorded. One request covers at most 32 days, thus a whole calendar month fits. [List Confirmed Schedule Series](/api-reference/timeseries/list-confirmed-schedule-series) gives the series and their parties. The API gives the status code 422 in these conditions: - `isp_until` is not after `isp_from`, or more than 32 days after it. - A `series_id` filter is not a UUID, or a `kind` or `finality` filter has an unknown value. - A `series_id` or `scheduling_area` filter has more values than its maximum. # List Imbalance Series Source: https://docs.engrate.io/api-reference/timeseries/list-imbalance-series /openapi.json get /market-access/v1alpha1/timeseries/series/imbalance List the imbalance series that agree with the filters. Each imbalance series holds the imbalance of one balance group in one scheduling area, or one adjustment that the market included in it. Use its `external_id` to read its volumes in List Imbalances. The list shows the imbalance series in the sequence of `external_id`. To read the full list, use `offset` and `limit` to get one page at a time. `total` is the number of imbalance series that agree with the filters, on all pages. The API gives the status code 422 in these conditions: - A `market_dimension` filter is not in the format `key:value`. - A `market_dimension` filter has one key two times. - A `component_kind` or `component_value` filter has an unknown value. - An `external_id`, `scheduling_area`, `balance_group` or `market_dimension` filter exceeds its maximum number of values. - `offset` is less than 0 or more than its maximum, or `limit` is less than 1 or more than its maximum. # List Imbalances Source: https://docs.engrate.io/api-reference/timeseries/list-imbalances /openapi.json get /market-access/v1alpha1/timeseries/imbalance List the imbalance volumes that agree with the filters. Each imbalance series holds the imbalance of one balance group in one scheduling area, or one adjustment that the market included in it. On a total, a positive volume means that the balance group was long. On an adjustment, a positive volume makes the balance group longer. This can return more than one record per ISP for one imbalance series. Use the record with the highest `finality`, then the latest `stated_at`. When records have the same values in both fields, use the first of them in the response. The total includes its adjustments, and the net adjustment includes the adjustment classes. Do not add volumes across these levels. The API gives the status code 422 in these conditions: - `isp_from` or `isp_until` is missing, or it has no time zone offset. - A `market_dimension` filter is not in the format `key:value`. - A `market_dimension` filter has one key two times. - A `component_kind` or `component_value` filter has an unknown value. - An `external_id`, `scheduling_area`, `balance_group` or `market_dimension` filter exceeds its maximum number of values. # Changelog Source: https://docs.engrate.io/changelog/product-updates Product & technology updates and announcements **November 2026** BDEW code numbers in identifier kinds The `kind` of an extra identifier can now be `de.bdew`, the BDEW code number of a German market party. Parties and metering grid areas use the same identifier kinds as the Market Communication APIs. **November 2026** Dutch imbalance `GET /market-access/v1alpha1/timeseries/imbalance` now gives the imbalance of your Dutch balance responsible party in 15-minute periods. It is the imbalance that TenneT settles and invoices. Some balance responsible parties also get TenneT's net adjustment in a second series. Each update has its `finality`, from `preliminary` to `correction`, and TenneT's timestamp in `stated_at`. `GET /market-access/v1alpha1/timeseries/series/imbalance` lists the series. See [Imbalance](/market-communication/imbalance/overview) for what the Dutch series hold. **November 2026** German imbalance `GET /market-access/v1alpha1/timeseries/imbalance` now gives the imbalance of your German balance groups, as the balance coordinator of each control area settles and bills it: one total for each balance group and control area, in 15-minute periods. It includes each month that the balance coordinator sent before this release. Each run has its `finality`, from `preliminary` to `correction`, and the market's timestamp in `stated_at`. `GET /market-access/v1alpha1/timeseries/series/imbalance` lists the series. See [Imbalance](/market-communication/imbalance/overview) for what the German series hold. **November 2026** Control area of German aggregate allocations `GET /market-access/v1alpha1/timeseries/series/aggregate-allocations` now gives the control area of German aggregate allocations in `market_meta`, as `control_area`. For a series of one metering grid area, it is the control area that the grid area is in. To select the aggregate allocations of one control area, filter by `market_meta=control_area:10YDE-RWENET---I`. **November 2026** The market's timestamp on allocations `GET /market-access/v1alpha1/timeseries/allocations` and `GET /market-access/v1alpha1/timeseries/aggregate-allocations` now give each value a `stated_at`, the market's timestamp for that version of the value. The current value of a settlement period now follows the market's order, so a correction replaces the value it corrects even when it arrives first. `known_at` still tells you when Engrate received each value. **November 2026** Finality on allocations `GET /market-access/v1alpha1/timeseries/allocations` now gives each value a `finality`: how final the settlement run is that the value comes from, such as `preliminary` or `final`, or `null` for a value that comes from no settlement run. The values of each settlement period come with the current value first: the highest `finality`, then, among values without a finality, the most trusted `quality`, then the latest `known_at`. A later settlement run now replaces an earlier one, also when its quality is lower. **November 2026** Imbalances `GET /market-access/v1alpha1/timeseries/imbalance` gives the imbalance of your balance groups per scheduling area and settlement period, as the market settles it, and the adjustments that the market included in it. On a total, a positive volume means that the balance group was long. On an adjustment, a positive volume makes the balance group longer. Each run of the settlement is one record: use the highest `finality`, then the latest `stated_at`, and on a tie the first record in the response. `GET /market-access/v1alpha1/timeseries/series/imbalance` lists the series. **November 2026** Confirmed schedules `GET /market-access/v1alpha1/timeseries/confirmed-schedules` gives the values that the Scheduling Area Responsible uses for your schedules: one record for each series and 15-minute period where a value or a rejection is in force, with its kind (`confirmed`, `modified`, `imposed` or `rejected`), the energy in Wh, and whether the confirmation is final. One request covers up to 32 days. `GET /market-access/v1alpha1/timeseries/series/confirmed-schedules` lists the series. **November 2026** Schedule amounts must fit the market `POST /schedule-management/v1/schedules` now rejects amounts the market cannot carry instead of silently rounding them, returning HTTP 400 with the first quarter-hour that does not fit. For each quarter-hour, the Netherlands market carries multiples of 0.004 MW (1 kWh), and the German market carries multiples of 0.001 MW (at most three decimal places). Amounts that fit are sent unchanged. **October 2026** Dutch aggregate allocations `GET /market-access/v1alpha1/timeseries/aggregate-allocations` now gives the aggregate allocations that the Dutch grid operators send to your balance responsible party: per grid area, supplier and allocation group, in 15-minute periods. Profiled allocations also carry their profile category and offtake type in `market_dimensions`. `GET /market-access/v1alpha1/timeseries/series/aggregate-allocations` lists them. Every run of one aggregate has the same `external_id`, and its `finality` tells the first run from the revised and final ones. **October 2026** Updated parties and areas Core data now has the Swedish system operators Coala AB and Vindlänken Elnät AB and their metering grid areas GUK and VIF, and the scheduling areas ALPACA, CNE and FCRC. **October 2026** Filter aggregate allocations by market metadata `GET /market-access/v1alpha1/timeseries/aggregate-allocations` and `GET /market-access/v1alpha1/timeseries/series/aggregate-allocations` now take a `market_meta` filter, as `key:value`, for example `market_meta=summed_series:ZA0`. An aggregate allocation matches when it carries every pair. **October 2026** Dutch allocations `GET /market-access/v1alpha1/timeseries/allocations` now gives the allocated volumes of your Dutch accounting points, as the grid operator sends them: consumption and production in 15-minute periods. Each series carries the GSRN of its accounting point, and `GET /market-access/v1alpha1/timeseries/series/allocations` lists them, so you can find a series by its GSRN. **October 2026** Schedule pages in the Console The schedule page has three tabs. Series gives the match status, the confirmation and the finality of each series. Open a series to see your values, the values of the counterparty and the confirmed values as a chart and a table. Versions gives each version that you submitted, with its answer, and shows the active version. History gives each version, match report and market message. Open a match report or a market message to see the message as Engrate received it. The charts give the time of day in the time zone of the market, whatever the time zone of your browser. **October 2026** Schedules list in the Console For each schedule, the Schedules page now gives the latest version and the answer to it, the active version, whether the series match, and the confirmation and finality of the series. **October 2026** Market agreement of a series Each series of a schedule version now gives `market_agreement_id`, in the version spec and in the `ids` of `GET /schedule-management/v1/schedule-series/{version_uid}`. An external or foreign series gives the value as you submitted it, also an empty string. A series with no market agreement gives `null`. Thus you can tell apart two external series that have the same areas and parties. **October 2026** Version of an incoming message Each message in `GET /schedule-management/v1/schedules/{uid}/incoming-messages` now gives `version`: the schedule version that the message answers. It is `null` if the message names no single version of yours, and always `null` for a German anomaly report. If the match report read from that report is about one version, the match report gives the version. **October 2026** Match reports of a schedule `GET /schedule-management/v1/schedules/{uid}/reports` is a new alpha endpoint. It gives a summary of each match report of a schedule, for all versions and for the reports that name no version: what the report is, when it was stated and which version it is about, without its verdicts. **October 2026** Content of an incoming message A new alpha endpoint gives one market message that the Scheduling Area Responsible sent about a schedule, as Engrate received it. `GET /schedule-management/v1/schedules/{uid}/incoming-messages/{message_uid}` takes the `uid` of the message from List Incoming Messages, or the `incoming_message_id` of a match report. **October 2026** Series state and match reports Two new alpha endpoints show the information that the Scheduling Area Responsible gave about your schedules. `GET /schedule-management/v1/schedules/{uid}/series-state` gives the match status of each series, with the findings of the Scheduling Area Responsible. It also gives the values that the Scheduling Area Responsible will use. Each match report in the series state gives the `version` that the report is about, and its `kind`. `GET /schedule-management/v1/schedule-versions/{version_uid}/reports` gives the match reports for one schedule version. **October 2026** Duplicate series refused on schedule create `POST /schedules` now returns `400 Bad Request` when two series in a request describe the same flow: two production or two consumption series in one scheduling area, two internal series with the same area, `in_party` and `out_party`, or two external or foreign series with the same `in_area`, `out_area`, `in_party`, `out_party` and `market_agreement_id`. **September 2026** Default market in the Console The console now asks which market to open on the first time you sign in. It remembers the choice, and you can change it at any time from the market menu in the top bar. **September 2026** Scheduling pages in the Console Schedules, Settlement and Configuration are now separate pages in the console, in place of the single tabbed view. The new experience contains both usability and performance fixes. **August 2026** Request rate limiting The API now enforces a request rate limit per credential. Requests over the limit get a `429 Too Many Requests` response with a `Retry-After` header. **August 2026** Core data in the Console The console has a new Core section where you can find parties, bidding zones, scheduling areas, control areas, and metering grid areas. **August 2026** Redesigned console navigation The console has a new top bar and left navigation. The navigation groups pages by what you use them for, shows icons only on medium screens, and opens as a drawer on small screens. Breadcrumbs have moved into the top bar, which stays in place as the page scrolls. **July 2026** Control areas endpoint New `GET /core/v1/control-areas` endpoint lists ENTSO-e control areas — the grid a single TSO operates — identified by EIC code. **June 2026** Bidding zones endpoint New `GET /core/v1/bidding-zones` endpoint lists European bidding zones (price areas) such as `SE3` and `NO1`, identified by EIC code. Filter by EIC, name, or country (ISO 3166-1 alpha-2). **June 2026** Cost calculation in Console (beta) The Cost of Energy Cost Calculation workflow is now available in Console as a beta feature. You can select an MGA and tariff, provide required datasets via pasted values, CSV upload, or reusable profiles, and calculate component-level and total costs for a selected period in one guided flow. **June 2026** Profiles in Console The Cost of Energy console now includes a dedicated Profiles page where you can create, edit, and delete reusable time-series profiles. Profiles can be used to represent your energy offtake from or injection to the grid in tariff cost calculations. **June 2026** MaBiS clearing period detail page The clearing periods table in the DE Settlement tab is now clickable. Each row opens a detail page showing the period status, total imbalance and cost, MaBiS deadlines (M+18 / M+30 / M+42) with relative-time hints, and tabs for daily settlements, objections, EDIFACT messages, and per-day imbalance. **June 2026** Profiles API You can now create, update, and delete custom profiles via the API. Profiles store timeseries data (e.g. energy offtake, spot prices) that can be referenced in tariff cost calculations instead of sending inline data arrays. Several pre-built global profiles are also available for common scenarios like villa and apartment offtake, facility injection, and uniform spot prices. **May 2026** Rate profile visualization The system operator page now includes a "Rate Profile" tab showing energy (SEK/kWh) and power (SEK/kW) rates over time as step charts. **April 2026** Public holidays endpoint New `GET /core/v1/holidays` endpoint returns public holiday occurrences for a year range. Filter by country (ISO 3166-1 alpha-2) and/or specific holiday identifiers (e.g. `se/julafton`). Each occurrence carries the IANA timezone in which the holiday is observed. **April 2026** Conditional (secunda) capacity datasets Four new [registered datasets](https://docs.engrate.io/api-reference/cost-of-energy/models/dataset) now support tariffs with a conditional (villkorad / secunda) capacity tier on top of firm (prima): `yearly-conditional-subscribed-offtake-capacity` and `yearly-conditional-subscribed-injection-capacity` hold the contracted conditional levels and drive the conditional subscription fee; `hourly-available-conditional-offtake-capacity` and `hourly-available-conditional-injection-capacity` carry the real-time available capacity per hour, so overdraft calculations automatically account for DSO-initiated curtailment. **April 2026** All system operators now browsable Free users can now browse all system operator pages. Tariff names and component structure are visible for every operator; detailed data (cost calculations, visualizations, and explanations) is available on a paid plan. **March 2026** DE schedule party/area validation per AG-FPM v4.6 DE schedule submissions now validate party and area EICs against AG-FPM v4.6 Appendix F before sending to the TSO. Non-compliant production, consumption, internal, and external series are rejected with a descriptive error message. **March 2026** AG-FPM v4.6 delivery day boundary validation Schedule submissions are now rejected if the time series does not start at 00:00 Europe/Berlin for the declared delivery date, enforcing the AG-FPM v4.6 requirement that schedules cover the complete delivery day. **March 2026** NL imbalance settlement time series detail Clicking a row in the NL imbalance settlement table now expands an inline detail view showing all time series for that report, including business type, value (volume or price), point count, resolution, and reason text. You can pick a series to see quarter-hourly values in a bar chart with the correct unit (MWh or EUR/MWh). **March 2026** NL imbalance settlement reports Dutch (TenneT) imbalance reports are now visible in the Settlement tab. Switch to the NL market to browse daily AIM reports, view status and document IDs, and filter by date range. New REST endpoints under `/nl/settlement/imbalance-reports` expose the same data programmatically. **March 2026** Electricity Area Map sunsetted The Electricity Area Map plugin has been sunsetted. Area and boundary data is now available through the [geodata endpoint](https://docs.engrate.io/api-reference/geo/get-geodata) in the Core plugin. **March 2026** Core plugin granted to all new organizations New organizations now automatically receive access to the Core plugin upon signup, providing core platform data alongside the existing default plugins. **March 2026** Fix schedule series unit conversion Fixed incorrect unit conversion in schedule submissions: German TSO schedules were erroneously multiplied by 4; Dutch TenneT schedules used an incorrect MWh→kWh factor. **March 2026** NL schedule time series and audit events Dutch (TenneT) schedules now show time series data in the console and emit audit trail events for each TSO response (ACK, ANO, RI, CNF). The status pipeline now progresses correctly past "ingested" for NL schedules. **March 2026** Party descriptions, website URLs, and logos Energy market parties (TSOs, DSOs, and other grid operators) now include English descriptions, official website URLs, and logo URLs in the parties API, powered by automated enrichment. **March 2026** AG-FPM v4.6 regulatory audit events and process-phase awareness Schedule Management now implements AG-FPM v4.6 process-phase-aware gate closure with separate handling for day-ahead, DA matching, and intraday phases. New audit trail events cover declared-limit breach warnings (A59), fault-tolerant acceptance (A57/A21), no-ACK timeout detection, and intraday submission advisories (close-to-QH and multiple-versions-per-QH). **March 2026** German intraday submission hardening Stronger validation and rate limiting for German schedule submissions to prevent rejected deliveries and improve reliability during intraday trading. **February 2026** New Console & Expanded Product Suite We've launched **console.engrate.io** - a completely redesigned application replacing the previous app.engrate.io. The new console features a modern design system and serves as the central hub for all Engrate products. **What's new:** * **Refreshed dashboard** with improved navigation and overview of your resources * **Power Tariff management** now fully integrated in the console * **Schedule Management** with audit logs, debugging tools, and detailed views Log in at [console.engrate.io](https://console.engrate.io) to explore. > [!NOTE] > > **app.engrate.io** now automatically redirects to **console.engrate.io**. ![Schedule graphs](https://mintcdn.com/engrate/0bTh4EAxsUtQNpv8/images/sm-new.png?fit=max\&auto=format\&n=0bTh4EAxsUtQNpv8\&q=85\&s=320ea8ed288f52c1c9c226aa7161dfd4) ![Schedule Management in the new console](https://mintcdn.com/engrate/0bTh4EAxsUtQNpv8/images/sm-new2.png?fit=max\&auto=format\&n=0bTh4EAxsUtQNpv8\&q=85\&s=97a2c120f3fd67c4a09433d83b20019f) ![Schedule Management in the new console](https://mintcdn.com/engrate/0bTh4EAxsUtQNpv8/images/sm-new3.png?fit=max\&auto=format\&n=0bTh4EAxsUtQNpv8\&q=85\&s=4a295456b42e992fbf9c9c3aed1f1611) **January 2026** Public Holidays API New endpoint to retrieve public and bank holidays for supported countries. Useful for tariff calculations where holiday pricing differs from regular weekday rates. Check out the [holidays endpoint](https://docs.engrate.io/api-reference/get-holidays). **January 2026** Power Tariff Price Levels Power Tariff now supports price levels with a configurable price tier system. You can choose between: * **No tiers** - Single flat-rate pricing * **Stacked** - Each tier applies only to power within its range * **Stepwise** - Entire power is charged at the rate of the tier it falls into This enables flexible pricing models for all components. Check out the [price level definition](https://docs.engrate.io/api-reference/get-by-id#response-power-tariff-components-items-one-of-0-data-price-levels). **October 2025** Power Tariff Calculator Engine The Power Tariff product has been extended with *The Engrate Power Tariff Calculator Engine* and is now readily available for your calculation needs. Check out the [calculation endpoint](https://docs.engrate.io/api-reference/calculate-cost). **October 2025** Power Tariff live Power Tariff is now out of Early Access! Go build! Early Access customers can safely switch from: > `api.ea.engrate.io` to `api.engrate.io` **October 2025** Updated power tariff model A new model for Power Tariff is now out. We've redesigned it to make it simpler based on customer feedback. Check out the updated documentation here: [https://docs.engrate.io/api-reference/get-by-mga-code](https://docs.engrate.io/api-reference/get-by-mga-code) **September 2025** Electricity Area Map Today we're adding Electricity Area Map. This product provides comprehensive access to electricity area boundaries from all Swedish Distribution System Operators (DSOs), Market Balance Areas (MBAs), and Market Grid Areas (MGAs). Check it out here: [https://docs.engrate.io/api-reference/list-areas](https://docs.engrate.io/api-reference/list-areas) ![Vibe Coded Map](https://mintcdn.com/engrate/3IQyk_oqTthkCz2B/images/vibe-code-map.png?fit=max\&auto=format\&n=3IQyk_oqTthkCz2B\&q=85\&s=8acca23709cc24d5b627d0b4b36c0427) **August 2025** Power Tariff Early Access The Power Tariff product is now live in early access! You can sign up for it here: [https://engrate.io/effektavgifter](https://engrate.io/effektavgifter) ![Peak power tariff hero image](https://mintcdn.com/engrate/GLl2xuk7FtdBsVkt/images/pt-hero.png?fit=max\&auto=format\&n=GLl2xuk7FtdBsVkt\&q=85\&s=adade76c832a36362b43b3214796f249) # Authentication Source: https://docs.engrate.io/guides/authentication Get an API key and send it with each request to the Engrate API. All requests to the Engrate API must include an API key. The API key identifies your company. The API then gives you access only to the data of your company. ## Get an API key If your company does not have access to the Engrate Console yet, [contact us](mailto:hello@engrate.io). 1. Sign in to [console.engrate.io](https://console.engrate.io). 2. Go to **API keys**. 3. Select **+**. 4. If you want, give the key a name. Then select **Create**. 5. Copy the key. The console shows the key only one time. If you lose the key, make a new key. ![Console page listing API keys with name, key prefix and creation date](https://mintcdn.com/engrate/-AD0kDwT-op20r0n/images/console/api-keys.png?fit=max\&auto=format\&n=-AD0kDwT-op20r0n\&q=85\&s=4d3b2b5707ea6965c7885cff63f6edf4) API keys in the console ## Send the API key in a request Put the API key in the `authorization` header of each request. Do not add a prefix such as `Bearer` before the key. ```bash theme={null} curl --request GET \ --url "https://api.engrate.io/schedule-management/v1/schedules" \ --header "authorization: $API_KEY" ``` ## Errors | Status | Cause | | - | - | | `403` | The request has no `authorization` header. | | `401` | The API key is not correct. | | `429` | You sent too many requests in a short time. Wait the number of seconds in the `Retry-After` header, then send the request again. | # Cost of Energy quickstart Source: https://docs.engrate.io/guides/cost-of-energy-quickstart Find the grid tariff for an address and calculate what a connection pays for a month. In this guide you find the metering grid area for an address, pick the tariff that fits the connection, and calculate the month's cost per tariff component. The steps are the same for any connection: an apartment, a house, a business or a producer. The example answers one question: **what does a house in Västerås pay for its grid connection in January?** It takes about ten minutes. ## Before you start * **An API key.** Create one in the [console](https://console.engrate.io). See [Authentication](/guides/authentication). * **Access to the Västmanland Södra grid area.** On a trial, pick it as your trial metering grid area in the console, under **Cost of Energy**, before you start. With full access you can skip this. * **Python 3.10 or later** with [httpx](https://www.python-httpx.org/), for the last step: `pip install httpx`. ```bash theme={null} export API_KEY="" ``` **1. Find the metering grid area** A tariff depends on where the house connects to the grid. Look up the metering grid area for the house's coordinates: ```bash curl theme={null} curl --request GET \ --url "https://api.engrate.io/core/v1/metering-grid-areas?lat=59.611&lon=16.545" \ --header "authorization: $API_KEY" ``` ```python Python theme={null} import os import httpx api = httpx.Client( base_url="https://api.engrate.io", headers={"authorization": os.environ["API_KEY"]}, ) mga = api.get("/core/v1/metering-grid-areas", params={"lat": 59.611, "lon": 16.545}).json()["mgas"][0] ``` ```json Response theme={null} { "mgas": [ { "id": "fa393787-4a78-52a9-8863-85ffe4508f21", "name": "Västmanland Södra", "extra_ids": [ { "kind": "se.mga_code", "value": "VLS" } ] } ] } ``` You can also search by address with `street`, `city` and `zipcode`. **2. List the tariffs in the area** A grid area has many tariffs: for apartments, houses, businesses and producers. Each one says who it is for in `eligibility`: ```bash curl theme={null} curl --request GET \ --url "https://api.engrate.io/cost-of-energy/v1/tariffs?metering_grid_area_id=fa393787-4a78-52a9-8863-85ffe4508f21" \ --header "authorization: $API_KEY" ``` ```python Python theme={null} tariffs = api.get("/cost-of-energy/v1/tariffs", params={"metering_grid_area_id": mga["id"]}).json()["tariffs"] ``` ```json Response (shortened) theme={null} { "tariffs": [ { "id": "e01abc49-ff64-57de-8294-bb38c8a79dec", "name": "Säkringsabonnemang Lägenhet", "eligibility": { "fuse_size": { "minimum": 16.0, "maximum": 25.0, "unit": "A" }, "other": ["fuse_based", "apartment", "offtake"] } }, { "id": "042c0b34-f270-52c6-b9ac-4a55518aa122", "name": "Säkringsabonnemang 20 A", "eligibility": { "fuse_size": { "value": 20.0, "unit": "A" }, "other": ["fuse_based", "offtake"] } }, { "id": "99d8a11a-227c-5ad0-a5c9-6b5cd4e63b31", "name": "Lågspänning", "eligibility": { "fuse_size": null, "other": ["low_voltage_grid", "business", "offtake"] } } ] } ``` **3. Pick the house's tariff** The house has a 20 A main fuse and takes energy from the grid. Match that against `eligibility`, and leave out the apartment tariff: ```python Python theme={null} def fits(eligibility: dict, fuse_a: float) -> bool: fuse = eligibility.get("fuse_size") if not fuse: return False if "value" in fuse: return fuse["value"] == fuse_a return (fuse["minimum"] or 0) <= fuse_a <= (fuse["maximum"] or fuse_a) tariff = next( ( t for t in tariffs if fits(t["eligibility"], 20) and "offtake" in t["eligibility"]["other"] and "apartment" not in t["eligibility"]["other"] ), None, ) if tariff is None: raise SystemExit("No tariff for a 20 A household connection in this grid area") ``` That gives **Säkringsabonnemang 20 A**. Its four components are what the house pays in January 2026: | Component | What it charges | Rate | | - | - | - | | Effektavgift | The highest weekday hour between 07:00 and 19:00, holidays excluded | 47.4 SEK per kW per month | | Fast avgift | A fixed fee | 318 SEK per month | | Elöverföring | Energy transferred | 0.172 SEK per kWh | | Energiskatt | Energy tax | 0.36 SEK per kWh | Fetch the tariff with `GET /cost-of-energy/v1/tariffs/{tariff_id}` to see each component's [calculation pipeline](/api-reference/cost-of-energy/calculation-pipeline). A component also has a validity window: when the operator changes a price, a new component takes over from that date. **4. Calculate January** Send the house's consumption for January, one value per quarter-hour in kWh, and get the cost per component back. This example generates a simple household profile: a little at night, more in the morning, most in the evening. ```python Python theme={null} from datetime import datetime, timedelta, timezone from zoneinfo import ZoneInfo stockholm = ZoneInfo("Europe/Stockholm") start = datetime(2026, 1, 1, tzinfo=stockholm) end = datetime(2026, 2, 1, tzinfo=stockholm) def kwh(t: datetime) -> float: local = t.astimezone(stockholm) if 17 <= local.hour < 21: return 0.9 if 7 <= local.hour < 9 and local.weekday() < 5: return 0.6 if local.hour < 6: return 0.25 return 0.4 t, offtake = start.astimezone(timezone.utc), [] while t < end.astimezone(timezone.utc): offtake.append(kwh(t)) t += timedelta(minutes=15) result = api.post("/cost-of-energy/v1/calculate", json={ "tariff_id": tariff["id"], "start_time": start.isoformat(), "end_time": end.isoformat(), "time_series": [{"name": "quarter-hourly-energy-offtake", "values": offtake}], }).json() for component in result["components"]: print(component["name"], round(sum(component["time_series"][0]["values"]), 2)) ``` ```text Output theme={null} Effektavgift 170.64 Fast avgift 318.0 Elöverföring 234.26 Energiskatt 490.32 ``` **The house pays 1,213.22 SEK for its grid connection in January.** It used 1,362 kWh. Its highest weekday hours inside the peak window, 17:00 to 19:00, used 3.6 kW, so the peak fee is 3.6 kW × 47.4 SEK/kW = 170.64 SEK. The same load after 19:00 never counts towards the peak. Each component returns its cost at its own resolution: the peak and fixed fees once for the month, transfer and tax per quarter-hour. Add `?include_intermediate_time_series=true` to see every step of each pipeline. ## Next steps > [card] [Which tool for which question](/products/cost-of-energy#which-question-are-you-asking) > > Calculate, compare tariffs, optimise a battery, or find the expensive hours. > [card] [Calculation pipelines](/api-reference/cost-of-energy/calculation-pipeline) > > How a component turns consumption into cost, step by step. > [card] [Python SDK](/api-reference/cost-of-energy/engratepy) > > Run the same calculation, or an optimisation, on your side. > [card] [Cookbook](https://github.com/engrate/engrate-cookbook) > > Runnable recipes: fetch a tariff, calculate a cost, optimise a home battery. # Connect via MCP Source: https://docs.engrate.io/guides/mcp Give your AI agent direct access to up-to-date energy data and integrations ## Supported clients We use [OAuth 2.0 Dynamic Client Registration](https://curity.io/resources/learn/openid-connect-understanding-dcr/) for secure authentication, making the Engrate MCP compatible with any client supporting this industry-standard flow. ## Getting started For a step-by-step walkthrough of how to connect to a Remote MCP Server please see the [official documentation](https://modelcontextprotocol.io/docs/develop/connect-remote-servers#connecting-to-a-remote-mcp-server). For completing the process you'll need 2 things: * An [Engrate account](/guides/authentication) * The **Remote MCP Server URL**: ```sh theme={null} https://mcp.engrate.io/mcp ``` ### Example: Connecting Claude to Engrate Integrations As an administrator of your company's organization, you can add custom connectors to enable your teams to access all Engrate integrations available to your organization. For complete details on custom connectors, refer to the official Anthropic documentation [here](https://support.claude.com/en/articles/11175166-getting-started-with-custom-connectors-using-remote-mcp). **1. Add custom connector** Navigate to **Admin settings** and click **Add custom connector**. ![MCP Claude step 0](https://mintcdn.com/engrate/xkAnksi9jpvpKJox/images/mcp-claude-step-0.png?fit=max\&auto=format\&n=xkAnksi9jpvpKJox\&q=85\&s=9fde20af3304345aef078d17f541b05a) **2. Connect to Engrate MCP** Click **Connect** on the newly added Engrate connector. ![MCP Claude step 1](https://mintcdn.com/engrate/xkAnksi9jpvpKJox/images/mcp-claude-step-1.png?fit=max\&auto=format\&n=xkAnksi9jpvpKJox\&q=85\&s=ab4c692c167867b80e2b3bb473648238) **3. Authenticate and register client** Log in with your Engrate account credentials. This initiates OAuth 2.0 Dynamic Client Registration, which automatically provisions secure credentials for your organization's Claude instance and establishes an authorized connection to Engrate's APIs. ![MCP Claude step 2](https://mintcdn.com/engrate/xkAnksi9jpvpKJox/images/mcp-claude-step-2.png?fit=max\&auto=format\&n=xkAnksi9jpvpKJox\&q=85\&s=32af0110da44a68ea362791518517a78) **4. Start using Engrate data** Your prompts now have direct access to all Engrate products — Cost of Energy, Schedule Management, and more. Claude can query tariffs, calculate energy costs, explore grid areas, and build prototypes using your organization's Engrate integrations. ![MCP Claude step 4](https://mintcdn.com/engrate/xkAnksi9jpvpKJox/images/mcp-claude-step-4.png?fit=max\&auto=format\&n=xkAnksi9jpvpKJox\&q=85\&s=db43c54e28da763c827026cdb2aa6bfb) ## Connect to Engrate documentation Connecting your IDE or editor to Engrate's documentation MCP server provides AI-assisted access to our API documentation, code examples, and integration guides directly in your development environment. > [tab] Contextual menu > > You can always use the **_Contextual menu_** at the top of this page (arrow right next to "Copy page") to quickly add documentation to various options. > > ![MCP contextual menu](https://mintcdn.com/engrate/t2DPBLaBLKPPrbVY/images/mcp-context.png?fit=max\&auto=format\&n=t2DPBLaBLKPPrbVY\&q=85\&s=7236ee434d3f762eeba4bdd449d7b8e4) > [tab] VS Code > > To connect the Engrate MCP server to VS Code, click the **Install in VS Code** button in the Contextual menu. To manually connect the MCP server instead, create a `.vscode/mcp.json` file and add: > > ```json theme={null} > { > "mcp": { > "servers": { > "Engrate Developer": { > "url": "https://docs.engrate.io/mcp" > } > } > } > } > > ``` > > See the [**VS Code documentation**](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) for more details. > [tab] Cursor > > To connect the Engrate MCP server to Cursor, click the **Install in Cursor** button in the contextual menu. To manually connect the MCP server instead, follow these steps: > > **1. Open MCP settings** > > 1. Use **Command** + **Shift** + **P** (**Ctrl** + **Shift** + **P** on Windows) to open the command palette. > 2. Search for "Open MCP settings". > 3. Select **Add custom MCP**. This will open the `mcp.json` file. > > **2. Configure the Engrate MCP server** > > In `mcp.json`, add: > > ```json theme={null} > { > "mcpServers": { > "Engrate Developer": { > "url": "https://docs.engrate.io/mcp" > } > } > } > > ``` > > **3. Test the connection** > > In Cursor's chat, ask "What tools do you have available?" Cursor should show the Engrate Developer MCP server as an available tool. > > See [**Installing MCP servers**](https://docs.cursor.com/en/context/mcp#installing-mcp-servers) in the Cursor documentation for more details. > [tab] Claude Code > > To use the Engrate documentation MCP server with Claude Code, run the following command: > > ```shellscript theme={null} > claude mcp add --transport http Engrate https://docs.engrate.io/mcp > ``` > > Test the connection by running: > > ```shellscript theme={null} > claude mcp list > > ``` > > See the [**Claude Code documentation**](https://docs.anthropic.com/en/docs/claude-code/mcp#installing-mcp-servers) for more details. > [tab] Claude > > **1. Add the Engrate developer MCP server to Claude** > > 1. Navigate to the [**Connectors**](https://claude.ai/settings/connectors) page in the Claude settings. > > 2. Select **Add custom connector**. > > 3. Add the Engrate documentation MCP server: > > * Name: `Engrate Developer` > > * URL: `https://docs.engrate.io/mcp` > > 4. Select **Add**. > > **2. Access the MCP server in your chat** > > 1. When using Claude, select the attachments button (the plus icon). > 2. Select the Engrate Developer server. > 3. Ask Claude a question about Engrate developer documentation. # Welcome Source: https://docs.engrate.io/guides/welcome One API for market communication across European electricity markets. Meet your market obligations as a balance responsible party or supplier through one API. Because Engrate speaks the messages of each market, you integrate only one time. ## Market Communication Read the [Market Communication overview](/market-communication/overview) to learn how Engrate works with the markets. > [card] [Scheduling](/market-communication/schedules/overview) > > Send the market your plan for production, consumption and trades. > [card] [Supplier switches](/market-communication/structuring/supplier-switches) > > Take over supply of an accounting point. > [card] [Allocations](/market-communication/allocations/accounting-points) > > See how much energy the market allocated to you. ## Add-on > [card] [Cost of Energy](/products/cost-of-energy) > > Grid fees, taxes and other charges for every Swedish system operator with published tariffs, as machine-readable calculation pipelines. ## Getting started **1. Contact us** [Contact us](mailto:hello@engrate.io) to get access for your company. We prepare your company account and give you access to [console.engrate.io](https://console.engrate.io). **2. Make an API key** Sign in to [console.engrate.io](https://console.engrate.io) and make an API key. **3. Send your first schedule or supplier switch** Use the guide [Send your first schedule](/market-communication/guides/send-your-first-schedule) to send a schedule and read the confirmation from the market. To become the supplier of an accounting point, read [Supplier switches](/market-communication/structuring/supplier-switches). **4. Explore the API** Start with the [Market Communication API overview](/api-reference/market-communication/overview). # Allocations per accounting point Source: https://docs.engrate.io/market-communication/allocations/accounting-points Read how much energy the market allocated to each of your accounting points. After delivery, the market calculates how much energy each accounting point consumed or produced in each settlement period. To do this, it uses metered values or a profile. The market settles you on these allocated volumes. Engrate collects the volumes and all later corrections. ## Quality The market can send more than one value for the same settlement period. For example, it can first send a provisional value, then an estimate, and a week later the measured value. Each value has one of these qualities, from the least to the most trusted: * **Provisional**: an incomplete or unconfirmed value, such as a placeholder or a sum with missing inputs. The sender may replace it. * **Estimated**: a substitute for a missing reading, for example from a profile or a comparable period. Expect a better value later. * **Calculated**: a value the market derived with a defined calculation. * **Measured**: a value read from the meter. Engrate keeps all the values. To get the current value, see [Multiple values per timestep](/api-reference/allocations/overview#multiple-values-per-timestep). ## Finality A value from a settlement run also has a finality, which shows how final it is: | Value | Description | | - | - | | `preliminary` | The first level, sent before the market has all the data. | | `revised` | The level used for corrections to the preliminary data. | | `final` | The level used for settlement and invoicing. | | `correction` | The level used for corrections when the final value was wrong. A correction replaces the final value. | German values have no finality. Dutch values get their finality from the day the grid operator created them, by the rule under [Netherlands](/market-communication/allocations/aggregate-allocations#netherlands) on the aggregate allocations page. ## Versions The market can send a new version of a value, for example to correct it. Each value has the market's timestamp for its version in `stated_at`. When finality and quality do not decide which value is current, the value with the latest market timestamp is current. This is also true when Engrate receives the newer version first. ## Quality in each market Engrate maps each market's quality codes to a common quality scale. ### Germany The market marks each value in the load profile of a market location with a quality code. | Code | Market term | Quality | | - | - | - | | `Z18` | Vorläufiger Wert (provisional value) | `provisional` | | `67` | Ersatzwert (substitute value) | `estimated` | | `220` | Wahrer Wert (true value) | `measured` | ### Netherlands The market marks each value of an allocation with an origin code. | Code | Market term | Quality | | - | - | - | | `CLC` | Berekend (calculated) | `calculated` | | `NMS` | Ongemeten 'nul' (unmeasured zero) | `calculated` | | `MSR` | Gemeten (measured) | `measured` | | `UMS` | Gemeten update (measured, updated) | `measured` | ## History Engrate keeps each value together with the time when it arrived. Because of this, you can read the data as it was at an earlier time. For example, you can train a forecast only on the data that was known at 10:00. ## In the API See [List Allocation Series](/api-reference/timeseries/list-allocation-series) and [List Allocations](/api-reference/timeseries/list-allocations) in the API reference. # Aggregate allocations Source: https://docs.engrate.io/market-communication/allocations/aggregate-allocations Read the totals that the market calculates for groups of accounting points. The market also calculates totals for groups of accounting points and uses these totals to settle your balance group. An aggregate allocation is one such total. For example, it can be the consumption of all profiled accounting points of your balance group in one metering grid area. ## What it includes Each aggregate allocation tells which accounting points it includes. For example, it can include only the accounting points of one balance group, one supplier or one area. It also tells if the volumes come from metered values or from a profile, and which party calculated the total. ## Finality The market sends the same total more than once. It sends a first value soon after delivery and new values later when more data comes in. Each value shows how final it is: | Value | Description | | - | - | | `preliminary` | The first level, sent before the market has all the data. | | `revised` | The level used for corrections to the preliminary data. | | `final` | The level used for settlement and invoicing. | | `correction` | The level used for corrections when the final value was wrong. A correction replaces the final value. | The market can also send a new version of a total at the same finality, for example to correct it. Each value has the market's timestamp for its version in `stated_at`. Within one finality, the value with the latest market timestamp is current, also when Engrate receives the newer version first. To get the current value, see [Multiple values per timestep](/api-reference/allocations/overview#multiple-values-per-timestep). Each value also has a quality, as for [allocations per accounting point](/market-communication/allocations/accounting-points). ## Finality and quality in each market Each market uses its own codes or rules for finality and quality, and its own timestamp for each value. ### Germany The market first sends daily totals (Summenzeitreihen) soon after delivery, and later the totals for the balance group settlement. Engrate assigns finality from the type of each total. | Code | Market term | Finality | | - | - | - | | `Z39` | Tägliche Summenzeitreihe (daily summed series) | `preliminary` | | `BK` | Zeitreihen im Rahmen der Bilanzkreisabrechnung (time series for balance group settlement) | `final` | The market marks each value of a total with a quality code. | Code | Market term | Quality | | - | - | - | | `Z18` | Vorläufiger Wert (provisional value) | `provisional` | | `Z30` | Fehlender Wert (missing value) | `provisional` | | `67` | Ersatzwert (substitute value) | `estimated` | | `79` | Energiemenge summiert (summed energy quantity) | `calculated` | | `220` | Wahrer Wert (true value) | `measured` | On a daily total, `Z18` and `Z30` mean that the market counted some inputs as zero: provisional inputs for `Z18`, and missing inputs for `Z30`. Such a total can be lower than the energy that was actually consumed or produced. The market's timestamp of a daily total is the date of its message. For a total for the balance group settlement, it is when the market completed that version. ### Netherlands The market sends no finality code. Engrate assigns each total a finality from the day the grid operator created it, counted in Dutch working days after the delivery day: * Before the 5th working day, the finality is `preliminary`. * From the 5th working day, the finality is `revised`. * From the 10th working day, the finality is `final`. The market's timestamp of a total is when the grid operator created it. Every Dutch total has the quality `calculated`. For accounting points with a smart meter, the market sends each total in two parts, one from measured values and one from calculated values, which Engrate adds into one total. For the other totals, the market sends no quality. ## Market dimensions and metadata in each market Each market adds its own keys to an aggregate allocation, with the market's own codes as values. The keys in `market_dimensions` tell which accounting points the total includes. Two totals that differ in one of them include different accounting points. The keys in `market_meta` only label the total. They do not change which accounting points it includes. ### Germany | Key | In | Value | Example | | - | - | - | - | | `series_type` | `market_dimensions` | The series type (Zeitreihentyp) of the accounting points in the total | `SLS` | | `voltage_level` | `market_dimensions` | The voltage level (Spannungsebene), with the transformation between two levels after a `/` when there is one. Only some totals of one metering grid area have it. | `E06`, `E05/E09` | | `summed_series` | `market_meta` | The kind of total (Bezeichnung der Summenzeitreihe) | `Z97` | | `control_area` | `market_meta` | The EIC of the control area (Regelzone) of the total. For a total of one metering grid area, it is the control area that the grid area is in. | `10YDE-RWENET---I` | ### Netherlands | Key | In | Value | Example | | - | - | - | - | | `allocation_group` | `market_dimensions` | The allocation group (allocatiegroep): how the grid operator allocates the accounting points, such as telemetered (`TMT`), smart meter (`SMA`) or profiled (`PRF`) | `PRF` | | `profile_category` | `market_dimensions` | The profile category (profielcategorie) of profiled accounting points | `E1A` | | `offtake_type` | `market_dimensions` | The offtake type (vastgesteld afnametype) of profiled accounting points in some profile categories | `AMI` | Dutch totals have no market metadata. ## Accounting points Each accounting point shows the aggregate allocations that include it. See [Accounting points](/market-communication/structuring/accounting-points). ## In the API See [List Aggregate Allocation Series](/api-reference/timeseries/list-aggregate-allocation-series) and [List Aggregate Allocations](/api-reference/timeseries/list-aggregate-allocations) in the API reference. # Glossary Source: https://docs.engrate.io/market-communication/glossary The terms that Market Communication uses and the names that each market uses for them. ### Accounting point The point in the grid where supply can change from one supplier to another. Germany: Marktlokation (MaLo). Netherlands: aansluiting, with an EAN-18 code. ### Active revision The last revision that the Scheduling Area Responsible accepted. The market holds this revision as binding. ### Aggregate allocation A total that the market calculates for a group of accounting points. Germany: Summenzeitreihe. ### Allocation The energy that the market gives to one accounting point for one settlement period. ### Anomaly report The market message that tells which series do not match their counterpart series. Germany: Anomaly Report (ANO). Netherlands: Anomaly Report. ### Balance group The account that the market settles a BRP on. Germany: Bilanzkreis. Netherlands: the BRP itself. ### Balance responsible party (BRP) The party that is financially responsible for the balance of a portfolio. Germany: Bilanzkreisverantwortlicher (BKV). Netherlands: balance responsible party. ### Confirmation The values that the Scheduling Area Responsible will use for a series in each quarter-hour. ### Confirmation report The market message that gives the values that the Scheduling Area Responsible will use. Germany: Confirmation Report (CNF). Netherlands: settlement program. ### Counterpart series The series that the other side of a trade sends. The market compares it with your series. Germany: Gegenmeldung. ### Finality How final a value is. An intermediate or preliminary value can still change. A final value replaces all earlier values. Not all markets mark values as final. ### Grid operator The party that operates the grid that an accounting point connects to. Germany: Netzbetreiber. Netherlands: netbeheerder. ### Match report One answer from the Scheduling Area Responsible: an acknowledgement, an anomaly report or a confirmation report. ### Match status The result of matching for one series. It tells if the market checked the series and if it agrees with the counterpart series. ### Matching rule The rule of the market for a value that the two sides did not agree on. Germany: Minimumregel, Sonderbilanzkreise. Netherlands: set to zero, priority nomination. ### Metering grid area The part of a grid in which the market settles metered energy. Germany: Bilanzierungsgebiet. Netherlands: netgebied. ### Revision One submission of a schedule to the market. The API calls it a version. Germany: Fahrplanversion. ### Schedule Your plan for one delivery day in one scheduling area, with one value for each quarter-hour. Germany: Fahrplan. Netherlands: energy program. ### Scheduling Area Responsible The market role that receives your schedule, matches it and confirms it. Germany: the TSO of the control area. Netherlands: TenneT. ### Scheduling area The area that you send a schedule for. Germany: Regelzone. Netherlands: the Netherlands. ### Series One flow of energy in a schedule, with one value for each quarter-hour. Germany: Zeitreihe. ### Series state The match status and the confirmation of one series. ### Supplier switch The process in which a new supplier takes over supply of an accounting point. Germany: Lieferantenwechsel. # Handle a mismatch Source: https://docs.engrate.io/market-communication/guides/handle-a-mismatch Find out why a series does not match your counterparty's, and fix it before the market decides for you. When your series and your counterparty's do not agree, the market decides the value after its deadline: in Germany by its matching rules, in the Netherlands by setting the series to zero, or, between two BRPs with a priority nomination, by using the values of the BRP with priority. Fix the mismatch before that, and you keep control of the value. **1. Find the series that do not match** ```bash theme={null} curl --request GET \ --url "https://api.engrate.io/schedule-management/v1/schedules/$SCHEDULE_UID/series-state" \ --header "authorization: $API_KEY" ``` Look for series whose `match_status` is not `matched` or `not_checked`: * `inconsistent`: you and the counterparty sent different values. * `counterpart_missing`: the counterparty sent nothing for this trade. * `counterpart_only`: the counterparty sent a series that names you, and you did not. **2. Read the findings** `findings` gives the market's reasons, with its codes, and per affected quarter-hour your value and the counterparty's: ```json theme={null} { "match_status": "inconsistent", "findings": { "reasons": [{ "code": "A09", "text": "Time series not matching" }], "positions": [ { "position": 8, "ours": 2.0, "counterparty": 1.0 } ] } } ``` `position` counts quarter-hours from local midnight, starting at 0: position 8 is 02:00 to 02:15. The console shows the same findings on the schedule's page, with a chart of both sides. **3. Agree on the values** Contact the counterparty and agree which values are right. The market does not decide who is right before its deadline: one of you changes the series. **4. Send the corrected values** If your side changes, post the whole day again with the corrected values. Engrate sends a new revision. For a `counterpart_only` series, add the series the counterparty expects. When the counterparty's side changes, you do not need to do anything. The market matches again and reports the new result. **5. Check the result** Read the series state again. The series turns `matched`, and its confirmation shows your values. If the deadline passed first, the confirmation shows the value the market chose, and why. See [Why a value changed](/market-communication/schedules/matching-and-confirmation#why-a-value-changed). ## Deadlines * **Germany**: in the day-ahead process, until 15:30 on D-1. In the intraday process, until the gate closure of each quarter-hour. * **Netherlands**: until 10:00 on D+1. # Send your first schedule Source: https://docs.engrate.io/market-communication/guides/send-your-first-schedule Send a schedule for one delivery day, and read what the market did with it. This guide sends a schedule for one delivery day in Germany and follows it to the market's confirmation. In the Netherlands, you do the same steps with the Dutch identifiers from the [Core API](/api-reference/core/overview). The Dutch market accepts only internal, external and foreign series. Engrate does not send production or consumption series to TenneT. You need an API key (see [Authentication](/guides/authentication)), and your organization must be connected to the market. Until it is, creating a schedule returns `404 Organization is not configured`. **1. Build the series** One series per flow. Each series has one value in MW per quarter-hour of the delivery day, starting at local midnight: 96 values, or 92 and 100 on the days daylight saving time starts and ends. ```json schedule.json theme={null} { "market": "DE", "tso": "50HERTZ_DE_TSO", "receiver_id": "10XDE-VE-TRANSMK", "date": "2026-11-02", "series": [ { "type": "internal", "ids": { "in_area": "10YDE-VE-------2", "out_area": "10YDE-VE-------2", "in_party": "11XDE-COUNTERP-B", "out_party": "11XDE-EXAMPLE--A" }, "data": [ { "ts": "2026-11-01T23:00:00Z", "amount": 10.5 }, { "ts": "2026-11-01T23:15:00Z", "amount": 10.5 } ] } ] } ``` This series sells energy from your party (`11XDE-EXAMPLE--A`) to a counterparty in the 50Hertz area. The [Schedule](/api-reference/schedule-management/models/schedule) model gives the values of `tso`. The [Schedule series](/api-reference/schedule-management/models/schedule-series) model gives the series types. The example shows two of the 96 values. This script writes the whole day to `schedule.json`, with the same 10.5 MW in each quarter-hour, and counts the quarter-hours from local midnight, so it also works on the days daylight saving time starts and ends: ```python make_schedule.py theme={null} import json from datetime import date, datetime, timedelta, timezone from zoneinfo import ZoneInfo DAY = date(2026, 11, 2) BERLIN = ZoneInfo("Europe/Berlin") # The delivery day runs from local midnight to the next local midnight. start = datetime(DAY.year, DAY.month, DAY.day, tzinfo=BERLIN).astimezone(timezone.utc) next_day = DAY + timedelta(days=1) end = datetime(next_day.year, next_day.month, next_day.day, tzinfo=BERLIN).astimezone(timezone.utc) data = [] ts = start while ts < end: data.append({"ts": ts.strftime("%Y-%m-%dT%H:%M:%SZ"), "amount": 10.5}) ts += timedelta(minutes=15) schedule = { "market": "DE", "tso": "50HERTZ_DE_TSO", "receiver_id": "10XDE-VE-TRANSMK", "date": DAY.isoformat(), "series": [ { "type": "internal", "ids": { "in_area": "10YDE-VE-------2", "out_area": "10YDE-VE-------2", "in_party": "11XDE-COUNTERP-B", "out_party": "11XDE-EXAMPLE--A", }, "data": data, } ], } with open("schedule.json", "w") as f: json.dump(schedule, f, indent=2) print(f"{len(data)} quarter-hours written to schedule.json") ``` ```bash theme={null} python3 make_schedule.py ``` **2. Send it** ```bash theme={null} curl --request POST \ --url "https://api.engrate.io/schedule-management/v1/schedules" \ --header "authorization: $API_KEY" \ --header "content-type: application/json" \ --data @schedule.json ``` The response gives the `schedule_uid`. A `400` or `422` response says what is wrong with the request, such as a missing quarter-hour or two series for the same flow. Engrate now sends revision 1 to the Scheduling Area Responsible. **3. Follow the revision** ```bash theme={null} curl --request GET \ --url "https://api.engrate.io/schedule-management/v1/schedules/$SCHEDULE_UID/versions" \ --header "authorization: $API_KEY" ``` The `status` of the revision moves from `created` to `submitted`, then to the market's answer, such as `ack_positive`. The [Schedule version](/api-reference/schedule-management/models/schedule-version) model lists all statuses. **4. Read the series state** ```bash theme={null} curl --request GET \ --url "https://api.engrate.io/schedule-management/v1/schedules/$SCHEDULE_UID/series-state" \ --header "authorization: $API_KEY" ``` For each series, `match_status` says whether it matches your counterparty's series, and `confirmation` gives the values the Scheduling Area Responsible will use. A series stays `not_checked` until the Scheduling Area Responsible matches it. See [Matching](/market-communication/schedules/matching-and-confirmation). **5. Change it** To change the schedule, post the whole day again with the new values. Engrate sends a new revision. If a series does not match, see [Handle a mismatch](/market-communication/guides/handle-a-mismatch). # Coverage Source: https://docs.engrate.io/market-communication/how-it-works/coverage Which processes are available in which market, and how stable each API is. ## Processes and markets | Process | Germany | Netherlands | Nordics | API | | - | - | - | - | - | | [Scheduling](/market-communication/schedules/overview) | Yes | Yes | Coming soon | Stable | | [Matching](/market-communication/schedules/matching-and-confirmation) | Yes | Yes | Coming soon | Alpha | | [Accounting points](/market-communication/structuring/accounting-points) | Yes | Coming soon | Coming soon | Alpha | | [Supplier switches](/market-communication/structuring/supplier-switches) | Yes | Coming soon | Coming soon | Alpha | | [Allocations per accounting point](/market-communication/allocations/accounting-points) | Yes | Yes | Coming soon | Alpha | | [Aggregate allocations](/market-communication/allocations/aggregate-allocations) | Yes | Yes | Coming soon | Alpha | | [Imbalance](/market-communication/imbalance/overview) | Yes | Yes | Coming soon | Alpha | > [!TIP] > > We add new markets and processes all the time. If you need a market or a process that is not in this table, [contact us](mailto:hello@engrate.io). Your needs help us decide what to build next. ## API stability * **Stable**: generally available. The [changelog](/changelog/product-updates) lists what changes. * **Alpha**: the API can change without notice. Use it, and tell us what you need from it. The API is the same in each market. # Identifiers Source: https://docs.engrate.io/market-communication/how-it-works/identifiers How Engrate uses the identifiers of each market. Each market has its own identifiers for parties, areas and accounting points. For example, in Germany a party in a schedule has an EIC code and a grid operator has a BDEW code or a GLN. Engrate keeps the identifiers of the market. Because of this, you use the same identifiers in the API as in the market. ## Engrate identifiers Engrate also gives each object its own identifier. Use this identifier to read the object in the API. Some objects, such as a schedule, have no identifier in the market. For these objects, the Engrate identifier is the only identifier. ## Look up parties and areas The [Core API](/api-reference/core/overview) lists the parties, scheduling areas, control areas and metering grid areas of each market, with their identifiers. Use it to check a counterparty's code before you send a schedule. # Roles and areas Source: https://docs.engrate.io/market-communication/how-it-works/roles-and-areas The market roles and areas that every market has. Every electricity market has the same tasks. For example, one party receives your schedule and another party operates the grid that your customers connect to. Each market gives these tasks to its own parties and uses its own names for them. Engrate uses the roles and areas of the [Harmonised Electricity Market Role Model](https://www.entsoe.eu/data/cim/role-models/) from ENTSO-E. Because of this, a role or an area has the same meaning in all markets. ## Roles * **Balance responsible party (BRP)**: is financially responsible for the balance of a portfolio and sends schedules. * **Scheduling Area Responsible**: receives your schedules, matches them against the schedules of your counterparties and confirms the values that it will use. * **Supplier**: supplies energy to the customers at accounting points. * **Grid operator**: operates the grid that an accounting point connects to. It sends the master data of the accounting point and decides on supplier switches. You can be a BRP, a supplier or both. Engrate communicates with the market for you with your own market identity. ## Areas * **Scheduling area**: the area that you send a schedule for. * **Control area**: the area that one transmission system operator balances. * **Metering grid area**: the part of a grid in which the market settles metered energy. The [Core API](/api-reference/core/overview) lists the parties and areas of each market with their identifiers. # Imbalance Source: https://docs.engrate.io/market-communication/imbalance/overview Read the imbalance that the market settles for your balance groups. The market settles the imbalance of each of your balance groups: for each settlement period, how much more or less energy the balance group injected or withdrew than its trade schedule. Engrate gives you this imbalance as the market settles it, so you can check an imbalance invoice against it. ## Series An imbalance series holds the imbalance of one balance group in one scheduling area. A market can also send the adjustments that it included in the imbalance, as more series. See [Imbalance series](/api-reference/imbalances/models/imbalance-series) for how to tell the series apart. On a total, a positive volume means that the balance group was long, and a negative volume means that it was short. See [Imbalance record](/api-reference/imbalances/models/imbalance-record) for how to read the sign. ## Finality The market can settle a period more than once. It sends a first run after the period, and can send later runs when it has more data or corrects a run. Engrate keeps every run. Each record has the `finality` of its run and, in `stated_at`, the market's timestamp for that version. To get one value for each series and settlement period, use the record with the highest `finality`, then the latest `stated_at`. See [More than one record per settlement period](/api-reference/imbalances/models/imbalance-record#more-than-one-record-per-settlement-period). ## In each market ### Germany The transmission system operator of each control area settles the balance groups in that area, as balance coordinator (Bilanzkoordinator). For each month, it sends the imbalance (Bilanzabweichung) of each balance group in its control area. It sends a later run of a series only when a value in it changes. When it settles a month without changing the series, the series keeps only its `preliminary` records, also after the balance coordinator has billed that month. Each German imbalance series is the total of one balance group in one control area: | Field | Value | Example | | - | - | - | | `external_id` | The id of the MaBiS metering point (MaBiS-Zählpunkt) that the balance coordinator gives the series. Its form differs between control areas. | `DE5338575724849YW15PBW6J3X0ZYEJP1` | | `scheduling_area` | The EIC of the control area (Regelzone) | `10YDE-RWENET---I` | | `balance_group` | The EIC of the balance group (Bilanzkreis). A sub-balance group (Sub-Bilanzkreis) has series of its own. | | | `component_kind` | `total` | | | `component_value` | `ALL` | | | `market_dimensions` | Empty | `{}` | A balance responsible party usually has a balance group in each control area where it trades. These balance groups can have the same EIC. Then the same `balance_group` value comes with a different `scheduling_area` for each of them. The adjustments in the German imbalance are not available yet. The imbalance of a balance group already includes the imbalance of its sub-balance groups, and a sub-balance group can have sub-balance groups of its own. Do not add the series of a sub-balance group to the series of a balance group above it, or you count it twice. The balance coordinator bills only the settlement balance group (Abrechnungsbilanzkreis) at the top. A series appears when the balance coordinator activates it for your balance group. When the volumes of a month arrive before the activation, Engrate stores them when the activation arrives. Their `known_at` stays the time when Engrate received them. The balance coordinator sends no finality code. Engrate assigns each run a finality from the day the balance coordinator stated it, counted in German working days: | The balance coordinator states the run | Finality | | - | - | | Before the 42nd working day after the settlement month | `preliminary` | | From the 42nd working day after the settlement month | `final` | | From the 8th working day of the 5th month after the settlement month | `correction` | The market's timestamp of a run, in `stated_at`, is when the balance coordinator completed that version (Versionsangabe). ### Netherlands TenneT, the transmission system operator, settles the imbalance (onbalans) of each balance responsible party (balanceringsverantwoordelijke) in the Netherlands, one day at a time. It updates the imbalance of a day every day until the imbalance is final. TenneT invoices the final imbalance. After that, the imbalance of a day changes only when TenneT recalculates it, for example after a grid operator corrects its metering data. Each Dutch imbalance series belongs to one balance responsible party: | Field | Value | Example | | - | - | - | | `external_id` | An id that Engrate gives the series. It stays the same in every update of the imbalance. | | | `scheduling_area` | The EIC of the Netherlands | `10YNL----------L` | | `balance_group` | The EAN of the balance responsible party. TenneT settles each balance responsible party as one balance group. | | | `component_kind` | `total` for the imbalance, `adjustment` for the net adjustment that TenneT included in it | | | `component_value` | `ALL` | | | `market_dimensions` | Empty on the imbalance. On the net adjustment, the key `business_type` holds TenneT's code for the net adjustment. | `{"business_type": "A19"}` | TenneT always sends the imbalance. It sends the net adjustment only to some balance responsible parties, so the imbalance can be your only series. The adjustment of each kind of balancing energy can also appear, but is not documented yet. TenneT marks each update of a day as non-final or final. Engrate gives each update the finality of its mark: | Code | Market term | Finality | | - | - | - | | `A01` | Non finalized state | `preliminary` | | `A02` | Definitive state | `final` | When TenneT recalculates a final imbalance, it adds a note (`TEN-100408`) to the update. Engrate gives such an update the finality `correction`, whatever its mark. When TenneT postpones the final imbalance by a working day (`TEN-100407`), the later final stays `final`. TenneT can send a preliminary update after the final one. The final value stays current, because the highest finality comes first. The market's timestamp of an update, in `stated_at`, is when TenneT created that update. ## In the API See [List Imbalance Series](/api-reference/timeseries/list-imbalance-series) and [List Imbalances](/api-reference/timeseries/list-imbalances) in the API reference. # Market Communication Source: https://docs.engrate.io/market-communication/overview Meet your market obligations as a balance responsible party or supplier through one API. ## The problem Every balance responsible party (BRP) and supplier exchanges messages with the market around each delivery day. Before the day, you send your schedule. After the day, the market tells you how much energy it allocated to you. As a supplier, you also take over accounting points from other suppliers. The work is the same in every market. The way you do it is not: * **Roles**: the Scheduling Area Responsible that receives your schedule is one of four TSOs in Germany, TenneT in the Netherlands, and eSett in the Nordics. * **Formats and channels**: in Germany, ESS XML for schedules and EDIFACT for supplier switches and metering data. In the Netherlands, CIM XML through the TenneT MMC Hub. * **Identifiers**: EIC codes in Germany, EAN-13 codes in the Netherlands, and a different scheme again for accounting points. * **Rules and deadlines**: when gate closure is, how the market matches your schedule against your counterparty's, and when a value becomes final. A company active in two markets builds and runs two integrations, and keeps two mental models. ## Our approach Engrate gives you one model and one API for all markets. * **One model.** Schedules, revisions, series, allocations and their finality mean the same thing in every market. Each market fills the same roles with its own parties. See [Roles and areas](/market-communication/how-it-works/roles-and-areas). * **State, not messages.** You tell Engrate what you want the market to hold. Engrate sends what is necessary, reads every answer, and gives you the market's view as state: is each series matched, which values are confirmed, how final is each volume. * **The market's own words, kept.** Engrate keeps every market message and the market's own codes, so you can always trace a value back to what the market said. Only what is market-specific stays visible: identifiers, deadlines, and the market's own reason codes. ## What do you need to do? | I want to | Read | Endpoints | | - | - | - | | Send my schedule for a delivery day | [Scheduling](/market-communication/schedules/overview) | [Create Schedule](/api-reference/schedules/create-schedule) | | See what the market did with my schedule | [Matching](/market-communication/schedules/matching-and-confirmation) | [Get Series State](/api-reference/schedules/get-series-state) | | Find out why a series does not match | [Handle a mismatch](/market-communication/guides/handle-a-mismatch) | [Get Series State](/api-reference/schedules/get-series-state), [List Match Reports](/api-reference/schedules/list-match-reports) | | See every revision I sent | [Revisions](/market-communication/schedules/revisions) | [List Schedule Versions](/api-reference/schedules/list-schedule-versions) | | Read the original market message | [Scheduling](/market-communication/schedules/overview) | [List Incoming Messages](/api-reference/schedules/list-incoming-messages) | | Read the energy allocated to my accounting points | [Allocations per accounting point](/market-communication/allocations/accounting-points) | [List Allocation Series](/api-reference/timeseries/list-allocation-series), [List Allocations](/api-reference/timeseries/list-allocations) | | Read the sums the market computes, such as my balance group in one area | [Aggregate allocations](/market-communication/allocations/aggregate-allocations) | [List Aggregate Allocation Series](/api-reference/timeseries/list-aggregate-allocation-series), [List Aggregate Allocations](/api-reference/timeseries/list-aggregate-allocations) | | Read the imbalance of my balance groups | [Imbalance](/market-communication/imbalance/overview) | [List Imbalance Series](/api-reference/timeseries/list-imbalance-series), [List Imbalances](/api-reference/timeseries/list-imbalances) | | Take over supply of an accounting point | [Supplier switches](/market-communication/structuring/supplier-switches) | [Submit Structure Batch](/api-reference/structuring/submit-structure-batch), [List Supplier Switches](/api-reference/structuring/list-supplier-switches) | | See what the market states about an accounting point | [Accounting points](/market-communication/structuring/accounting-points) | [Get Accounting Point](/api-reference/accounting-points/get-accounting-point), [List Accounting Point Observations](/api-reference/accounting-points/list-accounting-point-observations) | | Check which markets and processes are available | [Coverage](/market-communication/how-it-works/coverage) | | # Matching Source: https://docs.engrate.io/market-communication/schedules/matching-and-confirmation Find out if the market matched your schedule and which values it confirmed. After you send a revision, the Scheduling Area Responsible does two things with each series: * **Matching**: it compares the series with the counterpart series. The counterpart series is the series that the other side sent for the same trade. * **Confirmation**: it gives the value that it will use for each quarter-hour. When the two sides agree, this is your value. When they do not agree, the rules of the market decide the value. Engrate collects all answers from the market and shows the result for each series of a schedule. ## What the market sends The market answers a revision with up to three kinds of message: * An **acknowledgement** tells if the revision passed the checks of the market. It can also refuse one series or accept a late series only from the next gate closure. * An **anomaly report** tells which series do not match. * A **confirmation report** gives the values that the market will use. Engrate records each answer as a match report. You can read all match reports and the original messages from the market. ## Matching Each series has a match status. The status tells if the market checked the series and if your series agrees with the counterpart series. When a series does not match, Engrate shows the causes that the market gave. If the market sends them, you can also compare your values with the values of your counterparty for each quarter-hour. A series that does not match is not lost. Until the deadline of the market, you or your counterparty can send new values. [Handle a mismatch](/market-communication/guides/handle-a-mismatch) shows how. ## Confirmation The confirmation gives the value that the market will use for each quarter-hour. The market can use your value or a different value. It can also set a value for a quarter-hour that you did not send. In some cases, the market rejects the whole series. ### Why a value changed When the market uses a different value, the confirmation tells why if the market gives this information. For example, the market can use the value of the side with precedence or set the value to zero. The confirmation also shows the reason codes and texts from the market. ### Finality Each confirmed value is intermediate or final. An intermediate value can still change. A final value always replaces an intermediate value, also when the intermediate value arrives later. In the Netherlands, TenneT does not mark values as final. Because of this, all Dutch values stay intermediate. ## In the console The console shows the same state on each schedule's page: the match status and confirmation of every series, and for a series that does not match, your values against the counterparty's. ![Console view of an inconsistent series with a chart and a table of unmatched quarter-hours](https://mintcdn.com/engrate/ePf7ZgjdNowxKNXp/images/console/schedule-anomaly.png?fit=max\&auto=format\&n=ePf7ZgjdNowxKNXp\&q=85\&s=ac18c8f8a9e1c0c850596ad22dd5d425) An inconsistent series: the anomaly reason, your values against the counterparty's, and the values the Scheduling Area Responsible confirmed # Scheduling Source: https://docs.engrate.io/market-communication/schedules/overview Send your planned energy per quarter-hour for a delivery day, and follow what the market does with it. A schedule is your plan for one delivery day in one scheduling area: per quarter-hour, how much energy you produce, consume, and trade with other parties. You send it to the Scheduling Area Responsible before delivery. It is called a Fahrplan in Germany, and an energy program in the Netherlands. After delivery, the market settles the difference between your schedule and what was actually allocated to you. A schedule that the market did not confirm as you sent it can be costly, so you need to know, per series, what the market holds. ## How it works ```mermaid theme={null} sequenceDiagram autonumber participant You participant Engrate participant SAR as Scheduling Area Responsible You->>Engrate: POST /schedules (the series you want) Engrate->>SAR: Revision N SAR-->>Engrate: Acknowledgement SAR-->>Engrate: Anomaly report, if a series does not match SAR-->>Engrate: Confirmation report You->>Engrate: GET /schedules/{uid}/series-state Engrate-->>You: Match status and confirmation of each series ``` 1. **You declare the series you want.** [Create Schedule](/api-reference/schedules/create-schedule) records them for one delivery day in one scheduling area. Post again to change them: the new series replace the old. 2. **Engrate sends a revision.** When what you want differs from what the market holds, Engrate sends a new [revision](/market-communication/schedules/revisions) in the market's own format. 3. **The market answers.** The Scheduling Area Responsible acknowledges the revision, matches each series against your counterparty's, and confirms the values it will use. 4. **You read the result per series.** [Get Series State](/api-reference/schedules/get-series-state) gives the match status and the confirmed values of each series. See [Matching](/market-communication/schedules/matching-and-confirmation). The Scheduling Area Responsible enforces its gate closure times. Engrate always sends your latest series, and the market decides whether they arrived in time. ## Series and counterparties A schedule holds series. Each series describes one flow of energy, for example a trade with another party or your own production. For a trade, the other side sends its own series, the counterpart series. The Scheduling Area Responsible matches your series against it. See [Matching](/market-communication/schedules/matching-and-confirmation). Each market has its own rules for which series you can send. ## Send a schedule [Send your first schedule](/market-communication/guides/send-your-first-schedule) walks through the whole cycle. ## In the console ![Console list of schedules with revision, matching, confirmation and finality per delivery day](https://mintcdn.com/engrate/-AD0kDwT-op20r0n/images/console/schedules-list.png?fit=max\&auto=format\&n=-AD0kDwT-op20r0n\&q=85\&s=4db7f66ba8d1b1f585a56dc54f4ff72e) Every schedule with its latest and active revision, and how the Scheduling Area Responsible matched and confirmed it ![Console view of one schedule's series with match status and confirmation per series](https://mintcdn.com/engrate/-AD0kDwT-op20r0n/images/console/schedule-series.png?fit=max\&auto=format\&n=-AD0kDwT-op20r0n\&q=85\&s=ef1ac297ae354d1f39f4667117bdc427) One schedule's series, as the Scheduling Area Responsible holds them for the day ## Endpoints | To | Use | | - | - | | Declare or change the series of a delivery day | [Create Schedule](/api-reference/schedules/create-schedule) | | Find your schedules | [List Schedules](/api-reference/schedules/list-schedules), [Get Schedule](/api-reference/schedules/get-schedule) | | See each revision and its status | [List Schedule Versions](/api-reference/schedules/list-schedule-versions) | | See the series of one revision | [Get Schedule Series](/api-reference/schedules/get-schedule-series) | | See the match status and confirmation of each series | [Get Series State](/api-reference/schedules/get-series-state) | | See what the market said, report by report | [List Schedule Match Reports](/api-reference/schedules/list-schedule-match-reports), [List Match Reports](/api-reference/schedules/list-match-reports) | | Read the original market messages | [List Incoming Messages](/api-reference/schedules/list-incoming-messages), [Get Incoming Message](/api-reference/schedules/get-incoming-message) | # Revisions Source: https://docs.engrate.io/market-communication/schedules/revisions Each submission of a schedule to the market is a revision. A revision is one submission of a schedule to the Scheduling Area Responsible. The first submission of a delivery day is revision 1. Each later submission gets the next number, with no gaps. > [!NOTE] > > The API calls a revision a version: [List Schedule Versions](/api-reference/schedules/list-schedule-versions), `version_number`, `version_uid`, and the `version` field of a match report. ## When Engrate sends a revision You do not create revisions yourself. When you post a schedule, Engrate records the series you want. It sends a new revision when those series differ from what the market holds, for example: * you changed a value or added a series * the market refused or rejected a series, and you sent new values Every revision of a schedule goes to the market under the same message identifier, with its revision number. The Scheduling Area Responsible quotes both in its answers, so Engrate can tell which revision each answer is about. ## Status The `status` of a revision is the latest answer from the market about the whole revision. One revision can hold a series that matches and a series that does not. To see the result for each series, read the series state. See [Matching](/market-communication/schedules/matching-and-confirmation). ## The active revision The active revision (`is_active: true`) is the last revision that the Scheduling Area Responsible accepted. It is the one the market holds as binding, and the one whose values the confirmations can still change. A rejected or unanswered revision never becomes active. If the market rejects revision 3, revision 2 stays active, and its values stay in force. # Accounting points Source: https://docs.engrate.io/market-communication/structuring/accounting-points Read what the market states about the accounting points you supply. An accounting point is the point in the grid where supply can change from one supplier to another. In Germany, it is a market location (Marktlokation). In the Netherlands, it is a connection with an EAN-18 code. Today the API covers the German market. ## Master data The grid operator sends data about each accounting point, for example its balance group, its metering grid area and its connection status. Engrate keeps this data as the master data of the accounting point. Each accounting point also shows the periods in which you supply it. ## History The market gives each value for a period of validity and can correct the value later. Engrate keeps all values. For each value, Engrate records when the market sent it and when Engrate received it. Because of this, you can read the master data for a given date. You can also read the master data as Engrate knew it at an earlier time. ## Aggregate allocations Each accounting point shows the aggregate allocations that include it. See [Aggregate allocations](/market-communication/allocations/aggregate-allocations). ## API Read your accounting points with the [Accounting points API](/api-reference/accounting-points/overview). # Supplier switches Source: https://docs.engrate.io/market-communication/structuring/supplier-switches Ask the grid operator to make you the supplier of an accounting point. > [!NOTE] > > This API is alpha. It can change without notice. Today it covers the German market. A supplier switch lets you take over supply of an accounting point as the new supplier. You tell Engrate which accounting point you want to supply and from which date. Engrate sends the request to the grid operator in the format of the market. Then Engrate keeps the decision of the grid operator as the state of the switch. ```mermaid theme={null} flowchart TD A[You submit a structure batch] --> B[pending] B -->|Engrate makes a request| C[requested] C -->|grid operator accepts| D[accepted] C -->|grid operator rejects| E[rejected] C -->|request fails| B D -->|effective date comes| F[effected] ``` ## Declare a switch You declare supplier switches in a structure batch: [Submit Structure Batch](/api-reference/structuring/submit-structure-batch). A batch holds 1 to 100 structuring actions. Each action creates one supplier switch. For each switch, you give: * The accounting point, by the identifier that the market gives it. * The effective date: the date from which you want to supply the accounting point. * The balance group that you supply the accounting point in. * The grid operator that the accounting point connects to. * The customer at the accounting point. Some markets need more data. See [Supplier switches in Germany](#supplier-switches-in-germany). Engrate applies all the actions of a batch or none of them. Engrate refuses the whole batch with a conflict when: * An action names an accounting point that already has an open switch. A switch is open while it is `pending`, `requested` or `accepted`. * Two actions of the batch name the same accounting point. The conflict tells you which actions caused it. Remove or change these actions, then submit the batch again. A conflict is not a decision of the market: Engrate sends nothing to the market for a refused batch. When Engrate applies a batch, it adds each accounting point to your organization if it is not there yet. The result gives the identifier of each new switch. ## Follow a switch Read the state of your switches with [List Supplier Switches](/api-reference/structuring/list-supplier-switches). You can filter by accounting point, state and effective date. | State | What it means | | - | - | | `pending` | Engrate has not made a request yet, or the last request failed. When something stops the request, `block` gives the reason. | | `requested` | Engrate made a switch request and waits for the decision of the grid operator. The `delivery_status` of the request shows where its message is on its way to the market. | | `accepted` | The grid operator accepted the switch. The effective date is in the future. | | `effected` | The grid operator accepted the switch, and the effective date has come. You supply the accounting point. | | `rejected` | The grid operator rejected the switch. `market_reason` gives the code and text of the market. | | `cancelled` | The switch was cancelled before Engrate made a request. | | `superseded` | The market ended the switch before it took effect. | Engrate reads the state as of today on the calendar of the market. No market message marks the effective date, so an accepted switch becomes `effected` on that date without a new message. ### Switch requests Each switch shows the switch requests that Engrate made for it, oldest first. A switch request is one submission of the switch to the market. It ends in one of three ways: * **Accepted**: the grid operator accepted the switch. * **Rejected**: the grid operator rejected the switch. The rejection gives the reason of the market in the words of the market. * **Failed**: the request ended without a decision. For example, the message did not get to the market or Engrate cannot confirm that it did, the market could not process the message, or the market sent no decision in 10 days. When a request fails and the market has not decided on the switch, the switch goes back to `pending` with a `block`. Engrate does not send a failed request again on its own. A decision on an earlier request still applies after a later request fails. Each request also shows its market message: where the message is on its way to the market, and the references that the market quotes in its answers. Use these references when you talk to the grid operator about a request. ## After the switch When the grid operator accepts the switch, you supply the accounting point from the effective date. The accounting point shows this supply period together with its master data. See [Accounting points](/market-communication/structuring/accounting-points). ## Supplier switches in Germany In Germany, the accounting point is a market location (Marktlokation). Its identifier is the 11-digit MaLo-ID. The grid operator is the Netzbetreiber that the market location connects to. ### What you declare | Field | In Germany | | - | - | | `accounting_point_market_identifier` | The MaLo-ID. | | `accounting_point_type` | `consumption` or `production`. Engrate sends a different request for each type. | | `balance_group` | The EIC code of your balance group (Bilanzkreis). | | `grid_operator` | The 13-digit code of the Netzbetreiber: a BDEW code number (starts with `99`) or a GLN. | | `customer` | The name and address of the customer. The grid operator uses them to find the market location. | | `enfg_eligibility` | For a `consumption` accounting point only. Whether the customer can get reduced levies under the Energy Financing Act (Energiefinanzierungsgesetz, EnFG). | For `enfg_eligibility`, give one of: * `customer_qualifies`, with the privilege reasons. Get the codes from [List EnFG Privilege Reasons](/api-reference/structuring/list-enfg-privilege-reasons). The customer must also tell the grid operator, as § 52 EnFG requires. * `customer_does_not_qualify`. * `location_does_not_qualify`, when the market location cannot get reduced levies. ### The switch request Engrate sends the switch request to the grid operator as an EDIFACT UTILMD message: the supply-start request (Anmeldung). The grid operator answers with a UTILMD message that accepts or rejects the request. When the grid operator cannot read or process the message, it answers with a CONTRL or APERAK message. Engrate shows this as a failed request. ### The effective date The effective date is the first day of supply. The request must reach the grid operator no later than the day before the last working day before the effective date. The grid operator decides if the request came in time. ### The market decision The grid operator decides on each request. When it rejects a request, `market_reason.code` is the answer code of the German market, and `market_reason.text` is the text that the grid operator sent with it. The text is usually in German. ### Example A structure batch with one supplier switch for a German market location that consumes energy: ```json theme={null} { "actions": [ { "kind": "create.supplier-switch", "supplier-switch": { "market": "DE", "accounting_point_type": "consumption", "accounting_point_market_identifier": "26611699793", "effective_date": "2026-12-01", "balance_group": "11XFC-CONS-----0", "grid_operator": "9903123000007", "customer": { "name": "Example GmbH", "street": "Hauptstraße", "house_number": "1", "postcode": "10115", "city": "Berlin", "country_code": "DE" }, "enfg_eligibility": { "kind": "customer_does_not_qualify" } } } ] } ``` # Test environment Source: https://docs.engrate.io/market-communication/test-environment Test your integration against a simulated market before you send schedules to the real market. The test environment lets you test your integration with the Engrate API before you go live. You use a test organization. Engrate connects the test organization to a simulated market. Nothing that the test organization sends reaches the real market. The simulated market sends the same kinds of message as the real market. It plays the Scheduling Area Responsible and your counterparties. Because of this, the API shows the same state, statuses and match reports as in production. [How it is different from the real market](#how-it-is-different-from-the-real-market) gives the differences. The test environment is available for the Netherlands. There, the simulated market takes the place of the TenneT MMC Hub. ## What the simulated market does | Process | What the simulated market does | | - | - | | [Scheduling](/market-communication/schedules/overview) | It answers each revision with an acknowledgement. It can refuse a revision, for example a revision that is not balanced. | | [Matching](/market-communication/schedules/matching-and-confirmation) | For domestic series, three simulated counterparties (a trader, a supplier and a producer) send their series. The simulated market matches your series against their series. Then it sends anomaly reports and confirmation reports. For foreign series, it sends only an acknowledgement and a confirmation report. | | [Allocations per accounting point](/market-communication/allocations/accounting-points) and [aggregate allocations](/market-communication/allocations/aggregate-allocations) | Each day, it sends allocations for a portfolio of test accounting points. It sends an allocation for each accounting point with telemetry, and aggregate allocations for each metering grid area. Allocations for a delivery day come on the next day at 14:00 Amsterdam time. | ## How it is different from the real market * **Answers come in a few minutes or less.** The real market answers over hours. The simulated market keeps the order of the answers, but it makes the time between them shorter. * **Your counterparties follow a scenario.** The scenario sets the values that your counterparties send and what goes wrong during the day. See [Scenarios](#scenarios). * **Allocations come from one run each day.** The simulated market does not send later corrections. * **The data is test data.** The counterparties and the accounting points do not exist in the real market. Use only the identifiers that we give you. ## Scenarios A scenario is one delivery day from the first revision to the last confirmation report. Each delivery day that you send starts the scenario again. Your test organization has one scenario for domestic series and one for foreign series. If you do not ask for a scenario, you get a normal day. | Scenario | What happens | | - | - | | Normal day | Your series match. Later, the trader changes an intraday trade. You get an anomaly report. You send a new revision with the same change. Then you get a new confirmation report. | | Error that you correct | Your first revision has an incorrect value in a trade with the trader. You get an anomaly report. Your next revision corrects the value, and the series match. | | Counterparty sends nothing | The supplier does not send its series. You get an anomaly report. For that trade, the confirmation report sets the values to zero. | | Several anomalies | Your first revision is not balanced and is refused. Your next revision has an incorrect value in a trade with the trader, and the producer is late with its series. You get an anomaly report for each problem. You correct the value, and the producer sends its series. In the evening, a counterparty reports a trade that you did not make. You get an anomaly report. | | Normal day, foreign | You send foreign series on the cross-border capacity contracts of the day. You get an acknowledgement and a confirmation report. | | Capacity exceeded, foreign | Your first revision nominates more than the capacity of a contract and is refused. Your next revision stays within the capacity. | With the scenario, we send you a test package. The test package gives the EAN-13 codes of your counterparties, the schedule that you send at each step, and what the API returns after each step. Your counterparties send fixed values, so your series match only when you send the values from the test package. To change the scenario, [contact us](mailto:hello@engrate.io). ## Get started **1. Ask for a test organization** [Contact us](mailto:hello@engrate.io). Tell us the scenario that you want and the size of the test portfolio for allocations. We make a test organization for you, separate from your production organization, and connect it to the simulated market. Then we send you the test package. For foreign series, it also gives the identifiers of the capacity contracts. **2. Get an API key** The test organization has its own sign-in to the Engrate Console. Your production sign-in cannot make API keys for the test organization. Sign in to the test organization and make an API key, as in [Authentication](/guides/authentication). Keep it apart from the API key of your production organization. The API key selects the organization, and the organization selects the market that receives your schedules. **3. Send a schedule** Send a schedule with `"market": "NL"` and `"tso": "TENNET_TSO"`, in the same way as in [Send your first schedule](/market-communication/guides/send-your-first-schedule). Use the `receiver_id` and the EAN-13 codes from the test package. For foreign series, set `market_agreement_id` to the capacity contracts from the test package. Use the same URL as in production, `https://api.engrate.io`. **4. Read the results** Read the revisions, the series state and the match reports with the same endpoints as in production. Compare the results with the test package. ## Go live To go live in the Netherlands, TenneT requires a qualification test in its own test environment. We can connect a test organization to that environment for you. When you pass the qualification test, we connect your production organization to TenneT. Then send your schedules with the API key of your production organization. Your test organization stays connected to the simulated market. You can continue to use it for tests. # Cost of Energy Source: https://docs.engrate.io/products/cost-of-energy One API for the full cost of energy — grid fees, taxes, transfer charges, and more. The Cost of Energy API gives you programmatic access to the full cost stack for electricity consumers in Sweden: grid fees, energy tax, transfer charges, peak power fees, subscription fees, and everything else a Distribution System Operator (DSO) charges. Instead of implementing hundreds of rate plans one by one, you work with a single set of building blocks that covers every operator and fee type. ### How it works Every cost component is described as a machine-readable **calculation pipeline** — a small, composable graph of operations like `multiply`, `add`, `constant`, `aggregate`, and `select`. The same fixed set of operations models everything from a flat monthly subscription fee to a peak-demand tariff with seasonal time-of-use bands. ```mermaid theme={null} %%{init: {'theme': 'base'}}%% graph TD ds_quarter-hourly-energy-offtake("quarter-hourly-energy-offtake
quarter_hourly · kWh") fn_0_multiply("multiply
× 0.36 SEK per kWh") fn_1_aggregate("aggregate
sum · monthly") fn_2_constant("constant
187.5 SEK · monthly") fn_3_add("add") result_cost("Total cost") ds_quarter-hourly-energy-offtake --> fn_0_multiply fn_0_multiply -->|energy-tax| fn_1_aggregate fn_1_aggregate -->|monthly-energy-tax| fn_3_add fn_2_constant -->|subscription-fee| fn_3_add fn_3_add -->|cost| result_cost click fn_0_multiply "/api-reference/cost-of-energy/functions/multiply" click fn_1_aggregate "/api-reference/cost-of-energy/functions/aggregate" click fn_2_constant "/api-reference/cost-of-energy/functions/constant" click fn_3_add "/api-reference/cost-of-energy/functions/add" class ds_quarter-hourly-energy-offtake eg-dataset class fn_0_multiply eg-fn class fn_1_aggregate eg-fn class fn_2_constant eg-fn class fn_3_add eg-fn class result_cost eg-output ``` You can evaluate pipelines yourself in any language — or call our Calculate endpoint and get a step-by-step cost breakdown in the response. ### Why developers choose this * **Implement once, expand across operators.** There are only a handful of operations to implement. Adding a new DSO means reading new pipeline definitions, not writing new code. * **Rules change, your code doesn't.** When a DSO updates their rates, the pipeline definition updates — your integration stays the same. * **Full transparency.** Every calculation returns the intermediate steps. No black boxes. You can audit, display, or optimise against every line item. * **Calculate or optimise.** The same pipeline serves both: with concrete inputs it computes costs deterministically; with decision-variable inputs it produces variables and constraints for an optimisation solver. ### Which question are you asking? A kWh has no grid price on its own: the cost depends on when it was used, the peaks around it and the tariff. So start from the question you want answered: | Your question | You bring | Use | | - | - | - | | What will this site pay, or what did it pay? | One consumption series | [Calculate](/api-reference/calculate-tariff), or the [Python SDK](/api-reference/cost-of-energy/engratepy) | | What if we add a battery or move the EV charging? | Two series: before and after | Calculate twice and compare | | When should this load run? | The flexible load and its limits | The [optimiser](/api-reference/cost-of-energy/optimisation) in the Python SDK | | Which tariff is cheapest for this customer? | One series and the candidate tariffs | Calculate once per tariff | | Which hours are expensive? | A tariff and a period | The [simplified tariff](/api-reference/cost-of-energy/get-simplified-tariff) | Only the last one needs no consumption data, and it is a rough guide: a component whose price follows the spot price has no fixed rate to show. ### Coverage Live in Sweden today — covering all DSOs with published tariffs. Designed for multi-market expansion across European markets. ### Get started **1. Contact us** [Contact us](mailto:hello@engrate.io) to get access for your company. Then make an API key in [console.engrate.io](https://console.engrate.io). See [Authentication](/guides/authentication). **2. Follow the quickstart** Find the tariff for an address and calculate a month's grid cost with the [Cost of Energy quickstart](/guides/cost-of-energy-quickstart). **3. Explore the API reference** Dive into [calculation pipelines](/api-reference/cost-of-energy/calculation-pipeline), [functions](/api-reference/cost-of-energy/functions/overview), and [conditions](/api-reference/cost-of-energy/conditions/overview). **4. Connect your AI tools** Use the [MCP integration](/guides/mcp) to explore tariffs and calculations from Claude, Cursor, or VS Code. > [card] [API reference](/api-reference/cost-of-energy/overview) > > Explore the Cost of Energy API — models, calculation pipelines, functions, and endpoints