Unofficial Python SDK for the Open Exchange Rates API.
Provides Pythonic services for exchange rates, currency conversion, OHLC and usage endpoints.
⚠️ This project is not affiliated with Open Exchange Rates.
From source (development dependencies included):
pip install -e '.[dev]'When published to PyPI:
pip install coinoxr-pythonfrom sdk import CoinoxrClient
client = CoinoxrClient(app_id="your_api_key")
# List currencies
currencies = client.currencies.get()
print(currencies)
# Latest exchange rates
latest = client.rates.latest(base="USD", symbols=["EUR", "GBP"])
print(latest)
# Convert 100 USD to EUR
converted = client.converter.convert(100, "USD", "EUR")
print(converted)- Endpoint:
/currencies.json - Method:
client.currencies.get()
/latest.json→client.rates.latest(...)/historical/{YYYY-MM-DD}.json→client.rates.historical(...)/time-series.json→client.rates.time_series(...)
- Endpoint:
/convert - Method:
client.converter.convert(100, "USD", "EUR")
- Endpoint:
/ohlc.json - Method:
client.ohlc.ohlc( start="2025-01-01T00:00:00Z", period="daily", base="USD", symbols=["EUR","GBP"] )
- Endpoint:
/usage.json - Method:
client.usage.get()
Run tests:
pytest -qLint and format:
ruff check .
black .