Skip to main content

ecb-exchange-rate

Official European Central Bank exchange rates — ~41 currencies vs EUR, history since 1999.

pip install ecb-exchange-rate
from ecb_exchange_rate import get_rate

pair = get_rate("USD", "EUR")
print(pair["rate"], "published", pair["rate_date"])

No API key needed for the latest published table.

What these rates are

The numbers European Central Bank itself publishes — fixed once published, carrying the institution's own date. Tax filings, customs valuations, invoicing rules and statutory accounts generally require this published rate, not a live market rate; the two routinely differ by a percent or more.

For live mid-market rates, use allratestoday. For all 100+ sources in one package, use allratestoday-central-bank.

API

Function API key? Returns
get_latest_rates() no Newest published table
get_rate(source, target) no One pair from it
get_rates_for_date(date, ...) paid plan The table in force on a date
get_history(symbol=..., from_date=..., to_date=...) paid plan Date-by-date official series

Keyed calls read api_key= or the ALLRATES_API_KEY environment variable. Dated tables and history need a paid plan (pricing); the latest table stays keyless.

Three things that will bite you

  1. rate_date is the answer, not the date you asked for. European Central Bank publishes on business days only, so a weekend request returns the last published table. Record the date that comes back — it is the audit trail.
  2. derived: True means the pair was cross-computed within European Central Bank's own table because it does not publish that pair directly. Rates are never crossed between institutions.
  3. Zero dependencies — standard library only, so it adds nothing to your lockfile.

MIT licensed. Rates are served as published by European Central Bank; AllRatesToday is not affiliated with it.

Metadata

Release files for ecb-exchange-rate 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ecb-exchange-rate 1.0.1
File Size Uploaded Provenance Actions
ecb_exchange_rate-1.0.1.tar.gz 5.5 kB Without provenance Details for ecb_exchange_rate-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ecb-exchange-rate 1.0.1
File Interpreter ABI Platform Actions
ecb_exchange_rate-1.0.1-py3-none-any.whl Python 3 none any Details for ecb_exchange_rate-1.0.1-py3-none-any.whl

Total release size: 11.5 kB

Release files / ecb_exchange_rate-1.0.1.tar.gz

Download URL ecb_exchange_rate-1.0.1.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
874790b9a5f067b95d18c66ae735129d2e56181255ce26a706b5a71fd8ff60c9
BLAKE2b-256 checksum
How to use checksums
426d72c2952bbbeb3ce8dec6269609f2d36dac0b4b8a0acf7a26ddf49126c191
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / ecb_exchange_rate-1.0.1-py3-none-any.whl

Download URL ecb_exchange_rate-1.0.1-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d7412f44f069e7ecaf65a2ebcea14b733f9ca4a857b14ddcc881fe0374960d7e
BLAKE2b-256 checksum
How to use checksums
efd2afc756ccfc075eb82a3998bdd0a3e6eb8eae132a1b1e20868f0599af794a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for ecb-exchange-rate 1.0.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page