Skip to main content

nordic-balancing

PyPI CI Python

Typed Python clients for Nordic electricity balancing data: imbalance prices and reserve capacity from eSett, Energinet, Fingrid, Svenska kraftnät and ENTSO-E, all on 15-minute UTC intervals, with every source quirk handled explicitly instead of silently.

Why it exists: the data is not what it says

eSett has published Nordic imbalance prices every 15 minutes since May 2023. But until 19 March 2025 the four quarters of every hour carried the same price: across 192,108 zone-hours before that date, not one had differing quarters. Since then they differ in most hours; in DK, FI, SE3 and SE4 the average spread within an hour is over 100 EUR/MWh.

Share of hours where all four quarter-hour imbalance prices match, December 2024 to May 2025

A backtest of quarter-hour flexibility, or a model trained across that date, would treat repeated hourly prices as real quarter-hour ones. The switch is also not the mFRR energy market go-live on 4 March 2025 that most people would guess. Full analysis.

nordic-balancing records that kind of change as data. Every record keeps the resolution the source published at, and changes_between(start, end) returns the dated market changes (resolution switches, price-formula changes) inside any window.

Install

pip install nordic-balancing            # httpx is the only dependency
pip install "nordic-balancing[pandas]"  # adds to_frame()

Python 3.11 or newer.

Quick start

from datetime import UTC, datetime, timedelta

from nordic_balancing import ESettClient, to_frame

start = datetime(2026, 1, 15, tzinfo=UTC)
with ESettClient() as esett:
    prices = esett.imbalance_prices(start, start + timedelta(days=1))  # all 12 zones

for p in prices[:4]:
    print(p.start, p.zone, p.imbalance_price_eur, p.dominating_direction)

frame = to_frame(prices).set_index(["start", "zone"])  # needs the pandas extra

Which client to use

You want Use Key
Imbalance prices for all 12 Nordic zones ESettClient().imbalance_prices(start, end) none
The same prices from ENTSO-E, e.g. to cross-check EntsoeClient().imbalance_prices(start, end) ENTSOE_API_KEY
DK1/DK2 imbalance prices with their components EnergiDataServiceClient().imbalance_prices(start, end, zones) none
FI imbalance prices and mFRR components, or any Fingrid dataset FingridClient().imbalance_prices(start, end), .series(dataset_id, start, end) FINGRID_API_KEY
Reserve capacity (FCR, aFRR, mFRR) prices and volumes capacity_market(product, start, end) on: SvKClient (SE mFRR, aFRR), EnergiDataServiceClient (DK; aFRR for all zones; FCR for SE), FingridClient (FI), EntsoeClient (NO; FI mFRR) as above
Where two sources disagree reconcile_imbalance_prices(primary, reference), reconcile_reserve_capacity(primary, reference) none

Keys are free: ENTSO-E from the Transparency Platform, Fingrid from developer-data.fingrid.fi. Coverage and history start per source are in docs/FIELD_MATRIX.md and docs/SOURCE_NOTES.md.

Data contracts

Every client enforces the same rules and raises SourceError when a source breaks them. The full text is in docs/API_CONTRACT.md.

  • Exact windows. Timezone-aware [start, end) in, exactly the intervals starting in it out.
  • No gap filling. An interval the source did not return is absent; a value it has not published is None. The library never fills in a 0 of its own.
  • Duplicates raise, even with equal values, except for a few documented source patterns.
  • Pagination is checked against the total the source reports.
  • Numbers are validated: finite JSON numbers only.
  • Resolution is kept: hourly values are expanded to four quarters and labelled hourly.
  • Transport errors are typed: retries for 429/5xx/timeouts, then RateLimitError or SourceError, never a raw httpx exception.

reconcile_imbalance_prices and reconcile_reserve_capacity report differences between two sources by kind (rounding, price, volume, direction, resolution, missing, unpublished). The capacity function compares each product and direction separately. Neither function merges series or picks a winner.

A source can itself send a number in place of a value it has not filled in yet. The known cases are listed under "Value lifecycle" in the API contract, and placeholder_pattern(record) names the two that show in a single record.

What it has found in the real data

Each is reproducible with a script in examples/.

  • ENTSO-E is missing 7,361 zone-quarters of 2025 that eSett has, and 86 DK quarters read 0.0 where eSett has a price (entsoe_validation).
  • eSett marks unsettled DK intervals with 0.0 in every price column instead of null. This library returns None for them, as for any unpublished value.
  • eSett first publishes Finnish prices as 0.0 and replaces them with the settled price about an hour later, while Fingrid and ENTSO-E have the settled price from the start. Nothing in the row tells that 0.0 from a real one, so for recent FI prices use Fingrid or ENTSO-E.
  • Reading "unpublished" as zero is invisible downstream. In a battery replay on ArcticGrid, one unpublished quarter read as 0 EUR/MWh changed the dispatch but left the cash total identical.
  • Energi Data Service reads query times as Danish local time unless told otherwise, so a naive query shifts by one or two hours.
  • Fingrid's hourly and 15-minute series overlapped for four days in March 2025 with different values; the client keeps the hourly value, which is the one eSett settled.
  • ENTSO-E labels SE and NO prices hourly until 2025-03-18 although eSett has published them per quarter since 2023; the prices agree, the labels do not.
  • A dropped row in entsoe-py at its yearly query boundary (issue #529), reproduced offline (entsoe_py_comparison).

All observed source behaviour, with dates, is in docs/SOURCE_NOTES.md.

Status

Stable: 1.2.0 on PyPI, installed with pip install nordic-balancing. The public API is pinned by a snapshot test against docs/API_CONTRACT.md and follows Semantic Versioning. Every source is checked against its live API daily. Performance, including a comparison with entsoe-py and esett-py on identical recorded responses, is in benchmarks/.

Not covered yet: activated balancing energy volumes. Out of scope: day-ahead price clients and mFRR bid submission, which other projects already cover.

Development

uv sync
uv run pytest              # offline suite
uv run ruff check . && uv run ruff format --check . && uv run mypy
uv run pytest -m live      # calls the real APIs; needs the keys above

See CONTRIBUTING.md and SECURITY.md.

Licence

The code is MIT-licensed, see LICENSE.

The data is not covered by that licence; it stays under each provider's own terms. Energinet, Svenska kraftnät and Fingrid publish under CC BY 4.0, so if you republish their data you must credit the provider.

This is an independent project, not affiliated with or endorsed by Energinet, Fingrid, Svenska kraftnät, eSett, ENTSO-E or any other data provider.

Metadata

Release files for nordic-balancing 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nordic-balancing 1.2.0
File Size Uploaded Provenance Actions
nordic_balancing-1.2.0.tar.gz 59.4 kB With provenance Details for nordic_balancing-1.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nordic-balancing 1.2.0
File Interpreter ABI Platform Actions
nordic_balancing-1.2.0-py3-none-any.whl Python 3 none any Details for nordic_balancing-1.2.0-py3-none-any.whl

Total release size: 128.1 kB

Release files / nordic_balancing-1.2.0.tar.gz

Download URL nordic_balancing-1.2.0.tar.gz
Size 59.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f3279521e7ed73efdc2244e1511547ac82001fbe6eebcb1c7191063304d185be
BLAKE2b-256 checksum
How to use checksums
2f0f26948f29126b61130bf6fb77e219af203568e67ef2e7eba40456c9edba8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Release files / nordic_balancing-1.2.0-py3-none-any.whl

Download URL nordic_balancing-1.2.0-py3-none-any.whl
Size 68.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2b19e983b2990657af88c734ee2934c35039df940e370db95fe753e37a9e0a48
BLAKE2b-256 checksum
How to use checksums
1bb5ea4fe7ce87258201b289b830d9d157d01569405b23e239a98abf251c0666
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Security for nordic-balancing 1.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for nordic_balancing-1.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page