forex-python
Free foreign exchange rates and currency conversion.
What it is and what it does
Forex-python is a library that wraps public foreign exchange and cryptocurrency price APIs to provide currency conversion and rate lookup in Python. It queries theratesapi.com for current and historical forex rates (published by the European Central Bank) and CoinDesk for Bitcoin prices, then exposes them through a simple object-oriented interface. You instantiate a CurrencyRates or BtcConverter class and call methods like get_rate(), convert(), or get_latest_price() to retrieve or transform currency values.
The library supports converting between any currency pair, looking up historical rates back to 1999, fetching Bitcoin prices in any fiat currency, and converting fiat amounts to Bitcoin. It also provides currency symbol and name lookup. Because it depends only on requests and simplejson, it has minimal install friction, though it does require live internet connectivity to the upstream APIs and is subject to their availability and rate limits.
Use it for:
- Build a web application that displays real-time currency exchange rates or allows users to convert between currencies.
- Fetch historical exchange rates for financial analysis or reconciliation of past transactions.
- Convert prices in an e-commerce system from one currency to another based on live rates.
- Retrieve Bitcoin prices in multiple fiat currencies for a cryptocurrency tracking or portfolio app.
- Generate reports that include currency conversions using historical rates from a specific date.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Fetches current and historical foreign exchange rates and Bitcoin prices from public APIs, and converts between currencies or to Bitcoin.
Yes, with conditions. The package is straightforward to install and has no known vulnerabilities. However, it is aging (449 days since last release) and depends entirely on external APIs for data. Use it if you need simple, lightweight currency conversion without building your own API integration, but be aware that upstream API availability and rate limits are outside the maintainer's control. For production systems, verify the reliability of theratesapi.com and CoinDesk before committing.
Install
forex-python on PyPI
pip
pip install forex-pythonuv
uv add forex-pythonpoetry
poetry add forex-pythonInstalling forex-python
Before you install
Low friction install with only two lightweight runtime dependencies (requests and simplejson). Maintenance is aging—last release was 449 days ago—but the repository remains active with a recent commit on 2025-05-22 and no archived status.
License in practice
MIT license (permissive) allows commercial and private use with minimal restrictions, making it suitable for most projects.
Quickstart
pip install forex-python
from forex_python.converter import CurrencyRates
c = CurrencyRates()
rate = c.get_rate('USD', 'INR')
converted = c.convert('USD', 'INR', 10)
Requires internet access to theratesapi.com (for forex rates) and CoinDesk (for Bitcoin prices); rates are updated daily at 3PM CET and Bitcoin prices every minute.
Verify before relying
- Whether the package's data sources (theratesapi.com and CoinDesk) have SLAs or uptime guarantees relevant to production use.
- Current status of the RatesNotAvailableError mentioned in the description—whether upgrading to 1.6+ fully resolves it or if it can still occur.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (!=3.0.*,!=3.1.*,!=3.2.*,<4,>=2.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — requests, simplejson |
| Maintenance | aging — 449 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 554,527/month — #6,033 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: forex_python-1.9.2-py3-none-any.whl
Tags
More Internationalization packages
Measures the displayed width of Unicode strings…
permissive · top 1,000 on PyPI
babelBabel provides internationalization (i18n) and…
permissive · top 1,000 on PyPI
pycountryProvides programmatic access to ISO standard…
copyleft · top 1,000 on PyPI
num2wordsConverts numbers to their word representations…
copyleft · top 5,000 on PyPI
polibpolib reads, writes, and manipulates gettext…
permissive · top 5,000 on PyPI
pyunormalizeProvides Unicode normalization (NFC, NFD, NFKC,…
permissive · top 5,000 on PyPI
cpiAdjusts U.S. dollar amounts for inflation using…
permissive · top 15,000 on PyPI
CurrencyConverterConverts currency amounts using historical…
unclear · top 15,000 on PyPI
pycoingeckoPython wrapper around the CoinGecko API (v3)…
permissive · top 15,000 on PyPI
hdx-python-countryMaps country and region codes and names,…
permissive · top 15,000 on PyPI
pricesHandles monetary amounts with currency…
permissive · top 15,000 on PyPI
ccyProvides a dictionary of currency objects with…
permissive · top 15,000 on PyPI
openbb-currencyProvides currency exchange data as an extension…
agpl · top 15,000 on PyPI
aioopenexchangeratesAsync client library for fetching currency…
permissive · top 15,000 on PyPI
price-parserExtracts price amounts and currency symbols…
permissive · top 5,000 on PyPI
py-moneyRepresents monetary amounts with currency-aware…
permissive · top 15,000 on PyPI