Metrics

Get metric breakdown aggregation for multiple projects, chains, or products

Changed on

Use this endpoint to retrieve metric breakdown aggregation for multiple projects including avg, change, sum, trend, and latest values over a given interval or date range. When looking at cumulative metrics such as fees, reference sums for the total aggregate, and when looking at static metrics such as total value locked, reference latest values for the latest running total. See the response reference below for more details.

This endpoint supports partial success - if some of the requested metric, project, 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.

post/v2/metric-breakdown

Request

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

Request body

metric_idsstring[] required

Array of metric IDs to retrieve data for

project_idsstring[]

Optional array of project IDs to filter by

product_idsstring[]

Optional array of product IDs to filter by

chain_idsstring[]

Optional array of chain IDs to filter by

market_sector_idsstring[]

Optional list of market sector IDs to filter by

interval'24h' | '7d' | '30d' | '90d' | '180d' | '365d' | '1095d' | '1825d' | 'ytd' | 'max'

Length of the aggregation window. Defaults to 7d. The window ends at the latest available date, or the day before end if given.

Ignored when both start and end are given; the window is then the date range [start, end).

group_by'projects' | 'chains' | 'chain-project' | 'chain-product' | 'chain-market-sector' | 'market-sector' | 'product' required

How to group the results

startstring date

First date of the aggregation window, inclusive (YYYY-MM-DD).

With end, the window is the half-open range [start, end) and interval is ignored. Without end, the window spans interval days starting on start.

endstring date

End of the aggregation window, exclusive (YYYY-MM-DD). Data for this date is not included; must be after start, otherwise the request is rejected with a 400.

For a full calendar month use the first day of the next month, e.g. start=2026-08-01, end=2026-09-01. Without start, the window spans interval days ending the day before end. If omitted entirely, the window ends at the latest date for which data is available. If the day before end has no data yet, the window ends at the latest available date before it.

Example request

{
  "market_sector_ids": [
    "blockchains-l1",
    "lending"
  ]
}

Response

OK

Example response

{
  "data": [
    {
      "data_id": "usual",
      "chain_id": "usual",
      "product_id": "usual"
    }
  ],
  "errors": [
    {
      "code": "NOT_FOUND",
      "field": "project_ids",
      "value": "invalid-project"
    }
  ]
}

Changes

    • info

      the request property became optional

    • info

      the request property default value 7d was added

    • info

      added the new 1095d enum value to the request property

    • info

      added the new 1825d enum value to the request property