> For the complete documentation index, see [llms.txt](https://docs.voltmasters.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.voltmasters.io/voltmasters-platform/10.-project-settings/10.11-energy-contracts.md).

# Energy contracts

The energy contract tells the EMS how the market translates into the prices it actually plans against. The EMS never acts on a raw market price directly: your contract determines how each quarter-hour becomes a **net consumption price** (what you pay to import) and a **net injection price** (what you earn or pay to inject). Those two net prices drive every price-based decision, including [curtailment](/voltmasters-platform/10.-project-settings/10.3-curtailment.md) and [cost optimization](/control-algorithms/cost-optimization.md).

You configure the contract under **Configuration → Grid & market → Energy contract** (see [Project settings](/voltmasters-platform/10.-project-settings/10.5-project-settings.md#energy-contract)).

{% hint style="info" %}
When you save a new contract, the platform recalculates the upcoming energy prices for this project. Prices already in the past keep the values they were calculated with, so a chart can show market-following prices up to the switch and the new contract's prices afterwards.
{% endhint %}

### Contract types

| Type                            | How prices are determined                                                                                                                                                                                                                                                            |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Dynamic**                     | Follows the quarter-hourly / hourly day-ahead market (EPEX spot). Net prices are derived from the market price via scaling factors and fixed cost components. Best suited for the [Cost Optimisation](/voltmasters-platform/10.-project-settings/10.5-project-settings.md) strategy. |
| **Flexible**                    | A fixed price per MWh that your supplier revises periodically (for example monthly or quarterly). Between revisions it behaves like a fixed contract.                                                                                                                                |
| **Fixed**                       | A single price per MWh agreed in advance for the whole contract and independent of the market.                                                                                                                                                                                       |
| **Fixed (Spain — time-of-use)** | A Spanish access tariff (3.0 TD / 6.1 TD / 6.2 TD) with a different fixed price per **tariff period** (P1–P6). Only available for projects located in Spain.                                                                                                                         |

### Dynamic

The net prices are computed from the market price with your scaling factors and per-MWh costs. The exact formulas and a worked example are documented in [Energy price calculation](/voltmasters-platform/10.-project-settings/10.8-energy-price-calculation.md). If you leave a parameter blank, the EMS falls back to default values.

### Fixed and Flexible

You enter a single **consumption price** and **injection price** in €/MWh. Every quarter-hour uses the same value, so the price line is flat and independent of the market. A *Flexible* contract works identically; re-enter the price whenever your supplier revises it.

### Fixed (Spain — time-of-use)

In Spain, fixed tariffs are not a single price. Under CNMC Circular 3/2020 (Iberian Peninsula), every quarter-hour is classified into one of six **tariff periods**, from **P1** (most expensive) to **P6** (cheapest), and each period has its own price. This contract type lets you enter one fixed price per period; the platform automatically applies the correct period to each quarter-hour based on the date and time.

{% hint style="info" %}
This contract type only appears in the dropdown for projects whose country is set to Spain.
{% endhint %}

You enter **six prices** (€/MWh), one per period P1–P6. The period that applies to a given quarter-hour depends on three factors, evaluated in Spanish local time (Europe/Madrid):

**1. Day type**

* **Weekends and national holidays** → the whole day is **P6**.
* **Working days** → the period depends on the season and the hour (below).

**2. Time block (working days)**

| Block        | Hours                                    | Result                         |
| ------------ | ---------------------------------------- | ------------------------------ |
| **Peak**     | 09:00–14:00 and 18:00–22:00              | Peak period for the season     |
| **Shoulder** | 08:00–09:00, 14:00–18:00 and 22:00–24:00 | Shoulder period for the season |
| **Valley**   | 00:00–08:00                              | Always **P6**                  |

**3. Season (by month)**

| Season      | Months                            | Peak block → | Shoulder block → |
| ----------- | --------------------------------- | ------------ | ---------------- |
| High        | January, February, July, December | **P1**       | **P2**           |
| Medium-high | March, November                   | **P2**       | **P3**           |
| Medium      | June, August, September           | **P3**       | **P4**           |
| Low         | April, May, October               | **P4**       | **P5**           |

In practice this means a working day uses **three** prices — the night/valley (P6) plus the season's peak and shoulder period — while a weekend or national holiday uses a **single** price (P6).

The national holidays that count as all-day P6 are the fixed-date Spanish electrical holidays:

| Date        | Holiday               |
| ----------- | --------------------- |
| 1 January   | New Year's Day        |
| 6 January   | Epiphany              |
| 1 May       | Labour Day            |
| 15 August   | Assumption            |
| 12 October  | National Day          |
| 1 November  | All Saints' Day       |
| 6 December  | Constitution Day      |
| 8 December  | Immaculate Conception |
| 25 December | Christmas Day         |

{% hint style="warning" %}
Movable feasts without a fixed calendar date (Good Friday, Holy Thursday, etc.) and regional/local holidays are **not** treated as P6 — they follow the normal working-day rules, in line with the CNMC fixed-date definition.
{% endhint %}

**Injection.** Under these Spanish contracts, energy is not sold back to the grid, so the **injection price is always 0**.

{% hint style="info" %}
The underlying spot data for Spain is sourced from the ENTSO-E transparency platform (the Spanish bidding zone), which reflects the same day-ahead market outcome as OMIE. For a *fixed time-of-use* contract the spot price is not used for pricing — only the tariff period of each quarter-hour matters.
{% endhint %}

### Where these prices are used

* [**Curtailment**](/voltmasters-platform/10.-project-settings/10.3-curtailment.md): PV production is limited when the net injection price is negative.
* [**Cost optimization**](/control-algorithms/cost-optimization.md): the battery is charged and discharged based on the net consumption and injection prices across the forecast.
* [**Energy price calculation**](/voltmasters-platform/10.-project-settings/10.8-energy-price-calculation.md): the formulas that turn a dynamic contract's market price into net prices.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.voltmasters.io/voltmasters-platform/10.-project-settings/10.11-energy-contracts.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
