Time series of mid-market rates for one pair over a preset period. 1d returns hourly points; 7d and 30d daily points; 1y weekly-sampled points. Requires an API key (Bearer header) or a logged-in session.
Query parameters
-
Source currency code (ISO 4217)
-
Target currency code (ISO 4217)
-
Time window
Values are
1d,7d,30d, or1y. Default value is7d. -
Response format (default json). csv is UTF-8 with a BOM; xlsx is a real Excel workbook with typed dates and numbers; xml mirrors the JSON fields.
Values are
json,csv,xml, orxlsx. Default value isjson.
Responses
-
Historical series (oldest first)
-
Invalid or missing parameters
-
Authentication required — provide an API key via
Authorization: Bearer art_live_...(free keys at https://allratestoday.com/register) -
Monthly request limit exceeded (X-Monthly-Limit / X-Monthly-Used / X-Monthly-Resets headers included)
-
Server or upstream error
curl \
--request GET 'https://allratestoday.com/api/historical-rates?source=USD&target=LKR' \
--header "Authorization: Bearer $ACCESS_TOKEN"
{
"source": "USD",
"target": "LKR",
"data": [
{
"date": "2026-08-10",
"rate": 302.4512,
"timestamp": 42
}
],
"source_api": "mid-market",
"period": "1d"
}
{
"error": "string",
"hint": "string"
}
{
"error": "string",
"hint": "string"
}
{
"error": "Request limit exceeded",
"used": 42,
"limit": 42,
"plan": "free",
"resets_at": "2026-05-04T09:42:00Z",
"upgrade_url": "https://allratestoday.com/pricing"
}
{
"error": "string",
"hint": "string"
}