Being able to fetch real-time currency exchange rates in Google Sheets can help you build your trading strategies.
Here in this article, we’re going to learn how to get real-time currency exchange rates in Google Sheets using Amigo Data, a Google Sheets extension that lets us import all kinds of data into Google Sheets.
Steps to import Currencyscoop data in Google Sheets
- Install the Amigo Data add-on
- Get the Currencyscoop API key
- Choose the data endpoint
- Import data to Google Sheets
How to import currency exchange rates in Google Sheets
1. Install the Amigo Data add-on
Get the Amigo Data add-on from Google Workspace Marketplace. Click here to install.
2. Get the Currencyscoop API key
Go to https://currencyscoop.com/signup and fill up the Signup form to register
After successful registration, you will be redirected to a new page where you can see your API key
3. Choose the data endpoint
Navigate to the documentation page by clicking the API Documentation
Scroll down a bit and you will see different API endpoints. Currencyscoop offers 5 different API endpoints to import different kinds of data. In this tutorial, we will import real-time currency data.
Before proceeding to fetch the data, it’s advisable to go through the list of currencies (supported by Currencyscoop) along with valid currency codes so that you don’t end up making an invalid request. For example, AED is the currency code for the United Arab Emirates dirham.
4. Import data to Google Sheets
Open a new spreadsheet and launch Amigo Data
Select custom API from the list of sources
Paste the endpoint in the API URL field.
In the details section, click on the “+Query” option
Enter base in the Name field and USD in the value field. Click on the +ADD QUERY
Note: The base currency is the currency for which you want to extract data. In this tutorial, we will be fetching the value of USD (base) in INR. You can also choose the base currency of your choice by simply entering the valid currency code.
We have successfully added the base currency. The details section gets updated with the query as shown in the image below
We need to add the unit in which we want the USD value. Follow the above steps to add a query with symbols in the Name field and INR in the value field.
The final step is to add a query to make a valid API call. Similar to the above steps, add a query with api_key in the Name field and your API key in the value field.
Click the PREVIEW button.
Then flatten and expand the dataset so that they are organized suitably. Once that is done, click the IMPORT button.
A few moments later, you’ll have a spreadsheet populated with the data from Currencyscoop
Shown below is a snippet of the imported data.
You can likewise import other types of data from Currencyscoop. Following are some other examples.
Historical updates
https://api.currencyscoop.com/v1/historical
This service provides historical exchange rate data for every past day all the way back to the year 1996. Paste the API URL and add the following queries:
- Key – base
Value – USD (Valid currency code) - Key – date
Value – 2022-01-20 (YYYY-MM-DD) - Key – Symbols
Value – INR (Valid currency code)
Convert currencies
https://api.currencyscoop.com/v1/convert
This service performs a single currency conversion for a given amount. For example, you can convert the $100 amount to INR using this endpoint. Paste the API URL and add the following queries:
- Key – from
Value – USD (Valid currency code) - Key – to
Value – INR (Valid currency code) - Key – amount
Value – 100 (Integer value)
Some commonly asked questions
What are the different types of currencies?
The 4 different types of money as classified by the economists are commercial money, fiduciary money, fiat money, commodity money. You can use the currencies endpoint from Currencyscoop to know if it’s either fiat or crypto.
How many API calls can I make for free?
Currencyscoop offers you to make about 5000 free API calls in total. After exceeding the free quota, you will be required to subscribe.
On the Currencyscoop 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:
https://blog.tryamigo.com/get-real-time-stock-data-in-google-sheets/
https://blog.tryamigo.com/import-coinmarketcap-data-to-google-sheets/
https://blog.tryamigo.com/import-data-from-nasdaq-to-google-sheets/