Skip to main content
POST
/
v2
/
assets
/
{asset_id}
/
metrics-breakdown
Get asset metrics breakdown
curl --request POST \
  --url https://api.tokenterminal.com/v2/assets/{asset_id}/metrics-breakdown \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "metric_ids": [
    "asset_price",
    "asset_holders"
  ],
  "group_by": "assets",
  "interval": "30d",
  "data_ids": [
    "ethereum"
  ],
  "product_ids": [
    "usdc"
  ],
  "asset_ids": [
    "<string>"
  ],
  "chain_ids": [
    "ethereum",
    "base"
  ],
  "market_sector_ids": [
    "blockchains-l1",
    "lending"
  ],
  "includeSelf": false,
  "start": "2023-12-25",
  "end": "2023-12-25",
  "ignore_threshold": false
}
'
{
  "data": [
    {
      "asset_id": "<string>",
      "data_id": "<string>",
      "product_id": "<string>",
      "chain_id": "<string>",
      "market_sector_id": "<string>",
      "metrics": {}
    }
  ],
  "errors": [
    {
      "code": "NOT_FOUND",
      "field": "project_ids",
      "value": "invalid-project"
    }
  ]
}

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

Body

application/json
metric_ids
string[]
required

List of metrics to include according to asset metric availability.

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

If an empty array is provided, it defaults to ['asset_price'].

Example:
["asset_price", "asset_holders"]
group_by
enum<string>
required

Dimension to group the breakdown by.

Available options: assets, projects, product, chains, market-sector, chain-asset, chain-project, product+chain.

Available options:
assets,
projects,
product,
chains,
market-sector,
chain-asset,
chain-project,
product+chain
Example:

"assets"

interval
enum<string>
required

Time interval for aggregation.

Intervals are 24h, 7d, 30d, 90d, 180d, 365d, max.

Available options:
24h,
7d,
30d,
90d,
180d,
365d,
max
Example:

"30d"

data_ids
string[]

List of project data IDs to filter by.

Allows you to select one or more projects. When including multiple projects, separate each one with a comma.

Example:
["ethereum"]
product_ids
string[]

List of product IDs to filter by.

Allows you to select one or more products. When including multiple products, separate each one with a comma.

Example:
["usdc"]
asset_ids
string[]

List of asset IDs to filter by.

Allows you to select one or more assets. When including multiple assets, separate each one with a comma.

chain_ids
string[]

List of chain IDs to filter by.

Allows you to select one or more chains. When including multiple chains, separate each one with a comma.

Example:
["ethereum", "base"]
market_sector_ids
string[]

List of market sector IDs to filter by.

Allows you to select one or more market sectors. When including multiple market sectors, separate each one with a comma.

The full list of available market sectors can be retrieved from the /v2/market-sectors endpoint.

Example:
["blockchains-l1", "lending"]
includeSelf
boolean
default:false

Include the asset itself in the breakdown results.

If not specified, defaults to false.

start
string<date>

Start date for the breakdown.

Allows you to select the start date for the query. If not specified, uses the default start date.

end
string<date>

End date for the breakdown.

Allows you to select the end date for the query. If not specified, uses the latest available date.

ignore_threshold
boolean
default:false

Ignore metric thresholds when calculating breakdowns.

If not specified, defaults to false.

Response

OK

data
object[]
errors
object[]
Example:
{
"code": "NOT_FOUND",
"field": "project_ids",
"value": "invalid-project"
}