CurrencyRateAPI
Quick Launch Tool
Need to test the API without digging through full documentation? Head to the Control Panel, where you’ll find the Quick Launch Tool — a simple way to try out all available endpoints with a single click.
Click the button below to register for free and start using the Quick Launch Tool.
Getting Started
Key terms and concepts you’ll need to begin working with Currency Rate API:
| Definition | Description |
|---|---|
| Symbol | Three-letter currency code (e.g., USD, EUR). We support ISO 4217 standard codes for fiat currencies and various codes for cryptocurrencies. |
| Base currency | The currency from which conversion starts. For example, if 1 USD = X EUR, then USD is the base currency. Default base currency is EUR. |
| Target currency | The currency into which the base currency is converted. Using the same example, EUR is the target currency. |
| Cryptocurrencies | In addition to traditional fiat currencies, our API processes and provides exchange rates for a wide range of popular cryptocurrencies. |
| Base URL | The root URL used for all API endpoints. All requests are sent to this base path. |
API Response
The exchange rates provided by CurrencyRateAPI are by default in Euro. All data is returned in standard JSON format and can be easily parsed using any programming language.
Sample response:
Below you will find a sample API response containing a range of common world currencies, all relative to the EUR currency and with a timestamp in which they were received.
{
"success": true,
"base": "eur",
"date": "2025-08-25",
"rates": {
"usd": "1.1697",
"gbp": "0.8659",
"cad": "1.6171"
},
"last_update_unix": "1769067006"
}
As shown above, the API response for real-time exchange rates includes several key fields:
- success indicates whether the request was successful.
- base returns the 3-letter code of the base currency used for this request.
- date returns the actual date for which the exchange rates are provided (format YYYY-MM-DD).
- rates holds the list of requested currencies and their current exchange rates.
- last_update_unix shows the timestamp (in Unix format) of the latest available data in the system.
Available Endpoints
CurrencyRateAPI includes several API endpoints, each offering specific functionality. Availability of certain endpoints depends on your subscription plan.
- End point of currencies list. This endpoint returns the full list of all supported currencies.
/api/codes(Alternative:/api/currencies) - End point of latest rates. This endpoint returns real-time exchange rate data for all supported currencies.
/api/latest - End point of historical rates. This endpoint returns historical exchange rate data for a specific date.
/api/YYYY-MM-DD(Alternative:/api/history?date=YYYY-MM-DD). Historical data is available from January 4, 1999.
Exchange Rate Methodology
To ensure data accuracy and consistency, CurrencyRateAPI follows a strict methodology for managing and delivering exchange rates:
- Mid-Market Rates: By default, the API returns
midrates. These represent the arithmetic mean between the market buy (bid) and sell (ask) prices, or official reference rates from central banks. - End-of-Day (EOD) Finalization: Historical rates provided by the API are finalized as of the end of the day in UTC (Coordinated Universal Time).
- Cross-Rate Calculation: For currency pairs that are not directly available from our sources, the system automatically calculates highly accurate cross-rates using major global currencies as a bridge (pivot).
- Smart Fallback Mechanism: If data for a requested date is unavailable (e.g., due to market closures on weekends or holidays), the system automatically searches for the most recent valid rate within a sliding 8-day window.
- High Precision: To prevent rounding errors in financial calculations, exchange rates are stored and processed with up to 18 decimal places.
Endpoints
Supported Symbols Endpoint
https://currencyrateapi.com/api/codes
This endpoint returns the full list of all supported currencies. You can also use the alias /api/currencies.
A human-readable list of all supported currencies is also available on our Supported Currencies page.
Basic Currencies: By default, some other endpoints (like /latest and /{YYYY-MM-DD}) return a limited set of major global currencies to minimize traffic. These "basic" currencies are:
USD, EUR, GBP, CHF, JPY, CAD, AUD, NZD, SEK, NOK, DKK, ISK, PLN, CZK, HUF, RON, HRK, RSD,
MKD, MDL, TRY, SGD, HKD, KRW, TWD, ILS, AED, SAR, QAR, KWD, BHD, OMR, ZAR
API Response:
{
"success": true,
"currencies": {
"EUR": {
"entity": "EUROPEAN UNION",
"currency": "Euro",
"alphabetic_code": "EUR",
"numeric_code": 978,
"minor_unit": 2,
"title": "Euro",
"symbol": "€",
"data_from": "1999-01-04"
},
"BTC": {
"entity": "CRYPTOCURRENCY",
"currency": "Bitcoin",
"alphabetic_code": "BTC",
"title": "Bitcoin",
"symbol": "₿",
"is_crypto": true,
"data_from": "2024-03-02"
},
[...]
}
}
Response Objects:
| Key | Description |
|---|---|
| success | Returns true for a successful request. If false, an error object will be included in the response. |
| currencies | Returns all supported currencies with detailed information about each. |
| entity | Country or region where the currency is used, or "CRYPTOCURRENCY" for digital assets. |
| currency | Full official name of the currency. |
| alphabetic_code | Standard 3-letter alphabetic code (ISO 4217 for fiat currencies). |
| numeric_code | ISO 4217 numeric code if applicable. |
| minor_unit | Number of decimal places used for the currency. |
| withdrawal_date | The date when the currency was withdrawn from circulation, if applicable. |
| title | Short display title for the currency. |
| symbol | Graphical symbol of the currency (e.g., $, €, ₿). |
| is_crypto | Flag (true) if the currency is a cryptocurrency. |
| data_from | The earliest date for which exchange rate data is available for this currency. |
Latest Rates Endpoint
https://currencyrateapi.com/api/latest?
base=USD&
quote=GBP,JPY,EUR
Request Parameters:
| Parameter | Description |
|---|---|
| base | [Optional] Enter a 3-letter ISO currency code to set the base currency for conversion. Default is EUR. |
| quote | [Optional] Enter a comma-separated list of currency codes to limit the response to specific currencies. (Alternative: codes) |
| extended_list | [Optional] If set to 1, the API returns the full list of available currencies. By default, only a minimal list is returned to reduce traffic. |
| precision | [Optional] Sets the number of decimal places in the output rates (0-18). Default returns full available precision without scientific notation. |
API Response:
{
"success": true,
"base": "usd",
"date": "2026-01-22",
"rates": {
"gbp": "0.74350935478637",
"jpy": "158.00358051914",
"eur": "0.8518613169776"
},
"last_update_unix": "1769067006"
}
Response Objects:
| Key | Description |
|---|---|
| success | Returns true for a successful request. If false, an error object will be included in the response. |
| base | Returns the 3-letter code of the base currency. |
| date | Returns the actual date for which the exchange rates are provided. |
| rates | Returns exchange rate data for the currencies specified in the request. |
| last_update_unix | Returns a Unix timestamp indicating when the returned data was last updated. |
Endpoint of Historical Rates
https://currencyrateapi.com/api/2025-08-25?
base=EUR&
quote=USD,GBP,CAD
Alternative format: /api/history?date=2025-08-25...
Request Parameters:
| Parameter | Description |
|---|---|
| date | [Required] The historical date for which exchange rates are requested. Format: YYYY-MM-DD. Can be provided in the URL path (e.g., /api/2025-08-25) or as a query parameter (e.g., /api/history?date=2025-08-25). |
| base | [Optional] Enter a 3-letter currency code to set the base currency for the conversion. Default is EUR. |
| quote | [Optional] Enter a comma-separated list of currency codes to limit the response to specific currencies. (Alternative: codes) |
| extended_list | [Optional] If set to 1, the API returns the full list of available currencies. By default, only a minimal list is returned to reduce traffic. |
| precision | [Optional] Sets the number of decimal places in the output rates (0-18). Default returns full available precision without scientific notation. |
API Response:
{
"success": true,
"base": "eur",
"date": "2025-08-25",
"rates": {
"usd": "1.1697",
"gbp": "0.8659",
"cad": "1.6171"
},
"last_update_unix": "1769067006"
}
Response Objects:
| Key | Description |
|---|---|
| success | Returns true for a successful request. If false, an error object will be included in the response. |
| base | Returns the 3-letter code of the base currency. |
| date | Returns the actual date for which the exchange rates are provided. |
| rates | Returns exchange rate data for the currencies on the date specified in the request. |
| last_update_unix | Returns a Unix timestamp indicating when the returned data was last updated. |
Sample Code
PHP (cURL)
// Set API Endpoint (can be 'latest' or a date 'YYYY-MM-DD')
$endpoint = 'latest';
// Initialize CURL:
$ch = curl_init('https://currencyrateapi.com/api/'.$endpoint.'?base=USD"e=GBP,JPY');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Store the data:
$json = curl_exec($ch);
curl_close($ch);
// Decode JSON response:
$exchangeRates = json_decode($json, true);
// Access the exchange rate values, e.g. GBP:
echo $exchangeRates['rates']['GBP'];
JavaScript (fetch)
// Set endpoint (can be 'latest' or a date 'YYYY-MM-DD')
const endpoint = 'latest';
const params = '?base=USD"e=GBP,JPY';
// Get exchange rates via the selected endpoint:
fetch('https://currencyrateapi.com/api/' + endpoint + params)
.then(response => {
return response.json();
})
.then(json => {
// Exchange rate data is stored in json.rates
console.log(json.rates.GBP);
// Timestamp can be accessed in json.last_update_unix
console.log(json.last_update_unix);
})
.catch(error => {
console.error('Fetch error:', error);
});