Skip to main content

fed-exchange-rate

Official US Federal Reserve exchange rates — ~22 currencies vs USD, history since 2016.

pip install fed-exchange-rate
from fed_exchange_rate import get_rate

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

No API key needed for the latest published table.

What these rates are

The numbers US Federal Reserve 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. US Federal Reserve 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 US Federal Reserve'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 US Federal Reserve; AllRatesToday is not affiliated with it.

Metadata

Release files for fed-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 fed-exchange-rate 1.0.1
File Size Uploaded Provenance Actions
fed_exchange_rate-1.0.1.tar.gz 5.4 kB Without provenance Details for fed_exchange_rate-1.0.1.tar.gz

Built distribution (wheel)

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

Total release size: 11.5 kB

Release files / fed_exchange_rate-1.0.1.tar.gz

Download URL fed_exchange_rate-1.0.1.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9b8f30f1e6ec2427771e5d7b10156f2a58f978c2a23af70a1d56308eabc5ac58
BLAKE2b-256 checksum
How to use checksums
f9510bf5b9957f0b2590c0e44f3a3cfa8af82bd5a1dc3d9dc416e88e100d16a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

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

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

Security for fed-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