In this Article
Currency conversion looks like a solved problem with an API in front of it. The complications appear the first time finance and product disagree about a number, and the cause is almost always that they are using different rates and both believe theirs is the rate.
This guide separates the four rate types, explains where each comes from, and gives a rule for choosing one you can defend later.
Key Facts
- There is no single exchange rate. Currencies trade over the counter, so every published rate is one source’s view at one moment.
- Four rate types get confused routinely, and using the wrong one is the most common cause of reconciliation gaps in a finance system.
- Central bank reference rates are published once a day and are stable and citable, which makes them the right choice for accounting and the wrong one for pricing.
- The rate your customer pays includes a spread, so a mid-market rate never matches a card statement, and presenting it as the price creates support tickets.
- Always store the rate, the source and the timestamp with every converted amount, or the conversion cannot be reproduced later.
Why is there no single exchange rate?
Because major currencies trade over the counter between institutions rather than on one central exchange. There is no closing bell and no official print, so every published figure is a particular source’s aggregation at a particular instant.
That has a direct consequence for software: two APIs queried a second apart can legitimately return different numbers, and neither is defective. The reconciliation problem this creates is not solved by finding a better source. It is solved by deciding which source is authoritative for which purpose and recording that decision with every stored amount.
Which rate types exist?
Four, with different purposes, and any currency exchange rate api returns one of them. We call it the 4-part rate model.
| Type | What it is | Use it for |
|---|---|---|
| 1. Mid-market | Midpoint between bid and ask across major venues | Display, analytics, internal comparison |
| 2. Central bank reference | A daily published reference, fixed at a set time | Accounting, tax, contracts, anything auditable |
| 3. Transaction rate | What a payment provider or card network actually applies, including spread | Reconciling against real settlements |
| 4. Guaranteed rate | A rate locked for a window by a provider, with a margin for that guarantee | Checkout pricing where the total must not move |
The classic failure is displaying a mid-market rate at checkout and settling at a transaction rate. The customer sees one number and is charged another, and the gap is entirely predictable and entirely avoidable.
How should a rate be chosen and stored?
| Purpose | Use this rate when | Avoid when |
|---|---|---|
| Financial reporting | Central bank reference, dated | You need intraday precision, which references do not provide |
| Product pricing shown to users | Guaranteed or transaction rate, with the spread disclosed | Using mid-market, which will not match the charge |
| Analytics and dashboards | Mid-market, consistently, one source | Mixing sources between charts, which creates fake variance |
| Historical comparison | The rate stored at the time | Re-converting history at today’s rate, which rewrites the past |
One storage rule covers most of the pain: with every converted amount, persist the original amount, the currency, the rate, the source and the timestamp. Systems that store only the converted figure cannot answer why a number changed, and that question always arrives eventually.
Where does collection fit, and what are the limits?
Use official sources for reference rates. Central banks publish them openly and in machine-readable form. Scraping a finance site for a number a central bank publishes as an API is pure downside: worse reliability, worse provenance, and a terms problem you did not need.
Market data carries licensing. Live institutional rates are a licensed product with redistribution terms, in the same way equity market data is. A free display feed is rarely licensed for resale or for customer-facing use.
Crypto pairs are a different problem. They trade on many venues at genuinely different prices, so a single rate is an editorial choice about which venues to include and how to weight them. Say which one you made.
Where a country-pinned request helps is narrow: some official portals and regional financial sites restrict or localise access by origin. DataImpulse residential covers that at $1 per GB across 195 countries. The rate itself should come from the official publisher.
Related: market data licensing, is web scraping legal.
Frequently Asked Questions
Why do two currency APIs return different rates?
Because major currencies trade over the counter with no central exchange, so every published rate is one source’s aggregation at one instant. Two APIs queried a second apart can differ legitimately, which is why the authoritative source must be chosen per purpose and recorded.
Which exchange rate should I use for accounting?
A central bank reference rate, stored with its date. It is published once daily at a fixed time, is stable and citable, and is what auditors expect. It is the wrong choice for checkout pricing, where it will not match what the customer is actually charged.
Why does my customer’s bank charge a different amount?
Because the mid-market rate has no spread and a real transaction does. Card networks and payment providers apply their own rate plus a margin, so showing mid-market at checkout guarantees a mismatch between the displayed and charged amounts.
Should I scrape exchange rates from finance sites?
No. Central banks publish reference rates openly in machine-readable form, and institutional market rates are licensed products with redistribution terms. Scraping gives worse provenance and reliability for data that is already available properly.
What should I store with a converted amount?
The original amount and currency, the rate applied, the source of that rate and the timestamp. Without all five, a historical figure cannot be reproduced or explained, and re-converting stored history at a current rate silently rewrites past reports.
Reach official publishers from the right region
Some official and regional financial portals localise or restrict access by origin. DataImpulse residential proxies give country-pinned exits at $1 per GB across 195 countries. Create an account and verify one source from its own region.
Related: stock market data APIs · public data portals · is web scraping legal.
Last updated: September 17, 2026.

State/City/Zip/ASN Targeting 



