Skip to main content
GET
/
v2
/
assets
/
{asset_id}
/
metrics
Get historical metrics for an asset
curl --request GET \
  --url https://api.tokenterminal.com/v2/assets/{asset_id}/metrics \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "timestamp": "<string>",
      "asset_id": "<string>",
      "metric_id": "<string>",
      "value": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Path Parameters

asset_id
string
required

ID of the asset

Allows you to select one of the assets available.

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

Query Parameters

metric_id
string

Metric to include according to asset metric availability.

Allows you to select one of the metrics available for a specific asset.

If no metric_id is selected, the query defaults to asset_price.

chain_ids
string[]

List of chains to include according to asset chain availability.

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

product_ids
string[]

List of products to include according to asset product availability.

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

start
string<date>

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.

end
string<date>

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.

aggregate_by
string[]

Level of granularity

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

However, it's important to note that this level of granularity is not applicable to all metrics.

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
interval

Time interval for data aggregation.

Intervals are 24h, 7d, 30d, 90d, 180d, 365d, max, ytd, 4fullq, or a number representing days.

Available options:
24h,
7d,
30d,
90d,
180d,
365d,
max,
ytd,
4fullq

Response

200 - application/json

OK

data
object[]