Free foreign exchange rates and currency conversion.
Low maintenance activity. Last release 18 months ago, commits in 0 of the last 26 weeks. Weaker on commit activity and recent releases.
Consider insteadCurrencyConverterPythie’s Index: 78620.3K downloads/moCompare →
pip install forex-pythonforex-python
Forex Python is a free library for foreign exchange rates and currency conversion, supporting Python 3.6 and above.
Note: Install the latest version (
forex-python>=1.6) to avoidRatesNotAvailableError.
Features
- List all currency rates
- Bitcoin price for all currencies
- Convert amounts to and from Bitcoin
- Get historical rates (since 1999)
- Currency conversion (e.g., USD to INR)
- Currency symbols and names
Currency Source
theratesapi.com provides current and historical foreign exchange rates published by the European Central Bank. Rates are updated daily at 3PM CET.
Bitcoin Price Source
Bitcoin prices are updated every minute. For more information, visit CoinDesk.
Installation
Install via pip:
pip install forex-python
Or clone the repository and install manually:
git clone https://github.com/MicroPyramid/forex-python.git
cd forex-python
python3 setup.py install
Usage Examples
Initialize the class:
from forex_python.converter import CurrencyRates
c = CurrencyRates()
List all latest currency rates for "USD":
c.get_rates('USD')
# Example output: {'INR': 83.12, 'EUR': 0.92, ...}