---
title: "Get metric breakdown aggregation for multiple projects, chains, or products"
method: POST
path: "/v2/metric-breakdown"
tags: ["Metrics"]
---

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

`POST /v2/metric-breakdown`

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.

## Request body

- object
  - `metric_ids` string[], required — Array of metric IDs to retrieve data for
  - `project_ids` string[] — Optional array of project IDs to filter by
  - `product_ids` string[] — Optional array of product IDs to filter by
  - `chain_ids` string[] — Optional array of chain IDs to filter by
  - `market_sector_ids` string[] — Optional list of market sector IDs to filter by
  - `interval` '24h' | '7d' | '30d' | '90d' | '180d' | '365d' | 'ytd' | 'max', required — Time interval for aggregation
  - `group_by` 'projects' | 'chains' | 'chain-project' | 'chain-product' | 'chain-market-sector' | 'market-sector' | 'product', required — How to group the results
  - `start` string, date — Start date for the query
  - `end` string, date — End date for the query

## Response `200`

OK

- object
  - `data` object[]
    - `data_id` string — The ID of the project depending on grouping this may not be in the return.
    - `chain_id` string — The ID of the chain depending on grouping this may not be in the return.
    - `product_id` string — The ID of the product depending on grouping this may not be in the return.
    - `metrics` object
  - `errors` object[] — Optional array of errors that occurred during request processing. Only present if some requested entities were not found. The endpoint returns data for valid entities even when errors are present, allowing partial success.
    - `code` 'NOT_FOUND', required — Error code indicating the entity was not found
    - `field` 'project_ids' | 'metric_ids' | 'chain_ids' | 'product_ids' | 'market_sector_ids', required — The request parameter field that contained the invalid value
    - `value` string, required — The invalid ID value that was not found

---

[API](https://skmtc.dev/tokenterminal/apis/token-terminal-api.md) · [All operations](https://skmtc.dev/tokenterminal/apis/token-terminal-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/tokenterminal/token-terminal-api/revisions/02245ad77f39/schema)
