GET
/
v2
/
projects
/
{project_id}
/
products
/
{product_id}
/
metrics
Get historical metrics for a specific product of a project
curl --request GET \
  --url https://api.tokenterminal.com/v2/projects/{project_id}/products/{product_id}/metrics \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "metric_id": "<string>",
      "date": "<string>",
      "value": 123,
      "chain_id": "<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

product_id
string
required

ID of the product

Query Parameters

metric_ids
string[]

List of metrics to include according to product metric availability.

Allows you to select one or more of the metrics available for a specific product. 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 product.

chain_ids
string[]

List of chains to include

Allow selection of one or more chains to include in the data, particularly for metrics where chain-level granularity is available. When selecting multiple chains, separate each with a comma. Example: ethereum,arbitrum.

If no chain_id is provided, available chains for the product and metric will be used in the response.

start
string<date>

Start date for data

Set the beginning date for the data to be returned. Format: YYYY-MM-DD.

If no start date is provided, all historical data will be included from the earliest available date.

end
string<date>

End date for data

Set the ending date for the data to be returned. Format: YYYY-MM-DD.

If no end date is provided, data up to the current date will be included.

aggregate_by
string

Level of granularity

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

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

order_direction
enum<string>
default:desc

Order direction for the results

Sort the results in ascending or descending order based on date.

Available options:
asc,
desc

Response

200
application/json

OK

The response is of type object.