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.
Release files for electricity-cost-dkk 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| electricity_cost_dkk-0.1.1.tar.gz | 7.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| electricity_cost_dkk-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.2 kB
Release files / electricity_cost_dkk-0.1.1.tar.gz
| Download URL | electricity_cost_dkk-0.1.1.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0a0d57b14ce702c582004fcf8efd80e290b661791b31c886e06c18ebd9a241cc
|
|
BLAKE2b-256 checksum How to use checksums |
c59a52c2687d3ada20124329c2d2b18a17092a9c291d9fb6eec516568e36fdb9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Jul 22, 2026.
Transparency logRelease files / electricity_cost_dkk-0.1.1-py3-none-any.whl
| Download URL | electricity_cost_dkk-0.1.1-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
282c72a82e4d7543415ece7e55d56741bde56fb3a97b44d83a73df7ac6943fac
|
|
BLAKE2b-256 checksum How to use checksums |
4108cd85eef43facc2a167ae76f370e36f2a51e1879b4970fdc4216e41a08440
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Jul 22, 2026.
Transparency log