Unified API client for European power market data sources
Project description
nexa-marketdata
Work in progress. This library is under active development. APIs may change without notice.
A unified Python client for European power market data sources: Nord Pool, EPEX SPOT, ENTSO-E Transparency Platform, and EEX.
๐ณ๐ด ๐ธ๐ช ๐ฉ๐ฐ ๐ซ๐ฎ ๐ช๐ช ๐ฑ๐ป ๐ฑ๐น ๐ฉ๐ช ๐ฑ๐บ ๐ซ๐ท ๐ง๐ช ๐ณ๐ฑ ๐ฆ๐น ๐จ๐ญ ๐ช๐ธ ๐ต๐น ๐จ๐ฟ ๐ธ๐ฐ ๐ญ๐บ ๐ท๐ด ๐ง๐ฌ ๐ธ๐ฎ ๐ญ๐ท ๐ต๐ฑ ๐ท๐ธ ๐ง๐ฆ ๐ฒ๐ช ๐ฒ๐ฐ ๐ฆ๐ฑ ๐ฝ๐ฐ ๐ฒ๐ฉ ๐ฎ๐น ๐ฌ๐ง ๐ฎ๐ช ๐จ๐พ ๐ฒ๐น ๐ฎ๐ธ ๐ฌ๐ช ๐ง๐พ ๐บ๐ฆ ๐น๐ท
Handles 15-minute MTU resolution, rate limiting, response caching, timezone normalisation, and format differences across exchanges. Part of the Phase Nexa ecosystem.
Features
- Unified interface โ one client, four exchanges
- MTU-aware โ supports both hourly and 15-minute resolution (EU transition: 30 Sept 2025)
- Rate limiting โ per-source limits respected automatically
- Caching โ repeated historical requests served from local cache
- Timezone normalisation โ all outputs in timezone-aware UTC or local exchange time
- Type-safe โ strict mypy compliance, Pydantic v2 models
- No floats for money โ all prices and volumes use
Decimal
Status
| Component | |
|---|---|
| Nord Pool โ day-ahead prices | โ |
| Core types & exceptions | โ |
Unified NexaClient |
๐ง |
| ENTSO-E client | โ |
| EPEX SPOT client | โฌ |
| EEX client | โฌ |
| Response caching | โฌ |
| Rate limiting | โฌ |
| Timezone normalisation | โฌ |
Installation
pip install nexa-marketdata
Or with Poetry:
poetry add nexa-marketdata
Quickstart
from nexa_marketdata import NexaClient
from nexa_marketdata.types import BiddingZone
import datetime
client = NexaClient()
# Day-ahead prices for NO2 (Southern Norway)
prices = client.day_ahead_prices(
zone=BiddingZone.NO2,
start=datetime.date(2025, 1, 1),
end=datetime.date(2025, 1, 7),
)
print(prices.head())
Configuration
Set API credentials as environment variables:
export NORDPOOL_USERNAME="your-username"
export NORDPOOL_PASSWORD="your-password"
export ENTSOE_API_KEY="your-key-here"
Or use a .env file (see .env.example).
Development
Prerequisites
- Python 3.11+
- Poetry
- Make
Setup
git clone https://github.com/phasenexa/nexa-marketdata.git
cd nexa-marketdata
poetry install
make ci
Common tasks
make test # run tests with coverage
make lint # ruff linting
make format # ruff formatting
make type-check # mypy
make ci # full check suite (lint + format + types + tests)
make execute-notebooks # re-execute example notebooks
Running tests
make test
Unit tests use mocked HTTP responses โ no live API calls or credentials required.
Integration tests that call live APIs are excluded from the default run. To run them:
export ENTSOE_API_KEY="your-key-here"
poetry run pytest -m live
Contributing
See CONTRIBUTING.md for the full contribution guide.
Licence
MIT โ see LICENSE.
Project details
Release history Release notifications | RSS feed
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 nexa_marketdata-0.2.0b1.tar.gz.
File metadata
- Download URL: nexa_marketdata-0.2.0b1.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2790fedc68a651ae234b4f2742d3913a9ea6a8e50b478fc8052688429839adf
|
|
| MD5 |
c5753ef478a0a375f1373722380bc6c7
|
|
| BLAKE2b-256 |
bc151fe49f533a5545933ee051f710fe48f06c9f29cadc27c041ee5aeba47935
|
Provenance
The following attestation bundles were made for nexa_marketdata-0.2.0b1.tar.gz:
Publisher:
publish.yaml on phasenexa/nexa-marketdata
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nexa_marketdata-0.2.0b1.tar.gz -
Subject digest:
d2790fedc68a651ae234b4f2742d3913a9ea6a8e50b478fc8052688429839adf - Sigstore transparency entry: 1193416493
- Sigstore integration time:
-
Permalink:
phasenexa/nexa-marketdata@c710949b1e7119544720398a3690c08feba13625 -
Branch / Tag:
refs/tags/v0.2.0b1 - Owner: https://github.com/phasenexa
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@c710949b1e7119544720398a3690c08feba13625 -
Trigger Event:
release
-
Statement type:
File details
Details for the file nexa_marketdata-0.2.0b1-py3-none-any.whl.
File metadata
- Download URL: nexa_marketdata-0.2.0b1-py3-none-any.whl
- Upload date:
- Size: 14.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61f2d95df3ea7d6abbf07a4e226d30bd861a0bc295aa8d779544f45f8c04f215
|
|
| MD5 |
7680be75a2f00291da0dadcbe2e41936
|
|
| BLAKE2b-256 |
baf01195bf46c295a0f8cbb068965f3182ac62b699221f61d93c6a489b583468
|
Provenance
The following attestation bundles were made for nexa_marketdata-0.2.0b1-py3-none-any.whl:
Publisher:
publish.yaml on phasenexa/nexa-marketdata
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nexa_marketdata-0.2.0b1-py3-none-any.whl -
Subject digest:
61f2d95df3ea7d6abbf07a4e226d30bd861a0bc295aa8d779544f45f8c04f215 - Sigstore transparency entry: 1193416530
- Sigstore integration time:
-
Permalink:
phasenexa/nexa-marketdata@c710949b1e7119544720398a3690c08feba13625 -
Branch / Tag:
refs/tags/v0.2.0b1 - Owner: https://github.com/phasenexa
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@c710949b1e7119544720398a3690c08feba13625 -
Trigger Event:
release
-
Statement type: