Skip to main content
POST
/
v2
/
metric-breakdown
Get metric breakdown aggregation for multiple projects, chains, or products
curl --request POST \
  --url https://api.tokenterminal.com/v2/metric-breakdown \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "metric_ids": [
    "<string>"
  ],
  "project_ids": [
    "<string>"
  ],
  "product_ids": [
    "<string>"
  ],
  "chain_ids": [
    "<string>"
  ],
  "market_sector_ids": [
    "blockchains-l1",
    "lending"
  ],
  "interval": "24h",
  "group_by": "projects",
  "start": "2023-12-25",
  "end": "2023-12-25"
}'
{
  "data": [
    {
      "data_id": "usual",
      "chain_id": "usual",
      "product_id": "usual",
      "metrics": {}
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
metric_ids
string[]
required

Array of metric IDs to retrieve data for

interval
enum<string>
required

Time interval for aggregation

Available options:
24h,
7d,
30d,
90d,
180d,
365d,
ytd,
max
group_by
enum<string>
required

How to group the results

Available options:
projects,
chains,
chain-project,
chain-product,
chain-market-sector,
market-sector,
product
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

Example:
["blockchains-l1", "lending"]
start
string<date>

Start date for the query

end
string<date>

End date for the query

Response

200 - application/json

OK

data
object[]
⌘I