> ## Documentation Index
> Fetch the complete documentation index at: https://tokenterminal.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> To query the Token Terminal data catalog, read https://tokenterminal.com/docs/catalog/agents-manual.md first. It is the whole catalog as one page: table naming grammar, key columns, partition and cluster rules, units, additivity, and the tables that are documented but not served yet.
> Never query a catalog table on a time bound alone. Also filter its cluster key, which you read from INFORMATION_SCHEMA.COLUMNS; an empty result means the object is a view, whose pruning contract is on its page. Compute is billed to the caller's own Google Cloud project.

# Get asset metrics breakdown

> Use this endpoint to retrieve aggregated breakdown data for asset metrics across different dimensions (projects, chains, market sectors, etc.).

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




## OpenAPI

````yaml /api-reference/openapi.json post /v2/assets/{asset_id}/metrics-breakdown
openapi: 3.0.0
info:
  title: Token Terminal API
  termsOfService: https://tokenterminal.com/terms
  version: 2.0.0
servers:
  - url: https://api.tokenterminal.com
security:
  - bearerAuth: []
tags: []
paths:
  /v2/assets/{asset_id}/metrics-breakdown:
    post:
      tags:
        - Assets
      summary: Get asset metrics breakdown
      description: >
        Use this endpoint to retrieve aggregated breakdown data for asset
        metrics across different dimensions (projects, chains, market sectors,
        etc.).


        If an empty `metric_ids` array is provided, it defaults to
        `['asset_price']`.
      parameters:
        - name: asset_id
          in: path
          description: |
            ID of the asset

            Allows you to select one of the assets available.

            The full list is available on the assets endpoint (see above).
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - metric_ids
                - group_by
              properties:
                metric_ids:
                  type: array
                  description: >
                    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']`.
                  items:
                    type: string
                  example:
                    - asset_price
                    - asset_holders
                group_by:
                  type: string
                  description: >
                    Dimension to group the breakdown by.


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


                    `reference-asset` groups by the price reference the
                    underlying assets track (for example `Credit fund`, `S&P
                    500`), and returns a `reference_asset` label on each row.
                    Assets that track no reference asset are excluded from that
                    breakdown.


                    The venue composites (`asset+venue`, `venue+chain`,
                    `market-sector+venue`) combine `venue` with a second
                    dimension and are only meaningful for the venue-scoped
                    metrics (`asset_tvl`, `asset_trading_volume`,
                    `asset_notional_trading_volume`).
                  enum:
                    - assets
                    - projects
                    - product
                    - chains
                    - market-sector
                    - reference-asset
                    - chain-asset
                    - chain-project
                    - product+chain
                    - venue
                    - asset+venue
                    - venue+chain
                    - market-sector+venue
                  example: assets
                interval:
                  type: string
                  description: >
                    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)`.
                  default: 7d
                  enum:
                    - 24h
                    - 7d
                    - 30d
                    - 90d
                    - 180d
                    - 365d
                    - 1095d
                    - 1825d
                    - ytd
                    - max
                  example: 30d
                data_ids:
                  type: array
                  description: >
                    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.
                  items:
                    type: string
                  example:
                    - ethereum
                product_ids:
                  type: array
                  description: >
                    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.
                  items:
                    type: string
                  example:
                    - usdc
                asset_ids:
                  type: array
                  description: >
                    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.
                  items:
                    type: string
                chain_ids:
                  type: array
                  description: >
                    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.
                  items:
                    type: string
                  example:
                    - ethereum
                    - base
                market_sector_ids:
                  type: array
                  description: >
                    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.
                  items:
                    type: string
                  example:
                    - blockchains-l1
                    - lending
                reference_asset_ids:
                  type: array
                  description: >
                    List of reference asset IDs to filter by (for example
                    `creditfund`, `sp500`).


                    The filter counterpart of `group_by: reference-asset`: use
                    it to restrict the breakdown to assets tracking a specific
                    price reference. Assets that track no reference asset are
                    excluded.


                    The full list of available reference assets can be retrieved
                    from the `/v2/reference-assets` endpoint.
                  items:
                    type: string
                  example:
                    - creditfund
                venues:
                  type: array
                  description: >
                    List of venues (the protocol and product a metric was earned
                    on) to filter by. Only applies to venue-scoped metrics
                    (`asset_tvl`, `asset_trading_volume`,
                    `asset_notional_trading_volume`) -- distinct from
                    `data_ids`/`product_ids`, which filter by the asset's own
                    issuer or manager.


                    Each entry must specify both `data_id` and `product_id`
                    together -- a `product_id` can never be given without its
                    matching `data_id`.
                  items:
                    type: object
                    required:
                      - data_id
                      - product_id
                    properties:
                      data_id:
                        type: string
                      product_id:
                        type: string
                  example:
                    - data_id: aave
                      product_id: aavev3
                includeSelf:
                  type: boolean
                  description: |
                    Include the asset itself in the breakdown results.

                    If not specified, defaults to `false`.
                  default: false
                start:
                  type: string
                  format: date
                  description: >
                    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`.
                end:
                  type: string
                  format: date
                  description: >
                    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.
                ignore_threshold:
                  type: boolean
                  description: |
                    Ignore metric thresholds when calculating breakdowns.

                    If not specified, defaults to `false`.
                  default: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        asset_id:
                          type: string
                          nullable: true
                          description: Asset ID (present when group_by includes assets).
                        data_id:
                          type: string
                          nullable: true
                          description: >-
                            Project data ID (present when group_by includes
                            projects).
                        product_id:
                          type: string
                          nullable: true
                          description: >-
                            Product ID (present when group_by includes
                            products).
                        chain_id:
                          type: string
                          nullable: true
                          description: Chain ID (present when group_by includes chains).
                        market_sector_id:
                          type: string
                          nullable: true
                          description: >-
                            Market sector ID (present when group_by includes
                            market sectors).
                        reference_asset_id:
                          type: string
                          nullable: true
                          description: >-
                            Reference asset ID, for example `creditfund`
                            (present when group_by is `reference-asset`). Prefer
                            this over `reference_asset` as the stable key -- it
                            is the value the `reference_asset_ids` filter
                            accepts.
                        reference_asset:
                          type: string
                          nullable: true
                          description: >-
                            Reference asset display name, for example `Credit
                            fund` (present when group_by is `reference-asset`).
                            Free-form registry text that can change; use
                            `reference_asset_id` to identify the row.
                        venue_data_id:
                          type: string
                          nullable: true
                          description: >-
                            Venue project data ID -- the protocol a value was
                            earned on (present when group_by is venue). Only
                            non-null for venue-scoped metrics (`asset_tvl`,
                            `asset_trading_volume`,
                            `asset_notional_trading_volume`).
                        venue_product_id:
                          type: string
                          nullable: true
                          description: Venue product ID, paired with venue_data_id.
                        metrics:
                          type: object
                          description: Map of metric IDs to their breakdown data.
                          additionalProperties:
                            type: object
                            properties:
                              latest:
                                type: number
                                description: Latest value for the metric.
                              avg:
                                type: number
                                description: >-
                                  Average value for the metric over the
                                  interval.
                              sum:
                                type: number
                                description: >-
                                  Sum of values for the metric over the
                                  interval.
                              change:
                                type: number
                                nullable: true
                                description: >-
                                  Percentage change compared to the previous
                                  period.
                              trend:
                                type: number
                                nullable: true
                                description: Trend indicator comparing two time windows.
                  errors:
                    type: array
                    items:
                      oneOf:
                        - type: object
                          required:
                            - code
                            - field
                            - value
                          properties:
                            code:
                              type: string
                              enum:
                                - NOT_FOUND
                              description: Error code indicating the entity was not found
                            field:
                              type: string
                              enum:
                                - project_ids
                                - metric_ids
                                - chain_ids
                                - product_ids
                                - market_sector_ids
                              description: >-
                                The request parameter field that contained the
                                invalid value
                            value:
                              type: string
                              description: The invalid ID value that was not found
                          example:
                            code: NOT_FOUND
                            field: project_ids
                            value: invalid-project
                        - type: object
                          required:
                            - code
                            - project_id
                            - metric_id
                          properties:
                            code:
                              type: string
                              enum:
                                - METRIC_NOT_AVAILABLE
                              description: >-
                                Error code indicating the metric is not
                                available for the specified project
                            project_id:
                              type: string
                              description: >-
                                The project ID that does not have the metric
                                available
                            metric_id:
                              type: string
                              description: >-
                                The metric ID that is not available for the
                                project
                          example:
                            code: METRIC_NOT_AVAILABLE
                            project_id: aave
                            metric_id: tvl
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
                  meta:
                    type: object
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: string

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.