Official Python client for the Rate-API.com exchange-rate & crypto API
Project description
rate-api-python
Official Python client for Rate-API.com. Standard library only — no dependencies. Python 3.8+.
Install
pip install rate-api-python
Usage
from rate_api import RateApiClient, RateApiError
client = RateApiClient("YOUR_API_KEY")
rates = client.latest("USD", ["EUR", "GBP"])
print(rates["rates"]["EUR"])
client.convert("USD", "EUR", 100) # Pro+
client.historical("2026-01-15", "USD", ["EUR"]) # Pro+
client.timeseries("2026-01-01", "2026-01-31") # Business+
client.crypto(["BTC", "ETH"]) # Pro+
client.health() # public
try:
client.timeseries("2020-01-01", "2026-12-31")
except RateApiError as e:
print(e, e.status) # "Date range too large. Maximum is 366 days." 400
v2 features
The client exposes the v2 endpoints directly (they resolve to /api/v2 regardless of base URL):
# Latest with 24h change, metadata and precision
r = client.latest_v2("USD", ["EUR", "GBP"], include_change=True, include_metadata=True, precision=4)
print(r["changes_pct"]["EUR"])
# Historical comparison between two dates (Pro+)
cmp = client.historical_compare("2026-01-15", "2026-01-01", "USD", ["EUR"])
# Batch conversion — up to 100 pairs in one call (Pro+)
batch = client.batch_convert([
{"from": "USD", "to": "EUR", "amount": 100},
{"from": "GBP", "to": "JPY", "amount": 50},
])
# Your configured rate alerts (Business+)
alerts = client.alerts()
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rate_api_python-1.0.0.tar.gz
(4.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rate_api_python-1.0.0.tar.gz.
File metadata
- Download URL: rate_api_python-1.0.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02654f25d0bf67475502665b274563e7979ebe08e5d23bfcdcff598fb7db6319
|
|
| MD5 |
2f64dd923fbe20eedccd5db91959b697
|
|
| BLAKE2b-256 |
75b058c5747e86f998063cb825b5839e8ede057f3fa050b71eb0b69df9624e04
|
File details
Details for the file rate_api_python-1.0.0-py3-none-any.whl.
File metadata
- Download URL: rate_api_python-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
311272d1ff03f1809f3e1a56d401c82459b2817897d4a091542965e50b21ee3e
|
|
| MD5 |
15f0f4d10fd2c4bc9632f3424ab5ad13
|
|
| BLAKE2b-256 |
3c2b664d56b3486b29dd3b94e317b2b4f59b617f600df9340e2f50925fddd7ab
|