Exchange Rate API Client
Unofficial client to interact with the Exchange Rate API V6.
- Simple API client: Easy-to-use interface to interact with the Exchange Rate API.
- Open Access Support: Fetch exchange rates without requiring an API key.
Installation
Install package from PyPi with:
pip install exchange-rate-api-client
Usage
API Client
You can initializate a api client with your API key to access all endpoints:
from exchange_rate_api_client import ExchangeRateApiV6Client
client = ExchangeRateApiV6Client(api_key="<YOUR_API_KEY>")
# Example: Convert 100 USD to EUR
conversion = client.pair_conversion(
base_code="USD",
target_code="EUR",
amount=100,
)
print(conversion)
Open Access
For basic access without an API key, fetch the latest exchange rates:
from exchange_rate_api_client import fetch_exchange_rates
# Example: Fetch exchange rates for USD
data = fetch_exchange_rates(base_code="USD")
print(data)
Additional Examples
Fetch enriched data:
data = client.fetch_enriched_data(
base_code="USD",
target_code="JPY",
)
print(data)
Fetch historical data:
from datetime import date
data = client.fetch_historical_data(
base_code="USD",
date_obj=date(2023, 1, 1),
amount=100,
)
print(data)
Requirements
- Python 3.7 or higher
- An API key from Exchange Rate API for full access.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contributing
Contributions are welcome! Feel free to submit issues or pull requests to improve the client.
Links
Release files for exchange-rate-api-client 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| exchange_rate_api_client-0.1.1.tar.gz | 12.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| exchange_rate_api_client-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:21.3 kB
Release files / exchange_rate_api_client-0.1.1.tar.gz
| Download URL | exchange_rate_api_client-0.1.1.tar.gz |
|---|---|
| Size | 12.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f607d1d6164dd898e279374f7e7747bc330150f8ad8e6b0599919256c71258e
|
|
BLAKE2b-256 checksum How to use checksums |
99e24df7f4c695f745c14bd2c69e14ba813bf3e7f05b45708e54180aa0b15b80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Release files / exchange_rate_api_client-0.1.1-py3-none-any.whl
| Download URL | exchange_rate_api_client-0.1.1-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
007c7638d7e11df1c2dd991729171f20750a3e67b5f09bcd25f8917ddba938fa
|
|
BLAKE2b-256 checksum How to use checksums |
ece2ebd762a35165c8305d9580dd34dd32567d691f40b6ceddadd27735b88e4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|