QE FX REST API
Two JSON endpoints, no authentication required. Responses are cached for 60 seconds — the same freshness window as the website.
GET/api/rates
Returns the full rate table quoted against a base currency.
Query parameters
base— ISO 4217 code (optional, defaultUSD)
Example
curl https://your-domain.com/api/rates?base=EUR{
"base": "EUR",
"rates": { "USD": 1.0875, "GBP": 0.8532, "JPY": 170.42, ... },
"updatedAt": 1752361200000,
"nextUpdateAt": 1752447600000,
"provider": "Rates by Exchange Rate API (exchangerate-api.com)"
}GET/api/convert
Converts an amount between two currencies in one call.
Query parameters
from— source ISO code (required)to— target ISO code (required)amount— non-negative number (optional, default 1)
Example
curl "https://your-domain.com/api/convert?from=USD&to=EUR&amount=100"{
"from": "USD",
"to": "EUR",
"amount": 100,
"rate": 0.9195,
"result": 91.95,
"updatedAt": 1752361200000,
"provider": "Rates by Exchange Rate API (exchangerate-api.com)"
}Errors
Errors return a JSON body with a human-readable message:
HTTP 400 { "error": "Invalid \"from\" currency: XYZ" }
HTTP 502 { "error": "Exchange-rate provider is unavailable. Please retry shortly." }Rates are mid-market reference rates for informational use only. Attribution: rates by Exchange Rate API.