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
- Set your region as either
EAST(Sjælland, Lolland-Falster, Møn and Bornholm) orWEST(Jylland and Fyn) - Set your metering point identifier and access token from: eloverblik.dk
- 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
.envfile in the directory you run the program from (if installed from source, copy.env.exampleas a starting point). - Pass
--config PATHto 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a0d57b14ce702c582004fcf8efd80e290b661791b31c886e06c18ebd9a241cc
|
|
| MD5 |
fca3a420fc9da2add5d9b7d9a7aa1cee
|
|
| BLAKE2b-256 |
c59a52c2687d3ada20124329c2d2b18a17092a9c291d9fb6eec516568e36fdb9
|
Provenance
The following attestation bundles were made for electricity_cost_dkk-0.1.1.tar.gz:
Publisher:
release.yml on victorfaurschou/electricity-cost-dkk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
electricity_cost_dkk-0.1.1.tar.gz -
Subject digest:
0a0d57b14ce702c582004fcf8efd80e290b661791b31c886e06c18ebd9a241cc - Sigstore transparency entry: 2220270674
- Sigstore integration time:
-
Permalink:
victorfaurschou/electricity-cost-dkk@8f778b683ab122e98a7de324bcdb5e2403416d3e -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/victorfaurschou
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8f778b683ab122e98a7de324bcdb5e2403416d3e -
Trigger Event:
push
-
Statement type:
File details
Details for the file electricity_cost_dkk-0.1.1-py3-none-any.whl.
File metadata
- Download URL: electricity_cost_dkk-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
282c72a82e4d7543415ece7e55d56741bde56fb3a97b44d83a73df7ac6943fac
|
|
| MD5 |
ec8b81255bd040163f012d1a99df1e49
|
|
| BLAKE2b-256 |
4108cd85eef43facc2a167ae76f370e36f2a51e1879b4970fdc4216e41a08440
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
electricity_cost_dkk-0.1.1-py3-none-any.whl -
Subject digest:
282c72a82e4d7543415ece7e55d56741bde56fb3a97b44d83a73df7ac6943fac - Sigstore transparency entry: 2220271221
- Sigstore integration time:
-
Permalink:
victorfaurschou/electricity-cost-dkk@8f778b683ab122e98a7de324bcdb5e2403416d3e -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/victorfaurschou
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8f778b683ab122e98a7de324bcdb5e2403416d3e -
Trigger Event:
push
-
Statement type: