ratesapi

Finance API · Exchange rates · Currency conversion · Historical data

TL;DR

ratesapi (redirected from exchangeratesapi.io fork) provides exchange rates sourced from the European Central Bank. Get current rates against the Euro, convert between any currencies, access historical rates back to 1999, and track rate fluctuations over custom time periods. The API is reliable, well-documented, and powers countless fintech applications.

Quick start: https://api.ratesapi.io/api/latest

No API key needed — just make a request!

How to Use This API

1. Latest Exchange Rates (Base: EUR)

https://api.ratesapi.io/api/latest

Returns all exchange rates relative to EUR. Rates are sourced from the European Central Bank.

2. Change Base Currency to USD

https://api.ratesapi.io/api/latest?base=USD

Get all rates relative to USD instead of EUR.

3. Convert Between Specific Currencies

https://api.ratesapi.io/api/latest?base=GBP&symbols=USD,EUR,JPY

Get GBP-to-USD, GBP-to-EUR, and GBP-to-JPY rates in a single request.

4. Historical Rates for a Specific Date

https://api.ratesapi.io/api/2024-01-15?base=USD&symbols=EUR,GBP

Get exchange rates on a specific historical date. Format: YYYY-MM-DD. Data goes back to 1999.

5. Time-Series Data

https://api.ratesapi.io/api/2024-01-01..2024-01-31?base=EUR&symbols=USD

Get EUR/USD rates for every day in January 2024. Great for charts and trend analysis.

6. JavaScript — Currency Converter

async function convertCurrency(amount, from, to) {
  const resp = await fetch(
    `https://api.ratesapi.io/api/latest?base=${from}&symbols=${to}`
  );
  const data = await resp.json();
  const rate = data.rates[to];
  return { rate, result: amount * rate };
}

async function showConversion() {
  const { rate, result } = await convertCurrency(100, 'USD', 'EUR');
  console.log(`100 USD = ${result.toFixed(2)} EUR (rate: ${rate})`);
}

showConversion();
7. Python — Rate Comparison
import requests

def compare_rates():
    # Get USD and GBP vs EUR
    resp = requests.get(
        'https://api.ratesapi.io/api/latest',
        params={'symbols': 'USD,GBP,JPY'}
    )
    data = resp.json()
    
    base = data['base']
    print(f"Exchange rates (base: {base}):")
    for currency, rate in data['rates'].items():
        inverse = 1 / rate if rate else 0
        print(f"  {currency}: {rate:.4f} (1 {currency} = {inverse:.4f} EUR)")

compare_rates()
Try latest rates: https://api.ratesapi.io/api/latest?base=USD&symbols=EUR,GBP,JPY

Frequently Asked Questions

Where do the exchange rates come from?
The European Central Bank (ECB). Rates are updated daily around 16:00 CET on working days. They represent the ECB's reference rates.
What currencies are supported?
33 major currencies including USD, EUR, GBP, JPY, AUD, CAD, CHF, CNY, INR, BRL, and more. Includes some cryptocurrencies (BTC, ETH) on certain endpoints.
How far back does historical data go?
The ECB data starts from 1999 when the Euro was introduced. The time-series endpoint can fetch ranges of any length.
Are there rate limits?
Free access with 1,000 requests per month on the basic tier. For higher limits, there are paid plans available.
What is the difference between ratesapi and exchangeratesapi?
ratesapi is a maintained fork of the original exchangeratesapi.io. The API interface is largely the same, making it a drop-in replacement.

API Details

API URL
https://api.ratesapi.io/api
Documentation
ratesapi.io/documentation
Category
Finance
Authentication
Not Required (paid plans available for higher limits)
Geographic Coverage
Global — Major world currencies

What You Can Build