Import Historical Exchange Rates in Airtable

In this guide, we'll import daily historical exchange rates between two dates in Airtable. To do this, we'll use the Data Fetcher Airtable app and connect to the exchangerate.host API with no-code.

Note: if you'd rather import the exchange rate for one particular historical date (rather than every day in a date range), take a look at the Historical date option in this guide.

Install Data Fetcher

Install Data Fetcher from the Airtable app marketplace. After the app launches, sign up for a free Data Fetcher account by entering a password and clicking 'Sign up for free'.

Group 1Data Fetcher Sign Up .png

Import Historical Exchange Rates in Airtable

On the home screen of the Data Fetcher app, click 'Create your first request'. Requests in Data Fetcher are how you import data to or send data from your Airtable base.

click-create-your-first-request.png

On the create request screen in Data Fetcher, for Application, select 'exchangerate.host'.

exchange-rate-host-selected-application.png

For Endpoint, select 'Daily historical rates'.

exchange-rate-endpoint-daily-rates.png

Enter a Name for your request, e.g. 'Import Historical Rates'.

Click 'Save & Continue'.

exchange-rate-historical-save-continue.png

We are going to import historical rates for every day between a start date and end date. Set the Start date to the start of your desired date range. Do the same for End Date.

exchange-rate-historical-start-end-date.png

If you do not want to set a fixed Start/End Date, you can instead reference a table value with type 'Date' in your Airtable base.

Select the Base currency you want to use, e.g. 'USD'.

exchange-rate-historical-base-currency.png

Select one or more Quote currencies, e.g. 'EUR' & 'GBP'. You can leave this blank to get all the available currencies.

exchange-rate-historical-quote-currency.png

Select the Output Table & View you want to import the historical exchange rates into.

output-table-1.png

Click 'Save & Run'.

exchange-rate-historical-save-run.png

The request will run and the Response field mapping modal will open. This is where you set how the fields from exchangerate.host should map to fields in the output table. For each field, you can either import or filter it. For an imported field, you can set whether to map them to an existing field or create a new field.

Make sure you import the 'Rates date', which has the date for each output row. The historical rate for each quote currency will be in a field called 'Rates SYMBOL', e.g. 'Rates EUR' for Euros. Make sure you import all of these too. Then click 'Save & Run'.

exchange-rate-historical-response-field-mapping.png

Data Fetcher will create any fields that need to be created in the output table, then run the request and import the historical exchange rates into your output table.

Screenshot 2022-02-11 at 15.08.58.png

Import Historical Exchange Rates in Airtable Automatically

At the moment, we have to manually run the request to import the historical exchange rates. We can use Data Fetcher's scheduled requests feature to update them by converting currencies every 15 minutes/ hour/ day etc.

In Data Fetcher, scroll to Schedule and click 'Upgrade'.

table-1-schedule-upgrade-button.png

A new tab will open where you can select a plan and enter your payment details to upgrade.

Screenshot 2021-12-29 at 10.25.19.png

Return to the Data Fetcher app and click "I've done this".

table-1-schedule-ive-done-this-button.png

Click 'Add API key' in order to add your Airtable API key. You can find your Airtable API key here.

Group 11(1).png

Enter your Airtable API key and click 'Save'.

save-airtable-api-key.png

Enable Schedule this request.

schedule-data-fetcher-request.png

Select how often you want the request to run, e.g. 'Every 15 mins'. Click 'Save' The request will now run on the schedule and import the historical exchange rates automatically.

Group 11(2).png