Import Real-time Commodity Price Data To Google Sheets

Reading Time: 5 minutes

Are you looking for an effective way to import real-time commodity price data to Google Sheets? Then you have come to the right place. By the end of this short tutorial, you will know how to get live commodity prices in Google Sheets and have these data updated automatically.

We’ll be using the Amigo extension in Google Sheets to fetch real-time commodity prices and pull import commodity price data to Google Sheets.

The image below is a snippet of real-time commodity prices in Google Sheets imported with Amigo.

Real-time commodity prices in Google Sheets

To import real-time commodity price data to Google Sheets, we will follow the steps below.

Real-time commodity price data imports to Google Sheets

Here’s the step-by-step guide to import real-time commodity price data to Google Sheets.

Install the Amigo extension

Install the Amigo Google Sheets add-on from the Google Workspace Marketplace to get real-time commodity prices in Google Sheets.

Amigo Data installation link

Install Amigo Data to import real-time commodity price data to Google Sheets

Alternatively, you can get it from Google Sheets.

  • Open Google Sheets
  • Go to Extensions→Add-ons→Get add-ons
  • Search for Amigo and install it.

Generate the API key

We’ll use an API on RapidAPI called Global Stock Market API to retrieve real-time commodity prices.

Sign up or log in to RapidAPI.

Once you’re logged in, go to the Global Stock Market API documentation in RapidAPI. This API is a gateway to global financial markets and you can import data like stock, futures, commodity prices, etc.

Real-time commodity prices API

Click on Subscribe to Test button to subscribe to the API to retrieve live commodity prices using the API.

Subscribe to the real-time commodity prices API

Choose a subscription plan. You can go for the Basic (free) plan and upgrade it later, should you need it.

Select a plan

Click Endpoints to go back to the real-time commodity prices API. On the left is the list of the type of data that can be retrieved, among which is commodities prices.

List of data endpoints

Get the data endpoint

The commodities data are found under Major Commodities. Expand the category and click on any one of the endpoints–eg, Get Major Commodities by Price to fetch real-time commodity prices.

Real-time commodity price data endpoint

With this endpoint, we can import real-time commodity price data of all the major commodities throughout the globe. It imports data from popular commodity exchanges MCX, NCDEX, and many more.

Click the Test Endpoint button to test the API and run the query.

Click to test endpoint

The success message indicates that the API is functioning correctly.

The API is functional

The API endpoint and headers to fetch real-time commodity prices are found under Code Snippets.

Change the language to (Shell) cURL from (Node.js) Axios. Copy the URL excluding the apostrophes and also note the headers. These will be use in the next step to import real-time commodity price data to Google Sheets.

Real-time commodity prices API endpoint URL and headers

Import data to Google Sheets

Go back to Google Sheets and launch the Amigo extension to import the commodity prices to Google Sheets.

Launch Amigo to import real-time commodity prices to Google Sheets

Select Custom API from the list of sources.

Selecting the source in Amigo Data

Enter the API endpoint URL in the API URL field.

Enter the real-time commodity prices API endpoint URL

Expand the Details tab and enter the following headers as given in the Code Snippets.

Name: X-RapidAPI-Host, Value: global-stock-market-api-data.p.rapidapi.com
Name: X-RapidAPI-Key, Value: your_key
Commodity prices API header names and values

Then click the PREVIEW button to fetch the live commodity prices and preview them.

Preview of the commodity prices data to import to Google Sheets

Flatten the nested datasets and then click IMPORT.

Preview of the live commodity prices to import to Google Sheets

The following snippet shows commodities price data from MCX, NCDEX, and many more. This way you can track real-time commodity prices in Google Sheets and visualise the data to gain insights.

Snippet of real-time commodity prices in Google Sheets

You have learned how to import real-time commodity price data to Google Sheets from popular exchanges like MCX, NCDEX, etc. You can likewise import other types of data using Global Stock Market API. To explore more, go through the Stock Market API documentation.

Automatically fetch real-time commodity prices

After importing the commodity price data, you can set a refresh schedule so that the data are updated automatically at regular intervals. This way you’ll always have the live commodity data in your Google Sheets. To learn how to set a refresh schedule, follow this link.

Amigo extension can connect Google Sheets to multiple sources and allows to import data automatically. It’s a convenient and versatile tool for importing and exporting data to Google Sheets. It can save a lot of time and effort. To learn more about other various kinds of data that can be imported to Google Sheets, visit our blog.

Some related articles you may be interested in:

Import Webull Data To Google Sheets

Automate Trading View Data Imports To Google Sheets

Import Morningstar Data To Google Sheets

Leave a Reply