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, zoneinfo

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

Tests use recorded HTTP fixtures (VCR cassettes) — no live API calls required.

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.1.0b2.tar.gz (9.9 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.1.0b2-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file nexa_marketdata-0.1.0b2.tar.gz.

File metadata

  • Download URL: nexa_marketdata-0.1.0b2.tar.gz
  • Upload date:
  • Size: 9.9 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.1.0b2.tar.gz
Algorithm Hash digest
SHA256 819330bc237ee06b618467db681034265afabb0fea0758e8f1a9dd2f4bc3c95f
MD5 662be0d0594aae00a35223738c0f71b8
BLAKE2b-256 4dfd628156bfa107e660e8e652609694565db724b341eab34cc68b3c06063c47

See more details on using hashes here.

Provenance

The following attestation bundles were made for nexa_marketdata-0.1.0b2.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.1.0b2-py3-none-any.whl.

File metadata

File hashes

Hashes for nexa_marketdata-0.1.0b2-py3-none-any.whl
Algorithm Hash digest
SHA256 a09fc0095782533d1d4c3bcbb8ef9dc86066cd9078d501950bfc64963d661c5b
MD5 11da52a5eeeac79bfcb2a7f25f1c6acf
BLAKE2b-256 81d5c18759945441843309afd0ead22f8ccf3f4a6eada206c309f5ec3e451f2c

See more details on using hashes here.

Provenance

The following attestation bundles were made for nexa_marketdata-0.1.0b2-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