Metrics

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

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 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' | '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

startstring date

Start date for the query

endstring date

End date for the query

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

No recorded changes to this endpoint across all 1 revision of this API.