Assets

Get historical metrics for an asset

Use this endpoint to retrieve historical data for an asset.

This endpoint supports partial success - if some of the requested metric, chain, or product IDs are not found, the endpoint will return data for the valid entities and include an errors array with details about the invalid ones.

get/v2/assets/{asset_id}/metrics

Request

  • Base URL
    https://api.tokenterminal.com
  • Auth
    HTTP bearer

Path parameters

asset_idstring 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_idstring

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_idsstring[]

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_idsstring[]

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.

startstring 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.

endstring 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_bystring[]

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.

The only supported value is chain.

order_direction'asc' | '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.

'24h' | '7d' | '30d' | '90d' | '180d' | '365d' | 'max' | 'ytd' | '4fullq'
OR
integer

Time interval for data aggregation.

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

Response

OK

Changes

No recorded changes to this operation across all 8 revisions of this API.