Skip to main content

Exchange Rates API

Exchange Rates API, by APILayer, delivers reliable real-time and historical foreign exchange data for 170+ currencies and precious metals. It offers endpoints for live rates, historical rates, currency conversion, daily timeseries, and fluctuation analysis, sourced from many commercial sources and banks. It's used by financial, e-commerce, accounting, and analytics apps needing accurate JSON currency data.

Exchange Rates API icon

Power end-to-end data operations for your Exchange Rates API API with Nexla. Our bi-directional Exchange Rates API connector is purpose-built for Exchange Rates API, making it simple to ingest data, sync it across systems, and deliver it anywhere — all with no coding required. Nexla turns API-sourced data into ready-to-use, reusable data products and makes it easy to send data to Exchange Rates API or any other destination. With comprehensive monitoring, lineage tracking, and access controls, Nexla keeps your Exchange Rates API workflows fast, secure, and fully governed.

Features

Type: API

SourceDestination

  • Seamless API Integration: Connect to any endpoint as source or destination without coding, with automatic data product creation
  • Visual Composition & Chaining: Build complex integrations using visual templates, chain API calls, and compose workflows with data validation and filtering
  • API Proxy: Expose curated slices of your data securely with a secure and customizable API proxy that validates and transforms data on the fly
  • Request optimization with intelligent batching, retry, and caching to minimize API calls and costs

Prerequisites

To connect Nexla to the Exchange Rates Data API, you need an active APILayer account and an API key for the Exchange Rates Data API product. The API key is passed as a custom HTTP request header (apikey) on every request Nexla makes to the service.

Create an APILayer Account and Subscribe to Exchange Rates Data API

  1. Navigate to the Exchange Rates Data API product page on the APILayer marketplace.

  2. Click Subscribe for Free (or select a paid plan if your use case requires higher update frequency or a larger monthly request quota) and complete the account registration form. If you already have an APILayer account, click Log In at the top of the page and then subscribe from the product page.

  3. Once logged in, you are automatically subscribed to the selected plan for the Exchange Rates Data API. Navigate to your APILayer Account Dashboard to locate your API key.

  4. Under My Account, find the API Key section. Your personal API key — a unique alphanumeric string — is displayed there. Copy this value; you will enter it in Nexla during credential creation.

Your API key grants access to all APILayer APIs you are subscribed to. Keep it secure and do not share it in publicly accessible locations such as client-side code or public repositories. If a key is ever compromised, you can regenerate it from the APILayer Account Dashboard at any time.

Subscription Plans and Data Freshness

The Exchange Rates Data API offers several subscription tiers that affect how frequently exchange rate data is refreshed and how many requests you can make per month:

  • Free Plan: Up to 100 monthly requests; rates updated daily. Suitable for testing and low-volume development.

  • Basic and higher plans: Higher request volumes with rates updated every 60 minutes, every 10 minutes, or as frequently as every 60 seconds on the Business plan.

Select the plan that matches your data freshness requirements before creating your Nexla credential. You can upgrade or downgrade your plan at any time from the APILayer dashboard.

Authenticate

Credentials required

Authenticate using your Exchange Rates API key from apilayer. The key is passed as the 'apikey' header in requests.

FieldRequiredSecretDescription
API Key ValueYesYesAn encoded string value used as a secret token to authenticate API requests
Base URLYesNoAPI endpoint base URL for Exchange Rates Data service. Allowed values: Production

Create a credential in Nexla

  1. After selecting the data source type, click the Add Credential tile to open the Add New Credential overlay.

  2. Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.

  3. The Exchange Rates Data API authenticates all requests using an API key sent as the apikey HTTP request header. Nexla handles this header automatically once you supply your key. Enter your Exchange Rates Data API key in the API Key Value field. This is the alphanumeric key you copied from the APILayer Account Dashboard in Prerequisites. The value is stored securely and used by Nexla to authenticate every request made on your behalf.

  4. The Base URL field is pre-populated with the production endpoint https://api.apilayer.com/exchangerates_data/. This is the correct base URL for the Exchange Rates Data API and does not need to be changed for standard use.

    The Base URL must end with a trailing slash. All API endpoint paths (for example, latest, convert, timeseries) are appended to this base URL by Nexla when making requests.

  5. Click the Save button at the bottom of the overlay. The newly added credential will now appear in a tile on the Authenticate screen during data source creation and can be selected for use with a new data source.

Use as a data source

To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Select the Exchange Rates API connector tile, then select the credential that will be used to connect to the Exchange Rates API service, and click Next; or, create a new Exchange Rates API credential for use in this flow.

Endpoint templates

Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common Exchange Rates API endpoints. Each template is designed specifically for the corresponding Exchange Rates API endpoint, making data source setup easy and efficient. Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below.

Returns real-time exchange rate data updated every 60 minutes, every 10 minutes, or every 60 seconds.

This endpoint retrieves the latest (real-time) exchange rates for one or more target currencies relative to a chosen base currency. Use this endpoint when you need current exchange rate data for currency conversion, financial dashboards, or pricing applications. Data freshness depends on your APILayer subscription plan — rates are refreshed as frequently as every 60 seconds on the Business plan.

  • In the Base field, enter the three-letter ISO 4217 currency code for the base currency you want rates expressed against. For example, enter USD to get rates relative to the US Dollar, or EUR for the Euro. The default value is EUR. All returned rates represent how many units of each target currency equal one unit of this base currency.

  • In the Symbols field, enter a comma-separated list of target currency codes for which you want exchange rates returned. For example, USD,GBP returns rates for the US Dollar and British Pound. The default value is USD,GBP. To retrieve rates for all supported currencies, leave this field empty.

The Exchange Rates Data API supports 170+ currencies including standard ISO 4217 codes and precious metals (XAU for Gold, XAG for Silver). Use the Get Supported Currency Symbols endpoint to retrieve the full list of supported currency codes.

Get Historical Exchange Rates

This endpoint returns exchange rate data for all available or a specific set of currencies for a single historical date. Use this endpoint when you need to look up what exchange rates were on a specific past date — for example, to reconcile financial transactions, generate historical reports, or backfill currency data. Historical data is available back to 1999-01-01.

  • In the Date field, enter the historical date for which you want to retrieve exchange rates, in YYYY-MM-DD format (for example, 2024-01-15). This field is required for the endpoint to function correctly.

  • In the Base Currency field, optionally enter the three-letter ISO 4217 currency code for the base currency (for example, USD or EUR). If left blank, the API will use EUR as the default base currency.

  • In the Target Currencies field, optionally enter a comma-separated list of currency codes to limit the response to specific currencies (for example, GBP,JPY,CHF). If left blank, the API returns rates for all supported currencies.

Historical rate data is sourced from multiple commercial sources and banks. For the most complete historical coverage, use a date in YYYY-MM-DD format. Dates prior to 1999-01-01 are not supported.

Convert Currency

This endpoint converts a specified amount from one currency to another using real-time or historical exchange rates. Use this endpoint when you need to calculate converted values for financial transactions, billing systems, or any application that requires on-the-fly currency conversion. The result includes the conversion rate used and the converted amount.

  • In the From Currency field, enter the three-letter ISO 4217 code of the source currency — the currency you are converting from (for example, USD).

  • In the To Currency field, enter the three-letter ISO 4217 code of the target currency — the currency you are converting to (for example, EUR).

  • In the Amount field, enter the numeric amount to convert (for example, 100 to convert 100 units of the source currency).

  • In the Date field, optionally enter a historical date in YYYY-MM-DD format to perform the conversion using the exchange rate that was in effect on that date. Leave this field blank to use the current (real-time) exchange rate.

When a historical date is specified, the API uses the closing exchange rate for that date. This is useful for reconciling past transactions at the rate that was in effect at the time.

Get Timeseries Exchange Rates

This endpoint returns daily historical exchange rate data for all or a specific set of currencies between two dates, with a maximum range of 365 days. Use this endpoint to build time-series datasets for trend analysis, financial modeling, backtesting currency strategies, or populating data warehouses with historical rate data.

  • In the Start Date field, enter the start date of the date range in YYYY-MM-DD format (for example, 2024-01-01). This is the earliest date for which exchange rate data will be returned.

  • In the End Date field, enter the end date of the date range in YYYY-MM-DD format (for example, 2024-03-31). The total date range between Start Date and End Date must not exceed 365 days.

  • In the Base Currency field, optionally enter the three-letter ISO 4217 currency code for the base currency (for example, USD). If left blank, EUR is used as the default base currency.

  • In the Target Currencies field, optionally enter a comma-separated list of currency codes to limit the response to specific currencies (for example, USD,GBP,JPY). If left blank, data for all supported currencies is returned for each day in the range.

The timeseries endpoint returns one record per date in the specified range. For large date ranges with many currencies, the response payload can be significant. Filtering to specific target currencies reduces response size and improves performance.

Get Currency Fluctuation Data

This endpoint returns fluctuation data — specifically the absolute change and percentage change — for currencies between two specified dates, with a maximum range of 365 days. Use this endpoint when you need to measure how much a currency has appreciated or depreciated over a period, such as for risk assessments, financial reporting, or alerting workflows.

  • In the Start Date field, enter the start date of the analysis period in YYYY-MM-DD format (for example, 2024-01-01). This is the date from which fluctuation is measured.

  • In the End Date field, enter the end date of the analysis period in YYYY-MM-DD format (for example, 2024-06-30). The total date range between Start Date and End Date must not exceed 365 days.

  • In the Base Currency field, optionally enter the three-letter ISO 4217 currency code for the base currency (for example, EUR). If left blank, EUR is used as the default base currency.

  • In the Target Currencies field, optionally enter a comma-separated list of currency codes to limit results to specific currencies (for example, USD,GBP). If left blank, fluctuation data for all supported currencies is returned.

The fluctuation response includes both the absolute change (difference between start and end rates) and the relative change percentage for each currency. This makes it straightforward to identify the most and least volatile currencies in a given period.

Get Supported Currency Symbols

This endpoint returns the full list of all currency symbols supported by the Exchange Rates Data API, along with each currency's full name. Use this endpoint to populate dropdown menus, validate currency codes, or discover the complete set of currencies available for use in other endpoints.

  • No configuration parameters are required for this endpoint. Selecting it is sufficient — Nexla will automatically retrieve all supported currency symbols and their names from the API.
  • The response data path is $.symbols, which contains an object where each key is a currency code (for example, USD) and each value is the currency's full name (for example, United States Dollar).

This endpoint is useful for building reference datasets or enriching other currency data with human-readable currency names. The list of supported symbols reflects all 170+ currencies available through the Exchange Rates Data API.

Once the selected endpoint template has been configured, click the Test button to the right of the endpoint selection menu to retrieve a sample of the data that will be fetched. Sample data will be displayed in the Endpoint Test Result panel on the right, allowing you to verify that the source is configured correctly before saving.

Manual configuration

Exchange Rates API data sources can also be manually configured to ingest data from any valid Exchange Rates Data API endpoint, including endpoints not covered by the pre-built templates, chained API calls, or custom request parameters. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method (all Exchange Rates Data API endpoints use GET), endpoint URL, date/time and lookup macros, path to data, metadata, and request headers.

The base URL is https://api.apilayer.com/exchangerates_data/, followed by the endpoint path and any required query parameters, for example:

  • Latest rates: https://api.apilayer.com/exchangerates_data/latest?base=USD&symbols=EUR,GBP
  • Historical rates: https://api.apilayer.com/exchangerates_data/2024-01-15?base=USD
  • Currency conversion: https://api.apilayer.com/exchangerates_data/convert?from=USD&to=EUR&amount=100
  • Timeseries: https://api.apilayer.com/exchangerates_data/timeseries?start_date=2024-01-01&end_date=2024-03-31&base=USD
  • Fluctuation: https://api.apilayer.com/exchangerates_data/fluctuation?start_date=2024-01-01&end_date=2024-06-30
  • Symbols: https://api.apilayer.com/exchangerates_data/symbols

When adding date/time macros, select the yyyy-MM-dd date format to match the YYYY-MM-DD format the API expects. The path to data is $.rates for the latest, historical, timeseries, and fluctuation endpoints, $ for the convert endpoint, and $.symbols for the symbols endpoint; metadata fields such as timestamp, base, and date sit outside this path and can be captured with a metadata path of $. The apikey authentication header is added automatically by Nexla from your stored credential — do not add it again in Request Headers.

Once all of the relevant settings have been configured, click the Create button in the upper right corner of the screen to save and create the new Exchange Rates API data source. Nexla will now begin ingesting data from the configured endpoint and will organize any data that it finds into one or more Nexsets.