API Reference
Token Terminal's uniformed interface for querying fundamental metrics
The API makes it easy to query fundamental metrics on projects listed on Token Terminal. Whether it be price or revenue data, all relevant metrics for valuing cryptoassets can be found under one uniformed interface.
The API supports REST calls, uses resource-oriented urls and returns JSON-encoded responses. All the users with a PRO subscription can query the data freely with their designated API key, which can be found under their account page. The API key should be kept a secret, so make sure to not share it or store it in publicly accessible areas such as GitHub, client-side code, and so forth.

Authentication

Authentication to the API is performed via HTTP Token Auth. Provide your API key as the token auth value by using the Authorization header: -H "Authorization: Bearer 75af3af7-2f6f-306d-a640-8e0dc3cc518c"
All API requests must be made over HTTPS. Calls made over plain HTTP will fail.

Querying the API

Each endpoint shows the HTTP Method and the endpoint url for querying data. All endpoints are read-only, meaning that only GET methods are supported. Path and Query parameters are shown under the Request section. The Response section of the endpoint shows a JSON-encoded example, containing the return fields associated with the response.
The examples under each section show how to query data with different programming and scripting languages. The Python and JavaScript examples assume you have requests and node-fetch installed respectively.
get
https://api.tokenterminal.com
/v1/projects
Get all projects
HTTPie
cURL
Python
Node.js
1
http https://api.tokenterminal.com/v1/projects "Authorization: Bearer 75af3af7-2f6f-306d-a640-8e0dc3cc518c"
Copied!
1
curl https://api.tokenterminal.com/v1/projects -H "Authorization: Bearer 75af3af7-2f6f-306d-a640-8e0dc3cc518c"
Copied!
1
import requests
2
headers = {"Authorization": "Bearer 75af3af7-2f6f-306d-a640-8e0dc3cc518c"}
3
r = requests.get("https://api.tokenterminal.com/v1/projects", headers=headers)
4
r.json()
Copied!
1
const fetch = require('node-fetch');
2
const res = await fetch('https://api.tokenterminal.com/v1/projects', {headers: {'Authorization': 'Bearer 75af3af7-2f6f-306d-a640-8e0dc3cc518c'}});
3
const json = res.json();
4
console.log(json);
Copied!
get
https://api.tokenterminal.com
/v1/projects/:project_id/metrics
Get project's historical metrics
HTTPie
cURL
Python
Node.js
1
http https://api.tokenterminal.com/v1/projects/uniswap/metrics?interval=daily&data_granularity=project "Authorization: Bearer 75af3af7-2f6f-306d-a640-8e0dc3cc518c"
Copied!
1
curl https://api.tokenterminal.com/v1/projects/uniswap/metrics?interval=daily&data_granularity=project -H "Authorization: Bearer 75af3af7-2f6f-306d-a640-8e0dc3cc518c"
Copied!
1
import requests
2
params = {"interval": "daily", "data_granularity": "project"}
3
headers = {"Authorization": "Bearer 75af3af7-2f6f-306d-a640-8e0dc3cc518c"}
4
r = requests.get("https://api.tokenterminal.com/v1/projects/uniswap/metrics", params=params, headers=headers)
5
r.json()
Copied!
1
const fetch = require('node-fetch');
2
const params = new URLSearchParams({ 'interval': 'daily', 'daily_granularity': 'project' });
3
const res = await fetch('https://api.tokenterminal.com/v1/projects?' + params, {headers: {'Authorization': 'Bearer 75af3af7-2f6f-306d-a640-8e0dc3cc518c'}});
4
const json = res.json();
5
console.log(json);
Copied!

Using the API with 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.
Example (use your own API key as the second argument):
1
=ImportJSONTokenAuth("https://api.tokenterminal.com/v1/projects/uniswap/metrics", "75af3af7-2f6f-306d-a640-8e0dc3cc518c")
Copied!
Last modified 5mo ago