Links
🦾

Introduction

Users on the Token Terminal Pro plan can query the data freely with their designated API key, which can be found on their account page.
A view of the account page where the user API key can be retrieved from
Authentication to the API is performed via HTTP Token Auth. Provide your API key as the token auth value by using the Authorization header.
Here's an example query to get you started. The query fetches Uniswap's historical Fee data on a daily granularity.
cURL
Python
1
# Set your API Key here.
2
API_TOKEN="d3adb33f-c123-45b6-7890-c0ff33"
3
curl \
4
-H "content-type: application/json" \
5
-H "authorization: Bearer $API_TOKEN" \
6
"https://api.tokenterminal.com/v2/projects/uniswap/metrics?metrics=fees"
import requests
# Set your API Key here.
API_TOKEN="d3adb33f-c123-45b6-7890-c0ff33"
params = {"metrics": "fees"}
headers = {"Authorization": f"Bearer {API_TOKEN}"}
r = requests.get("https://api.tokenterminal.com/v2/projects/uniswap/metrics", params=params, headers=headers)
r.json()

Using Google Sheets

We recommend taking a look at Paul Gambill's guide on importing JSON data from external sources with the caveat of using our fork of the script and the ImportJSONTokenAuth function.
  1. 1.
    Create a new Google Spreadsheet.
  2. 2.
    Click on Tools -> Script Editor.
  3. 3.
    Click Create script for Spreadsheet.
  4. 4.
    Delete the placeholder content and paste the whole code from this script.
  5. 5.
    Rename the script to ImportJSON.gs and click the save button.
  6. 6.
    Back in the spreadsheet, in a cell, you can type "=ImportJSONTokenAuth()" and begin filling out it’s parameters.