API Integration with Google Sheets

First, head over to https://app.tokenmetrics.com and login using your credentials.

After login, the webpage will take you to the homepage, which looks like this (below).

From menu bar, click on the "DATA API".

From here, generate your access key using "Generate Access Key" tab

🚧

Note:

Copy and save the access key shown on the next page as it will not be made visible again.

Now open Google Sheets and create a new spreadsheet.

In this new spreadsheet, enter some assets in Column 1 and their symbol in Column 2 like this.

I have put TM Token ID in Column 3, an unique identifier associated with each token in the TM Data API ecosystem.

In Column 4 and Column 5, I have put TM Investor Grade and TM Trader Signal, respectively, which will be fetched from TM Data API in the following steps.

Now, head over to the "Extensions" tab in the above menu bar and click "Apps Script" where we will write scripts to automate the fetching of the above metrics in the Google Sheets.

Now, Apps Script IDE will be opened, where we will write the code to the script.

We will start writing the script in Code.gs file.

The following part will be focused on the actual code that will be written in the script file.

Run the Open() function once using the above command, and you will see a menu "Update Metrics" in the spreadsheet menu bar with the following options.

Click on the three options one at a time to see the results on the spreadsheet.

You can update the metrics whenever required by pressing the above buttons in the menu bar.