Made on Earth Donate

Exchange rate history API

Daily, weekly or monthly open, high, low and close of any currency pair over a date range.

Past market rates of a currency pair, one row per day, week or month. Rates come from EODHD and each answer is cached for an hour. For today’s rate and converting an amount, see the currency conversion API.

Endpoint

GET  https://supertoolshq.com/api/v1/finance/exchange-rate/history/
POST https://supertoolshq.com/api/v1/finance/exchange-rate/history/   (form-encoded body)

Parameters

NameValuesDefaultMeaning
from, toCurrency codesrequiredAny two different supported currencies, in any case.
startDate, YYYY-MM-DD30 days before endFirst day, inclusive.
endDate, YYYY-MM-DDtoday (UTC)Last day, inclusive. A date past today means today.
periodd, w, mdDaily, weekly or monthly rows. Daily ones span at most 5 years per request; weekly and monthly have no limit.

Response

FieldTypeMeaning
from, toobjectcode (in capitals) and English name of each currency.
start, end, periodstringThe range and period as understood, defaults filled in.
rows[]arrayOldest first, each with date, open, high, low and close (8 significant digits). A weekly or monthly row is dated by its first day with a rate. A pair with no market quote of its own is crossed through the US dollar, and its high and low are null: the two legs’ highs needn’t come at the same moment. Forex trades on some weekend days, so those dates can appear too.

Example

curl 'https://supertoolshq.com/api/v1/finance/exchange-rate/history/?from=EUR&to=USD&start=2026-10-26&end=2026-10-30&period=d'
{
    "from": {
        "code": "EUR",
        "name": "Euro"
    },
    "to": {
        "code": "USD",
        "name": "US Dollar"
    },
    "start": "2026-10-26",
    "end": "2026-10-30",
    "period": "d",
    "rows": [
        {
            "date": "2026-10-26",
            "open": 1.12244,
            "high": 1.12308,
            "low": 1.11747,
            "close": 1.1178
        },
        {
            "date": "2026-10-27",
            "open": 1.11785,
            "high": 1.11793,
            "low": 1.11329,
            "close": 1.11362
        },
        {
            "date": "2026-10-28",
            "open": 1.11268,
            "high": 1.11694,
            "low": 1.11131,
            "close": 1.11556
        },
        {
            "date": "2026-10-29",
            "open": 1.11556,
            "high": 1.1174,
            "low": 1.11068,
            "close": 1.11621
        },
        {
            "date": "2026-10-30",
            "open": 1.11825,
            "high": 1.12146,
            "low": 1.11365,
            "close": 1.12015
        }
    ]
}

Errors

Bad input gets HTTP 400 with a message per field, and the inputs as understood:

{
    "errors": {
        "to": "Pick a currency other than from.",
        "period": "d (daily), w (weekly) or m (monthly).",
        "end": "A date like 2026-03-31."
    },
    "input": {
        "from": "EUR",
        "to": "EUR",
        "start": "",
        "end": "2026-02-30",
        "period": "y"
    }
}

When no history can be had for the pair (the data provider is down and nothing is cached), the reply is HTTP 503 with an error message and a Retry-After header in seconds.

From code

// JavaScript: last month of EUR/INR closes
const res = await fetch('https://supertoolshq.com/api/v1/finance/exchange-rate/history/?' + new URLSearchParams({ from: 'EUR', to: 'INR' }));
const { rows } = await res.json();
console.log(rows.map(r => [r.date, r.close]));
# Python: a year of monthly USD/JPY closes
import json, urllib.parse, urllib.request
query = urllib.parse.urlencode({'from': 'USD', 'to': 'JPY', 'start': '2025-11-01', 'period': 'm'})
history = json.load(urllib.request.urlopen('https://supertoolshq.com/api/v1/finance/exchange-rate/history/?' + query))
for row in history['rows']:
    print(row['date'], row['close'])

The conventions every API here follows (methods, errors, versions) are in the API overview.