Automate Trading View Data Imports To Google Sheets

Reading Time: 4 minutes

This tutorial will teach you how to import Trading View data to Google Sheets using Amigo Data Add-on. You can import various kinds of data like stock quotes, futures, popular indices, forex, and many more. Amigo Data gives you the flexibility to update your data automatically, just set it up once and let Amigo Data do the job for you.

To import Trading View data to Google Sheets, we will follow the steps below:

Trading View data imports to Google Sheets

Here’s the step-by-step guide to import Trading View data to Google Sheets.

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

Generate the API key

Sign up for  RapidAPI

RapidAPI page to sign up

Once you’re logged in, go to the Trading View API documentation in RapidAPI

Learn how to automate trading view data imports to google sheets

Choose a subscription plan from the Pricing menu. In this tutorial, we will choose the Basic option

Click on the endpoints and scroll down a bit. You will find your API key under the Header Parameters.

Choose an endpoint

For this tutorial, we will import from market/get-movers endpoint. This endpoint provides us with movers in different exchanges and different categories.

The header parameter consists of the API key and API host. In the required parameters section, we have to input the exchange for which we will fetch data. You can input any exchange of your choice from the given list. 

In this tutorial, we will fetch percent_change_data to Google Sheets. The parameters that we will enter are as follows:

Required Parameters:

Exchange: BSE

Optional Parameters:

Name: percent_change_data

Click the Test Endpoint option to run the query

The success message indicates that the endpoints are functioning correctly. 

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

Select the cURL from Shell

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

Import 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 expand the Details tab and enter the following as headers:

Name: X-RapidAPI-Host, Value:

Name: X-RapidAPI-Key, Value: your_key

Replace your_key with your RapidAPI key.

Then click the PREVIEW button

Flatten the data points and then click IMPORT.

Preview, flatten and import data

A snippet of the imported data.

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

Economic calendar data

Using calendar/get-economic-calendar endpoint, you can import economic calendar data by specific date ranges and countries. In the required parameter section, you need to enter from and to dates (YYYY-MM-DD). In the optional parameters, you can specify the country code from the list of supported countries. 

Endpoint to get economic calendar data

Similarly, you can also explore other endpoints. Trading View API has so much to offer. To explore more endpoints go through the documentation of Trading View API. 

After importing the data, you can also set a refresh schedule so that the data are updated automatically at regular intervals. By this, you can automate importing financial market data to Google Sheets. 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. Visit our blog to find out the kinds of data you can import to Google Sheets.

Some related articles you may be interested in:

Get Real-time Stock Data In Google Sheets Using MarketStack API

Import CoinMarketCap Data To Google Sheets

Import Data From Nasdaq To Google Sheets