Market Rates

Historical market rates for a currency pair

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.

get/api/historical-rates

Request

  • Base URL: https://allratestoday.com
  • URL: https://allratestoday.com/api/historical-rates
  • Auth: one of:
    • HTTP bearer
    • API key in cookie art_session

Query parameters

sourcestring required
Example:USD

Source currency code (ISO 4217)

targetstring required
Example:LKR

Target currency code (ISO 4217)

period'1d' | '7d' | '30d' | '1y'

Time window

format'json' | 'csv' | 'xml' | 'xlsx'

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.

Response

Historical series (oldest first)

sourcestring required
targetstring required
source_apistring
period'1d' | '7d' | '30d' | '1y' required

Example response

{
  "source": "USD",
  "target": "LKR",
  "data": [
    {
      "date": "2026-08-10",
      "rate": 302.4512
    }
  ],
  "source_api": "mid-market"
}

Changes

No recorded changes to this operation across all 1 revision of this API.