Our application programming interface (API) makes it easy to query our data. 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. 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. 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.
const res =awaitfetch('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.
Create a new Google Spreadsheet.
2.
Click on Tools -> Script Editor.
3.
Click Create script for Spreadsheet.
4.
Delete the placeholder content and paste the whole code from this script.
5.
Rename the script to ImportJSON.gs and click the save button.
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):