How do you get live currency exchange rates via API?
To get live currency exchange rates via API, call ReefAPI's currency latest endpoint with a base currency and optional symbols; the response returns dated FX rates as clean JSON with source attribution.
This guide demonstrates the real Currency & FX API engine with a captured response from . The example is only published because the engine passed the SEO snapshot gate.
FX conversion, finance dashboards, pricing localization and reporting pipelines.
Call the live endpoint
- 1
Choose the base currency
Set base to the currency you want rates quoted from, or pass symbols to reduce the payload to the currencies you need.
- 2
Call currency/v1/latest
Send the request with your ReefAPI key and parse data.rates from the response.
- 3
Respect source attribution
Read meta.attribution so your product can present the rate source and avoid overstating settlement use.
- 4
Cache by business need
Store the returned date and timestamp, then refresh on the cadence your pricing or reporting workflow requires.
Copy the request
These snippets use the captured request params for currency/v1/latest.
curl -X POST https://api.reefapi.com/currency/v1/latest \
-H "x-api-key: $REEF_KEY" \
-H "content-type: application/json" \
-d '{"base":"EUR"}'import requests
r = requests.post(
"https://api.reefapi.com/currency/v1/latest",
headers={"x-api-key": REEF_KEY},
json={
"base": "EUR"
},
)
print(r.json()["data"])const res = await fetch("https://api.reefapi.com/currency/v1/latest", {
method: "POST",
headers: {
"x-api-key": process.env.REEF_KEY,
"content-type": "application/json",
},
body: JSON.stringify({
"base": "EUR"
}),
});
const { ok, data, meta, error } = await res.json();Ask your MCP-connected assistant: call reefapi.currency.latest with {"base":"EUR"}.Captured output from ReefAPI
Captured on UTC. The response below is the committed snapshot, including the API envelope and metadata.
{
"method": "POST",
"url": "https://api.reefapi.com/currency/v1/latest",
"headers": {
"x-api-key": "$REEF_KEY",
"content-type": "application/json"
},
"body": {
"base": "EUR"
}
}{
"ok": true,
"meta": {
"api": "currency",
"endpoint": "latest",
"mode": "live",
"latency_ms": 7.8,
"record_count": 29,
"bytes": 0,
"cache_hit": false,
"completeness_pct": 100,
"attribution": "Data source: European Central Bank (ECB) euro foreign-exchange reference rates, freely available at https://www.ecb.europa.eu. Published for information purposes only; not intended for transaction/settlement use.",
"unavailable": null,
"attempts": 1
},
"data": {
"base": "EUR",
"date": "[redacted-phone]",
"timestamp": 1782223200,
"rates": {
"USD": 1.1392,
"JPY": 184.02,
"CZK": 24.206,
"DKK": 7.4749,
"GBP": 0.862,
"HUF": 354.58,
"PLN": 4.2825,
"RON": 5.2472,
"SEK": 11.0585,
"CHF": 0.9225,
"ISK": 144,
"NOK": 11.143,
"TRY": 52.9496,
"AUD": 1.6423,
"BRL": 5.8925,
"CAD": 1.6162,
"CNY": 7.7303,
"HKD": 8.9313,
"IDR": 20416.12,
"ILS": 3.4141,
"INR": 107.928,
"KRW": 1749.98,
"MXN": 19.9201,
"MYR": 4.7169,
"NZD": 2.0065,
"PHP": 69.551,
"SGD": 1.4763,
"THB": 37.821,
"ZAR": 18.7785
},
"amount": 1,
"source": "ECB"
}
}Why this is hard manually
Foreign-exchange data looks simple until you need source attribution, date handling, symbol filtering, conversion math, historical lookups and consistent failure behavior. Pulling from multiple public pages often creates mismatched dates and rounding rules.
Production systems also need to know whether a rate is informational, settlement-grade, cached or unavailable. Without a consistent envelope, those checks leak into every app that uses rates.
Why ReefAPI solves it
The Currency API snapshot in this guide uses the latest action and returns a live ECB-backed response with a base currency, timestamp, rates and attribution in the metadata. It is fast enough for app pricing, finance widgets and internal dashboards.
Because it shares the ReefAPI envelope, your retry, error and credit handling are the same as for ecommerce, jobs or real-estate endpoints.
Questions developers ask
What source powers the sample response?
The captured response metadata attributes the data to European Central Bank reference rates.
Can I convert an amount directly?
Yes. The same Currency engine also includes a convert action for amount conversion between two currencies.
Can I request historical rates?
Yes. The catalog includes historical and timeseries actions for date-based FX workflows.
Is this a financial advice feed?
No. Treat the rates as reference data for product, reporting and analysis workflows, not as trading or settlement advice.