Import Commodity Futures Data To Google Sheets

Reading Time: 4 minutes

Are you looking for an effective way to import commodity futures data to Google Sheets? Then you have come to the right place. By the end of this short tutorial, you will be able to import commodity futures data to Google Sheets and devise a trading plan that suits you the best.

Importing commodity futures data to Google Sheets can be done without hassle by using a simple Google Sheets extension called Amigo. With Amigo, you can import all sorts of data to Google Sheets in no time. From importing data to setting a refresh schedule to automatically update the data, Amigo handles it for you.

To import commodity futures data to Google Sheets, we will follow the steps below:

Steps to import commodity futures data to Google Sheets

Here’s the step-by-step guide to import commodity futures data to Google Sheets.

Install the Amigo extension

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

Amigo Data in Google Workspace Marketplace

Alternatively, you can get it from Google Sheets.

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

Generate the API key

Sign up or log in to  RapidAPI.

Once you’re logged in, go to the Futures API documentation in RapidAPI. This API is a gateway to get daily and historical futures prices for 26 major financial assets and their monthly futures contracts.

Learn how to import commodity futures data to Google Sheets using RapidAPI

Click on Subscribe to Test. You will get redirected to the subscription page from where you can choose a plan that suits you the best.

Click to Subscribe

Choose a subscription plan. The basic plan will suffice for tutorial purposes. You can always upgrade the plan as per your requirements.

Plans

Click Endpoints to go back to the API Playground. On the left is the list of the type of data that can be retrieved.

List of endpoints

Get the data endpoint

In order to import commodity futures data to Google Sheets, click on the Time Series endpoint. It helps you import all the data about the contract options for a given period.

Commodity futures time series data endpoint

In the required parameters section, enter the commodity symbol and starting date (YYYY-MM-DD). In the optional parameters section, you can enter the end date (YYYY-MM-DD) and month of the contract options to filter the search results. 

Note: You can access the commodity symbol by using the Supported Assets endpoint. This endpoint returns the list of supported commodities along with other information like commodity symbol, exchange, contract size, etc.

Enter the parameters

Click the Test Endpoint option to run the query and verify whether the API is functional.

Click to test the endpoint

The success message indicates that the API is functioning correctly.

The API is functional

On the right side under Code Snippets, select Shell-> cURL from the dropdown menu.

Copy the URL excluding the apostrophes and also note the headers. This is the endpoint URL for the data to import to Google Sheets.

Copy the endpoint URL and headers

Import data to Google Sheets

Go back to Google Sheets and launch the Amigo extension.

Launch the amigo extension

Select Custom API from the list of sources.

Choose custom API option

Paste the endpoint in the API URL bar.

Paste the endpoint URL

Then expand the Details tab and enter the following as headers:

Name: X-RapidAPI-Host, Value: futures.p.rapidapi.com

Name: X-RapidAPI-Key, Value: your_key

Replace your_key with your RapidAPI key.

Header and name values

Then click the PREVIEW button.

Flatten the data points and then click IMPORT.

Click to preview, flatten and import

The following snippet shows the commodity futures data for WTI Crude Oil listed on the NYMEX exchange.

Snippet of imported data

You have learned how to import commodity futures data for various commodities listed in popular exchanges like COMEX, NYMEX, etc.

After importing the commodity price data, you can set a refresh schedule so that the data are updated automatically at regular intervals. Learn how to set a refresh schedule.

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 Real-time Commodity Price Data To Google Sheets

Automate Trading View Data Imports To Google Sheets

Import Morningstar Data To Google Sheets

Leave a Reply

Discover more from Amigo: No-code Data Integrations to Google Sheets

Subscribe now to keep reading and get access to the full archive.

Continue reading