Dev.to WebDev 🛠 Dev 👁 0 📖 1 min read

What \"Coverage\" Should Mean When You Pick an Exchange Rate API

When exchange rate APIs compare themselves, they usually count currencies: 150, 160, 170. That number says very little. Almost every API can give you a USD/EUR rate. The real question is whose rate it is. Three

When exchange rate APIs compare themselves, they usually count currencies: 150, 160, 170. That number says very little. Almost every API can give you a USD/EUR rate. The real question is whose rate it is.

Three kinds of rate, three kinds of coverage

Rate Who sets it What you use it for
Mid-market The market (midpoint of buy and sell) Prices, converters, dashboards
Official A central bank or tax authority Tax, customs, audited accounts
Bank board Each commercial bank What a customer actually gets

So coverage has three numbers, not one. For AllRatesToday they are:

  • Mid-market: 160+ currencies, refreshed every 60 seconds
  • Official: 123 central banks and 6 tax authorities (HMRC, IRS, US Treasury, Swiss customs, SUNAT, India CBIC)
  • Commercial banks: 1,219 banks in 124 countries, buy and sell boards read every hour

We haven't found another exchange rate API that covers all three layers at this scale behind one key.

Checking it yourself

Every layer uses the same key and the same style of request:

KEY=your_api_key

# 1. Live mid-market
curl -H "Authorization: Bearer $KEY" \
  "https://allratestoday.com/api/v1/rates?source=USD&target=EUR,INR,LKR"

# 2. Official rate from one central bank
curl -H "Authorization: Bearer $KEY" \
  "https://allratestoday.com/api/v1/central-bank/rbi/latest?source=USD&target=INR"

# 3. Every covered bank in Sri Lanka
curl -H "Authorization: Bearer $KEY" \
  "https://allratestoday.com/api/v1/bank-rates/lk"

Questions to ask any provider

  1. Is the rate mid-market, official or a bank's own price? Does the response say so?
  2. If official, which institution set it and for which date?
  3. Can I see what banks in my users' country actually charge?
  4. Does every value carry a timestamp?

If an API can only answer the first question, it covers one layer. That may be enough for a price tag, but not for a remittance app, an ERP or a tax filing.

Links

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.