Home Documentation Pricing API Status

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

Rate Limit Headers All responses include rate limit headers: 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

GET /api/public/rates

Free, public endpoint — no authentication required. Ideal for AI chatbots, quick integrations, and prototyping.

ParameterTypeDescription
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 }
}
CORS Enabled This endpoint supports cross-origin requests — you can call it directly from the browser.

Authenticated Rates

GET /api/v1/rates

Authenticated endpoint with higher rate limits. Requires a Bearer token.

ParameterTypeDescription
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

GET /api/rate

Lightweight endpoint for fetching a single pair rate.

ParameterTypeDescription
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

GET /api/historical-rates

Fetch historical exchange rate data for charting and analysis.

ParameterTypeDescription
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

StatusMeaning
400Bad request — missing or invalid parameters
401Unauthorized — missing or invalid API key
429Rate limit exceeded — check Retry-After header
500Internal server error
503Service temporarily unavailable

Supported Currencies

45+ currencies including:

Major Currencies USD, EUR, GBP, JPY, CHF, CAD, AUD, NZD
Popular Currencies INR, CNY, BRL, MXN, RUB, TRY, ZAR, SGD, HKD, KRW, THB, PHP, PKR, BDT, LKR, NGN, GHS, KES, AED, SAR, EGP, and more

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"

Ready to integrate?

Get your free API key and start making requests in seconds.

Get Free API Key