Skip to main content

Unified API client for European power market data sources

Project description

nexa-marketdata

CI codecov

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

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


Download files

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

Source Distribution

nexa_marketdata-0.2.0b1.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

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

nexa_marketdata-0.2.0b1-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

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

Hashes for nexa_marketdata-0.2.0b1.tar.gz
Algorithm Hash digest
SHA256 d2790fedc68a651ae234b4f2742d3913a9ea6a8e50b478fc8052688429839adf
MD5 c5753ef478a0a375f1373722380bc6c7
BLAKE2b-256 bc151fe49f533a5545933ee051f710fe48f06c9f29cadc27c041ee5aeba47935

See more details on using hashes here.

Provenance

The following attestation bundles were made for nexa_marketdata-0.2.0b1.tar.gz:

Publisher: publish.yaml on phasenexa/nexa-marketdata

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

File details

Details for the file nexa_marketdata-0.2.0b1-py3-none-any.whl.

File metadata

File hashes

Hashes for nexa_marketdata-0.2.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 61f2d95df3ea7d6abbf07a4e226d30bd861a0bc295aa8d779544f45f8c04f215
MD5 7680be75a2f00291da0dadcbe2e41936
BLAKE2b-256 baf01195bf46c295a0f8cbb068965f3182ac62b699221f61d93c6a489b583468

See more details on using hashes here.

Provenance

The following attestation bundles were made for nexa_marketdata-0.2.0b1-py3-none-any.whl:

Publisher: publish.yaml on phasenexa/nexa-marketdata

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