Fixer is an open-source, simple, and lightweight API for current and historical foreign exchange (forex) rates published by the European Central Bank.
The API updates rates daily around 4PM CET every working day. Historical rates go back to 1st January, 1999.
Get the latest foreign exchange reference rates.
https://api.fixer.io/latest
Get historical rates for any day since 1999.
https://api.fixer.io/2000-01-03
Rates are quoted against the Euro by default. Quote against a different currency by setting the base parameter in your request.
https://api.fixer.io/latest?base=USD
Request specific exchange rates by setting the symbols parameter.
https://api.fixer.io/latest?symbols=USD,GBP
The primary use case is client side.
let demo = () => {
let rate = fx(1).from("GBP").to("USD")
alert("£1 = $" + rate.toFixed(4))
}
fetch('https://api.fixer.io/latest')
.then((resp) => resp.json())
.then((data) => fx.rates = data.rates)
.then(demo)
Please cache results whenever possible.
The API comes with no warranty.