Skip to content

Foreign exchange

Other FX APIs multiply a rounded mid-market number, cache by amount (so £1 and £100 disagree), and never tell you how many pennies the currency actually uses. This endpoint does the boring bit properly.

What this does

  1. Fetches the unit ECB euro reference rate for the pair (not a conversion that already includes your amount).
  2. Multiplies by your amount in full precision.
  3. Rounds half-up to that currency’s ISO 4217 cash decimals (JPY and KRW are 0, most are 2).
  4. Returns converted (cash) and converted_exact (full float) so a ledger can keep the residue if it must.

Rates come from the European Central Bank via Frankfurter, providers=ECB. They are usually published around 16:00 CET on TARGET working days. Weekends reuse the last working day. This is a reference rate, not a card-scheme or bank-sell quote.

Who it is for

  • Invoice PDFs that need a GBP/EUR line that matches ECB publications
  • “About £X in dollars” on a UK storefront
  • Spreadsheets (?format=text or ?format=csv on /v1/fx/rates)
  • Historical restatements with date=YYYY-MM-DD

Try it

https://fetch.li/v1/fx?from=GBP&to=EUR&amount=100
https://fetch.li/v1/fx?from=GBP&to=JPY&amount=50
https://fetch.li/v1/fx?from=USD&to=GBP&amount=250&date=2026-01-02
https://fetch.li/v1/fx?from=GBP&to=EUR&amount=100&format=text
https://fetch.li/v1/fx/currencies
https://fetch.li/v1/fx/rates?base=GBP&format=csv

Example JSON

{
  "ok": true,
  "answer": "£100.00 = €116.89",
  "from": "GBP",
  "to": "EUR",
  "amount": 100,
  "rate": 1.1689,
  "inverse": 0.85550432,
  "converted": 116.89,
  "converted_exact": 116.89,
  "minor_units": 2,
  "as_of": "2026-08-24",
  "provider": "ECB"
}

converted is what you print on an invoice. Do not re-round it. If you chain conversions, start from converted_exact or from amount * rate yourself.

Parameters

Parameter Required Description
from Yes ISO 4217, e.g. GBP
to Yes ISO 4217, e.g. EUR, JPY
amount No Default 1
date No YYYY-MM-DD only. ECB is daily, not tick data
format No text returns answer. Rates table accepts csv

Related

Try it

GET https://fetch.li/v1/fx


    
    
    
  

Answer

Response

response