Automate exchange rate data imports to Google Sheets to fetch real-time data

Reading Time: 4 minutes

This article covers how to automate exchange rate data imports to Google Sheets to fetch real-time data. With the ExchangeRate API, you can import accurate and reliable data in just a few seconds.

Importing data manually can be a tedious task. However, it need not remain so. Using Amigo Data, you can easily connect to the data source and import the data into Google Sheets and get them updated automatically.

Steps to import Air Quality data to Google Sheets:

How to automate Exchange Rate data imports to Google Sheets

Here’s the step-by-step guide to import the ExchnageRate API data to Google Sheets

Step 1: Install the Amigo Data add-on

Install the Amigo Data Google Sheets add-on from the Google Workspace Marketplace.

Amigo Data in Google Workspace Marketplace

Click here to install.

Alternatively, you can get it from Google Sheets.

  • Open a new sheet
  • Go to Extensions→Add-ons→Get add-ons
  • Search for Amigo Data and install

Step 2: Generate the API key

In order to access the ExchangeRate API data, we’ll need a key called the API key. It is a code used to identify and authenticate access.

Follow the steps below to get an API key from the ExchangeRate.

Visit the ExchangeRate API website and enter your email address to generate a free API key

Automate exchange rate data imports to Google Sheets using ExchangeRate API

Enter your credentials and sign up for a free API key

Create account in ExchangeRate API

Your account will be created after you click on the activation link sent to you via mail

Account created

You will be logged in and redirected to the page where you can see your API key

ExchangeRate API key

Step 3: Choose an endpoint

Refer to the ExchangeRate API documentation to explore all the endpoints. For this tutorial, we will import pair conversion data. We will convert 100 USD to INR. So, select the Pair Conversion option.

Pair conversion

Scroll a bit and you will come across the following endpoint URL. Copy the URL. 

Copy the endpoint link

We need to customize the following API endpoint URL to be able to fetch the relevant data. You can find here the list of supported currencies along with their valid codes. 

Sample URL:

In the sample URL, EUR and GBP are the currency pair. EUR is the base currency (the currency that we want to convert) and GBP is the target currency (the currency that we want to convert to) 

We will modify EUR to USD and GBP to INR as we wish to convert USD to INR. The modified URL should look like this:

If you wish to convert any given amount from one currency to another. Then simply append the amount to the URL link after using a ‘/’. The amount is accepted in decimal format (XXXX.XXXX). For converting $100 to INR, the URL link should look like this:

Copy the modified URL

Note: The URL must not contain any spaces

Step 4: Import the Conversion rate data to Google Sheets

Go back to Google Sheets and launch the Amigo Data extension.

Launching Amigo Data in Google Sheets

Select Custom API from the list of sources

Selecting the source in Amigo Data

Paste the endpoint in the API URL bar

Pasting the endpoint

Then click the PREVIEW button

Click on the preview button

Flatten the data points and then click IMPORT.

Click preview then flatten and then import the data

A snippet of imported data

Snippet of the imported data

You can likewise import other types of data from the ExchangeRate API. Following are some other examples.

Historical Data

You can import historical exchange rate data using the historical data endpoint URL. It imports exchange rate data against all the currencies for a particular date. You can find this in the list of endpoints. For example, if we wish to import USD exchange rate data on 01/01/2020, the modified URL should look like this:

On the ExchangeRate documentation page, you can explore more endpoints and try them out. 

After importing the data, you can also set a refresh schedule so that the data are updated automatically at regular intervals. To learn how to set a refresh schedule, follow this link.

There are several other types of data that you can import into Google Sheets using Amigo Data such as Marketstack data,  Coinmarketcap data, Nasdaq data, and many more. 

Some related articles you may be interested in:

Leave a Reply