Skip to main content

boe-exchange-rate

Official Bank of England exchange rates — ~23 currencies vs GBP, history since 2016.

pip install boe-exchange-rate
from boe_exchange_rate import get_rate

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

No API key needed for the latest published table.

What these rates are

The numbers Bank of England 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, ...) yes The table in force on a date
get_history(symbol=..., from_date=..., to_date=...) yes Date-by-date official series

Keyed calls read api_key= or the ALLRATES_API_KEY environment variable. Get a free key at https://allratestoday.com/register (no card).

Three things that will bite you

  1. rate_date is the answer, not the date you asked for. Bank of England 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 Bank of England'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.

Links

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

Metadata

Release files for boe-exchange-rate 1.0.0

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

Source distribution (sdist)

Source distribution for boe-exchange-rate 1.0.0
File Size Uploaded
boe_exchange_rate-1.0.0.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for boe-exchange-rate 1.0.0
File Interpreter ABI Platform
boe_exchange_rate-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.1 kB

Release files / boe_exchange_rate-1.0.0.tar.gz

Download URL boe_exchange_rate-1.0.0.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3453877322d1b558cb11bf08ae2d09ac2528f97953da45deee222d56aaae4db8
BLAKE2b-256 checksum
How to use checksums
ca94225a0198cb9a38b03b2f5490bd21d2c38c6a7f8623c2ec875b7b87813f8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / boe_exchange_rate-1.0.0-py3-none-any.whl

Download URL boe_exchange_rate-1.0.0-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f313960d0db03f5403acc5a4793e97e70aad73b1e2920755db6ff5860a9e0fdf
BLAKE2b-256 checksum
How to use checksums
efa156530d022b10b5d1e1d58614ef8aedde7963395ab46abdad3f6ae73b7d4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

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