RatesDB

RatesDB

Free foreign exchange rates JSON API with currency conversion

The API uses the exchange rates published by European Central Bank.

API

Latest exchange rate - Single currency

Retrieves the latest date exchange rate in JSON for a single currency.

GET https://free.ratesdb.com/v1/rates?from=EUR&to=GBP
{
    "data": {
        "date": "2021-04-25",
        "from": "EUR",
        "rates": {
            "GBP": 0.8681
        }
    }
}

Latest exchange rates - All currencies

Retrieves the latest date exchange rates in JSON for all currencies.

GET https://free.ratesdb.com/v1/rates?from=EUR
{
    "data": {
        "date": "2021-04-25",
        "from": "EUR",
        "rates": {
            "AUD": 1.5523,
            "BGN": 1.9558,
            "BRL": 6.3801,
            "CAD": 1.4689,
            ...
        }
    }
}

Exchange rate - Date

Retrieves the exchange rate in JSON for a single-currency/multiple-currencies on a given date. Oldest available date is 1999-01-04. The previous day's exchange rates are returned if the exchange rates for the requested date aren't published by the bank.

GET https://free.ratesdb.com/v1/rates?from=EUR&to=GBP&date=2021-01-01
{
    "data": {
        "date": "2021-01-01",
        "from": "EUR",
        "rates": {
            "GBP": 0.8681
        }
    }
}

Supported parameters

The following parameters are supported by the API.

Parameter Mandatory Type Description
from Yes String The ISO currency code of the base currency
to No String The ISO currency code of the converted currency
date No String The ISO date format: YYYY-MM-DD

Error codes

An example error response.

{
    "errors": {
        "message": "The 'from' currency is unsupported.",
        "status": 422
    }
}

The following error responses are returned by the API.

Code Error Description
404 Not found The current request did not return any results
422 Unprocessable entity The request parameters are incorrect
429 Too many requests The maximum API limit has been reached

Currencies

The following currencies and their conversions are supported by the API.

Currency Code
Australian dollar AUD
Brazilian real BRL
Bulgarian lev BGN
Canadian dollar CAD
Chinese yuan renminbi CNY
Croatian kun HRK
Czech koruna CZK
Danish krone DKK
Euro EUR
Hong Kong dollar HKD
Hungarian forint HUF
Icelandic krona ISK
Indian rupee INR
Indonesian rupiah IDR
Israeli shekel ILS
Japanese yen JPY
Malaysian ringgit MYR
Mexican peso MXN
New Zealand dollar NZD
Norwegian krone NOK
Philippine peso PHP
Polish zloty PLN
Pound sterling GBP
Romanian leu RON
Russian rouble RUB
Singapore dollar SGD
South African rand ZAR
South Korean won KRW
Swedish krona SEK
Swiss franc CHF
Thai baht THB
Turkish lira TRY
US dollar USD

FAQs

Q: What is RatesDB?

A: RatesDB is a lightweight, fast & easy to integrate API for calculating foreign exchange rates.

Q: When are the exchange rates updated?

A: The updated exchange rates gets reflected in the API by 14:30 hours GMT.

Q: What data is tracked?

A: The app only tracks the IP Address and request parameters. IP Address is used for rate limiting & request parameters for data analytics.

Q: What is the API rate limit?

A: The API allows 100 requests per minute.

Q: The European Central Bank doesn't have historical rates for some currencies. What will be its response?

A: Unavailable exchange rate currencies will have a null rate value.

Q: What response formats are supported by the API?

A: The API only supports JSON.

Q: Is the code or technical information available to the public?

A: The code and technical overview is available in this GitHub repo.