Exchange Rate API Usage: How to Estimate Request Units Before You Launch

6 min read

Exchange Rate API Usage: How to Estimate Request Units Before You Launch

Your exchange rate API usage is decided by your architecture, not by your number of users. An app with a million visitors can run on a few tens of thousands of requests a month, while a small app that calls the API on every page view can burn through a free plan in an afternoon.

This guide shows how to estimate monthly request units before you launch: a short formula, worked scenarios, the difference between a monthly quota and a per-second rate limit, and a small script to watch your usage once you are live.

The one formula for exchange rate API usage

Monthly usage is the number of calls your backend makes, multiplied by the units each call costs. On GetRatesAPI, a single rate, a batch of up to 20 quotes, and a conversion each cost 1 request unit. Catalog calls (/v1/assets, /v1/assets/fiat, /v1/assets/crypto) are free.

So the question becomes: how many calls does my backend make? There are two very different designs.

  • Pull per user action. Every page view, cart update or conversion calls the API. Usage scales with traffic.
  • Refresh on a schedule. One background job fetches rates on a timer and every user reads from your own cache or database. Usage scales with time, and stays flat no matter how many users arrive.

The second design is almost always the right one for display prices. For the mechanics of keeping a cache honest, see how to cache exchange rates without showing stale prices.

Worked scenarios

Here is the arithmetic for a 30-day month. The numbers are examples to show the method, not predictions for your product.

ScenarioCalls per monthUnits
One scheduled job, one call every 60 seconds (batched, up to 20 quotes)1,440 per day x 3043,200
Same job, but 20 separate single-pair calls each minute43,200 x 20864,000
Crypto refresh every 10 seconds, one batched call8,640 per day x 30259,200
10,000 page views a day, one uncached call per view10,000 x 30300,000
Hourly refresh, one batched call24 x 30720

Three lessons fall out of the table.

Batching is a 20x lever. GET /v1/rates/{base}?quote=EUR,GBP,JPY returns up to 20 quotes for one unit. Fetching 20 pairs one by one costs 20 times more for identical data. Our post on getting multiple exchange rates in one API call covers this in detail.

Polling faster than the data changes is waste. Fiat currencies and metals refresh every 60 seconds upstream, so calling more than once a minute for EUR or XAU returns the same observation. Crypto refreshes every 10 seconds, so only crypto benefits from sub-minute polling, and only if your product really needs it. Every rate carries as_of, so you can see exactly how old an observation is.

Per-view calls are the expensive trap. Ten thousand views a day is a modest site, yet it costs more than a minute-by-minute refresher by a wide margin.

Choose a refresh interval from your tolerance, not your fear

Ask how stale a displayed price can be before it causes a real problem.

  • Catalog prices shown in local currency: a refresh every 5 to 15 minutes is usually invisible to shoppers. Many teams pick 60 seconds simply because it matches the data.
  • Checkout totals: fetch or confirm a rate when the quote is created, then hold it for a fixed window. See how to lock an exchange rate at checkout.
  • Back-office dashboards: hourly or on page load behind a short cache is typically enough.
  • Crypto tickers: 10 seconds is the data's refresh floor, so that is the fastest useful interval.

A useful rule: the refresh interval should be no shorter than the data's own refresh period, and no longer than the staleness you can defend to a customer.

A scheduled refresher that stays inside budget

This Node.js job fetches one batch per minute and keeps the latest rates in memory. In production you would write to Redis or your database so every instance shares them. Rates stay as strings; do not convert them to floats.

const API = "https://api.getratesapi.com";
const KEY = process.env.GETRATESAPI_KEY;

let latest = { rates: null, fetchedAt: null };

async function refresh() {
  const url = `${API}/v1/rates/USD?quote=EUR,GBP,JPY,CHF,CAD`;
  const res = await fetch(url, {
    headers: { Authorization: `ApiKey ${KEY}` },
  });
  if (!res.ok) {
    const err = await res.json();
    console.error("refresh failed:", err.code, err.request_id);
    return; // keep serving the previous rates
  }
  latest = { rates: await res.json(), fetchedAt: new Date() };
}

refresh();
setInterval(refresh, 60_000);

If a refresh fails, the job keeps the previous rates and tries again next tick. Match on the error code, never the message; the full list is in the error documentation. Because stale rates are flagged rather than withheld, also check status before you rely on a value for anything sensitive.

Quota versus rate limit: two separate budgets

People often mix these up, and each fails differently.

  • Monthly quota is the total request units in your plan for the period. Exceeding it returns quota_exceeded (429).
  • Rate limit is how many requests per second your plan allows. Exceeding it returns rate_limit_exceeded (429) with retry_after_seconds.

A scheduled refresher barely touches the per-second limit. The risk appears when many workers start at once, for example after a deploy, or when a cache expires and hundreds of requests all miss simultaneously. Add jitter to timers and collapse concurrent misses into a single in-flight request. Our guide to handling API rate limits and retries goes through backoff step by step.

Billing helps you here: malformed requests and rate-limited requests are not billed, so a retry loop that gets a 429 does not eat into your quota.

Add a safety margin

Once you have a number, add headroom for things the table ignores.

  • Deploys and restarts that trigger an immediate refresh.
  • Conversions on demand. If users type an amount and you call /v1/convert, each call is 1 unit. Convert locally from a cached rate instead where you can.
  • Staging and CI. Give each environment its own key so tests do not drain production quota. Keys are created, rotated and revoked in the dashboard.
  • Growth. Scheduled designs barely grow with traffic, but you may add currencies or more frequent refreshes later.

Then compare your total with the plans on the pricing page. The free plan has a small quota that suits prototypes and low-frequency jobs; larger plans raise both the monthly units and the per-second limit.

Monitor usage with /v1/account/usage

Estimates drift, so measure. GET /v1/account/usage returns the period, units used, quota and remaining units. Here is a Python check you could run from a daily cron job. Verify the exact response shape in the usage and quotas documentation; this sketch assumes the fields sit at the top level.

import os
import requests

resp = requests.get(
    "https://api.getratesapi.com/v1/account/usage",
    headers={"Authorization": f"ApiKey {os.environ['GETRATESAPI_KEY']}"},
    timeout=10,
)
resp.raise_for_status()
data = resp.json()

used = int(data["used"])
quota = int(data["quota"])
share = used / quota  # a usage ratio, not money, so float is fine

print(f"{used}/{quota} units used ({share:.0%})")
if share >= 0.8:
    print("WARNING: over 80% of the monthly quota is gone")

Send that warning to chat or email. Also compare used with how far through the period you are: if you have used 60% of the quota in the first 10 days, your estimate was wrong, and it is better to learn that on day 10 than day 28.

Next step

Write down your design, count the calls per month with the formula above, and add a margin. If the number is small, the free plan is enough to start; you can sign up without a credit card and try every endpoint in the dashboard playground. If it is large, look at batching and caching before you reach for a bigger plan.

All articles →
How to Cache Exchange Rates Without Showing Stale Prices

6 min read

How to Cache Exchange Rates Without Showing Stale Prices

Calling a rates API on every page view wastes quota and slows pages. Here is how to cache exchange rates with the right TTL for each use case, and how to fall back safely when the API is unavailable.

Exchange Rate API Usage: Estimate Your Request Units — GetRatesAPI