API Documentation
Everything you need to integrate real-time currency exchange rates into your application.
Overview
The AllRatesToday API provides real-time and historical currency exchange rates via a simple REST interface. All responses are JSON. The base URL is:
https://allratestoday.com We offer both a free public endpoint (no auth required) and authenticated endpoints with higher rate limits.
Authentication
The public endpoint (/api/public/rates) requires no authentication — just call it.
For authenticated endpoints, include your API key as a Bearer token:
Authorization: Bearer YOUR_API_KEY Get your API key from your profile page after signing in.
Rate Limits
X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset.
| Plan | Limit | Auth |
|---|---|---|
| Public (free) | 100 requests / hour per IP | None |
| Authenticated (free) | 100 requests / minute per key | Bearer token |
Public Rates
Free, public endpoint — no authentication required. Ideal for AI chatbots, quick integrations, and prototyping.
| Parameter | Type | Description |
|---|---|---|
| fromrequired | string | Source currency code (e.g. USD, EUR) |
| torequired | string | Target currency code (e.g. GBP, INR) |
| amountoptional | number | Amount to convert (default: 1) |
Example request:
curl "https://allratestoday.com/api/public/rates?from=USD&to=EUR&amount=100" Example response:
{
"success": true,
"from": { "currency": "USD", "amount": 100 },
"to": { "currency": "EUR", "amount": 92.15 },
"rate": 0.9215,
"inverse_rate": 1.0852,
"timestamp": "2026-04-03T12:00:00Z",
"source": "AllRatesToday.com",
"type": "mid-market rate",
"disclaimer": "This is the mid-market rate. Actual transfer rates may vary.",
"rateLimit": { "remaining": 99, "limit": 100 }
} Authenticated Rates
Authenticated endpoint with higher rate limits. Requires a Bearer token.
| Parameter | Type | Description |
|---|---|---|
| sourceoptional | string | Source currency code (e.g. USD) |
| targetoptional | string | Target currency code (e.g. EUR) |
| timeoptional | ISO 8601 | Rate at a specific point in time |
| fromoptional | YYYY-MM-DD | Start date for historical range |
| tooptional | YYYY-MM-DD | End date for historical range |
| groupoptional | string | Group by: day, hour, minute |
Example:
curl "https://allratestoday.com/api/v1/rates?source=USD&target=EUR" \
-H "Authorization: Bearer YOUR_API_KEY" Response:
[
{
"rate": 0.9215,
"source": "USD",
"target": "EUR",
"time": "2026-04-03T12:00:00Z"
}
] Simple Rate
Lightweight endpoint for fetching a single pair rate.
| Parameter | Type | Description |
|---|---|---|
| sourcerequired | string | Source currency code |
| targetrequired | string | Target currency code |
curl "https://allratestoday.com/api/rate?source=GBP&target=USD" { "rate": 1.2634, "source": "wise" } Historical Rates
Fetch historical exchange rate data for charting and analysis.
| Parameter | Type | Description |
|---|---|---|
| sourcerequired | string | Source currency code |
| targetrequired | string | Target currency code |
| periodoptional | string | 1d, 7d, 30d, or 1y (default: 7d) |
curl "https://allratestoday.com/api/historical-rates?source=USD&target=EUR&period=30d" {
"source": "USD",
"target": "EUR",
"data": [
{ "date": "2026-03-04", "rate": 0.9198, "timestamp": 1741046400000 },
{ "date": "2026-03-05", "rate": 0.9210, "timestamp": 1741132800000 }
],
"source_api": "wise",
"period": "30d"
} Error Codes
| Status | Meaning |
|---|---|
400 | Bad request — missing or invalid parameters |
401 | Unauthorized — missing or invalid API key |
429 | Rate limit exceeded — check Retry-After header |
500 | Internal server error |
503 | Service temporarily unavailable |
Supported Currencies
45+ currencies including:
Full list available via the OpenAPI specification.
Code Examples
JavaScript / Node.js
const response = await fetch(
'https://allratestoday.com/api/public/rates?from=USD&to=EUR'
);
const data = await response.json();
console.log(`1 USD = ${data.rate} EUR`); Python
import requests
response = requests.get(
'https://allratestoday.com/api/public/rates',
params={'from': 'USD', 'to': 'EUR'}
)
data = response.json()
print(f"1 USD = {data['rate']} EUR") PHP
$response = file_get_contents(
'https://allratestoday.com/api/public/rates?from=USD&to=EUR'
);
$data = json_decode($response, true);
echo "1 USD = " . $data['rate'] . " EUR"; cURL
# Public endpoint (no auth)
curl "https://allratestoday.com/api/public/rates?from=USD&to=EUR&amount=500"
# Authenticated endpoint
curl "https://allratestoday.com/api/v1/rates?source=USD&target=EUR" \
-H "Authorization: Bearer YOUR_API_KEY"