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, ...) |
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
rate_dateis 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.derived: Truemeans 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.- Zero dependencies — standard library only, so it adds nothing to your lockfile.
Links
- Coverage and docs: https://allratestoday.com/central-bank-rates-api/fed/
- Node.js equivalent:
fed-exchange-rateon npm
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.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fed_exchange_rate-1.0.0.tar.gz | 5.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fed_exchange_rate-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.0 kB
Release files / fed_exchange_rate-1.0.0.tar.gz
| Download URL | fed_exchange_rate-1.0.0.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4c3322b8d62e56043bf0f23999dc2504fbda8650a29d39cfb87a5fc3cfb7e7e8
|
|
BLAKE2b-256 checksum How to use checksums |
7b226a30620b639f1b0f527acb18594f608f29d1bbe5868d2d0a79e25f82f3c9
|
| 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.0-py3-none-any.whl
| Download URL | fed_exchange_rate-1.0.0-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
20341459202f1f96ca5a651ac92083408b6dde763c923e7fad496a5dfa198318
|
|
BLAKE2b-256 checksum How to use checksums |
a4fc9bbc10a18551c1e12352b6c7998d85b7bf99a5e24ab54c2e2a373424a71d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|