GET
/
v2
/
projects
/
{project_id}
/
metrics
Get historical metrics for a project
curl --request GET \
  --url https://api.tokenterminal.com/v2/projects/{project_id}/metrics \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "timestamp": "<string>",
      "project_name": "<string>",
      "project_id": "<string>",
      "chain": "<string>",
      "business_line": "<string>",
      "version": "<string>",
      "metric_id(s)": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

project_id
string
required

ID of the project

Allows you to select one of the projects available.

The full list is available on the projects endpoint (see above).

Query Parameters

metric_ids
string[]

List of metrics to include according to projects metric availability.

Allows you to select one or more of the metrics available for a specific project. When including multiple metrics, separate each one with a comma. Example: fees,revenue.

If no metric_id is selected, the query defaults to returning all available metrics for the project.

chain_ids
string[]

List of chains to include according to projects chain availability.

Allows you to select one or more of the chains available for a specific project. When including multiple chains, separate each one with a comma. Example: ethereum,base.

The full list of available chains can be retrieved from the projects/:project_id endpoint.

product_ids
string[]

List of products to include according to projects product availability.

Allows you to select one or more of the products available for a specific project. When including multiple products, separate each one with a comma. Example: usdc,usdt.

The full list of available products can be retrieved from the projects endpoint.

aggregate_by
string

Level of granularity

This feature enables more detailed queries of specific metrics. For instance, you can examine a project's revenue by individual chain.

However, it's important to note that this level of granularity is not applicable to all metrics. For example, while it is possible to segment the fees metric by chain, the price metric cannot be aggregated in this manner.

The availability of granularity options varies between projects. Attempting to apply an inappropriate level of granularity to a project will result in an empty result set.

start
string

Start date Allows you to select the start date for the query. If no start is selected, the query defaults to launch date or the first date for which there is data available for the chosen metric(s).

end
string

End date

Allows you to select the end date for the query. If no end is selected, the query defaults to the latest date for which there is data available for the chosen metric(s).

order_direction
enum<string>
default:desc

Timestamp ordering

Allows you to define how the response is sorted. The response is always sorted by timestamp, and by selecting desc the response starts from the most recent entry, and vice versa for asc.

If no order_direction is selected, the response defaults to desc.

Available options:
asc,
desc
include_project_specific_metrics
boolean
default:false

Include project-specific metrics

Allows you to include project-specific metrics in the response. Project-specific metrics are metrics that are not available for all projects, but are specific to a particular project.

If no include_project_specific_metrics is selected, the response defaults to false.

Response

200 - application/json

OK

The response is of type object.