Skip to main content

sq-fx-ecb — findings & quirks

Living log. Update when you learn something new about ECB's feed or our handling.

ECB data model

  • Daily reference rates published weekdays around 16:00 CET ("close of trading day in the Eurosystem").
  • Format: 1 EUR = rate units of CCY. Every rate is EUR-cross.
  • Daily file: https://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml
  • 90-day rolling: …/eurofxref-hist-90d.xml
  • Full history (since 1999): …/eurofxref-hist.xml (~1 MB) — wired: asof older than ~80 days transparently loads this file instead of the 90-day one. Live-verified 2026-06-11: USD→EUR at 2021-03-15, 2005-07-01 and 1999-01-08 all return that day's fixing.

Cache policy

  • Daily file: 12h TTL. Survives a re-run within the trading day; refreshes once the next publishing window passes.
  • 90-day file: 24h TTL. Rolls daily anyway.
  • Cache dir: ~/.cache/sciqnt/fx-ecb/ (XDG-style; user-owned, outside the repo, survives git clean -fdx).
  • Writes are atomic (.tmp + replace) so an interrupted refresh leaves no corrupt XML.

Triangulation

Non-EUR pairs (e.g. USD → GBP) computed via EUR:

rate(USD, GBP) = rate(EUR, GBP) / rate(EUR, USD)

Introduces ~1e-10 rounding (well below money-display granularity). Round-trip (e.g. convert(amount, USD, EUR) then back) does not always equal amount exactly — quantize at display.

Currencies excluded from ECB basket

  • RUB — excluded since the 2022 sanctions. Any query for RUB returns None.
  • Historically other currencies have entered/left the basket; check the ECB site if a query unexpectedly returns None.

Open issues / TODO

  • Consider intraday — ECB ships a daily fixing only. For live FX-sensitive use, sq-fx-yfinance (when built) is the better source.
  • Conformance suite uses fixture XML (no network); add an opt-in integration test (SQ_FX_ECB_LIVE=1) that hits the real ECB endpoint to detect schema drift early.

Metadata

Release files for sciqnt-fx-ecb 0.1.0

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

Built distribution (wheel)

Table of built distributions (wheels) for sciqnt-fx-ecb 0.1.0
File Interpreter ABI Platform
sciqnt_fx_ecb-0.1.0-py3-none-any.whl Python 3 none any Details

Release files / sciqnt_fx_ecb-0.1.0-py3-none-any.whl

Download URL sciqnt_fx_ecb-0.1.0-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d8c78b1f799944d70dfe80603f9b0cf5f864b6c325a6dc7322d62284170ab446
BLAKE2b-256 checksum
How to use checksums
11dc236f5060457020234bb5d5110d1c0fc7f04b293d673a745dc41f7c03e037
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file

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