Skip to main content

electricity-cost-dkk

Combines spot prices, grid tariffs, and provider markup to calculate the total hourly electricity cost for a given day, including all applicable fees and taxes.

Usage

Install

pip install electricity-cost-dkk

Alternatively, install from source:

git clone https://github.com/victorfaurschou/electricity-cost-dkk.git
cd electricity-cost-dkk
poetry install

Configure

Set the following:

REGION=
ELOVERBLIK_METERING_POINT_ID=
ELOVERBLIK_TOKEN=
PROVIDER_MARKUP=
VAT_RATE=0.25
  1. Set your region as either EAST (Sjælland, Lolland-Falster, Møn and Bornholm) or WEST (Jylland and Fyn)
  2. Set your metering point identifier and access token from: eloverblik.dk
  3. Set your provider's markup (usually be found on your billing statement)

You can provide them in any of these ways:

  • Export them in your environment.
  • Place a .env file in the directory you run the program from (if installed from source, copy .env.example as a starting point).
  • Pass --config PATH to load them from a specific file instead.

Run

electricity-cost-dkk

Alternatively, if installed from source:

poetry run electricity-cost-dkk

By default, the tool fetches today's prices. To fetch prices for a different date, provide a YYYY-MM-DD date instead - any date from the last 62 days up to tomorrow's.

Output

By default, one line per hour with the total cost:

00:00  1.48 DKK/kWh
01:00  1.52 DKK/kWh
...
17:00  2.31 DKK/kWh
...
23:00  1.35 DKK/kWh

Pass --json to get a JSON object with one entry per hour, each showing the individual cost components (spot price, provider markup, distribution fee, transmission fee, and tax) plus the total.

Example:

{
  "date": "2026-01-24",
  "region": "EAST",
  "currency": "DKK",
  "unit": "kWh",
  "hours": [
    {
      "hour": 0,
      "components": {
        "spot": 1.01,
        "provider_markup": 0.19,
        "distribution": 0.13,
        "transmission": 0.14,
        "tax": 0.01
      },
      "total": 1.48
    },
    {
      "hour": 17,
      "components": {
        "spot": 1.45,
        "provider_markup": 0.19,
        "distribution": 0.52,
        "transmission": 0.14,
        "tax": 0.01
      },
      "total": 2.31
    }
  ]
}

Availability

Today's prices are always available, as Nord Pool publishes each day's prices one day in advance. Tomorrow's prices become available once Nord Pool publishes them, typically around 13:00. Requests made before then will return no data. Nord Pool doesn't publish further ahead than that.

This day-ahead price data also isn't retained indefinitely - only the past 62 days are available, and requesting an older date will fail.

Scope

This tool is primarily a data source rather than an end-user utility. The default output is human-friendly, but pass --json when piping into or consuming it from other tools.

While Nord Pool operates in other countries besides Denmark, this tool assumes Danish structures and won't work directly for other countries.

Limitations

Grid tariffs (distribution, transmission, tax) always reflect today's currently active rate, even when you request a past or future date - eloverblik has no historical tariff data. If your grid company's rates have changed since the requested date, those components won't match what was actually billed that day; only the spot price will be historically accurate.

Notes

Testing was done with OK a.m.b.a. as the provider and Radius Elnet as the grid company.

Price discrepancy

If totals deviate from what you see on your provider's mobile app, website, or billing statement, it may be because they use a different data source, calculation method or fee structure.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

electricity_cost_dkk-0.1.1.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

electricity_cost_dkk-0.1.1-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file electricity_cost_dkk-0.1.1.tar.gz.

File metadata

  • Download URL: electricity_cost_dkk-0.1.1.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for electricity_cost_dkk-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0a0d57b14ce702c582004fcf8efd80e290b661791b31c886e06c18ebd9a241cc
MD5 fca3a420fc9da2add5d9b7d9a7aa1cee
BLAKE2b-256 c59a52c2687d3ada20124329c2d2b18a17092a9c291d9fb6eec516568e36fdb9

See more details on using hashes here.

Provenance

The following attestation bundles were made for electricity_cost_dkk-0.1.1.tar.gz:

Publisher: release.yml on victorfaurschou/electricity-cost-dkk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file electricity_cost_dkk-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for electricity_cost_dkk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 282c72a82e4d7543415ece7e55d56741bde56fb3a97b44d83a73df7ac6943fac
MD5 ec8b81255bd040163f012d1a99df1e49
BLAKE2b-256 4108cd85eef43facc2a167ae76f370e36f2a51e1879b4970fdc4216e41a08440

See more details on using hashes here.

Provenance

The following attestation bundles were made for electricity_cost_dkk-0.1.1-py3-none-any.whl:

Publisher: release.yml on victorfaurschou/electricity-cost-dkk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page