> ## 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.

# Get historical metrics for a specific product of a project

> Use this endpoint to retrieve historical metrics data for a specific product within a project.

This endpoint supports partial success - if some of the requested metric or chain IDs are not found, the endpoint will return data for the valid entities and include an `errors` array with details about the invalid ones.




## OpenAPI

````yaml /api-reference/openapi.json get /v2/projects/{project_id}/products/{product_id}/metrics
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/projects/{project_id}/products/{product_id}/metrics:
    get:
      tags:
        - Projects
      summary: Get historical metrics for a specific product of a project
      description: >
        Use this endpoint to retrieve historical metrics data for a specific
        product within a project.


        This endpoint supports partial success - if some of the requested metric
        or chain IDs are not found, the endpoint will return data for the valid
        entities and include an `errors` array with details about the invalid
        ones.
      parameters:
        - name: project_id
          in: path
          description: ID of the project
          required: true
          schema:
            type: string
        - name: product_id
          in: path
          description: ID of the product
          required: true
          schema:
            type: string
        - name: metric_ids
          in: query
          description: >
            List of metrics to include according to product metric availability.


            Allows you to select one or more of the metrics available for a
            specific product. When including multiple metrics, separate each one
            with a comma. Example: `fees,revenue`.


            If no metric_id is selected, the query defaults to returning all
            available metrics for the product.
          explode: false
          schema:
            type: array
            items:
              type: string
          example:
            - fees
            - revenue
        - name: chain_ids
          in: query
          description: >
            List of chains to include


            Allow selection of one or more chains to include in the data,
            particularly for metrics where chain-level granularity is available.
            When selecting multiple chains, separate each with a comma. Example:
            `ethereum,arbitrum`.


            If no chain_id is provided, available chains for the product and
            metric will be used in the response.
          explode: false
          schema:
            type: array
            items:
              type: string
        - name: start
          in: query
          description: >
            Start date for data


            Set the beginning date for the data to be returned. Format:
            YYYY-MM-DD.


            If no start date is provided, all historical data will be included
            from the earliest available date.
          schema:
            type: string
            format: date
        - name: end
          in: query
          description: >
            End date for data


            Set the ending date for the data to be returned. Format: YYYY-MM-DD.


            If no end date is provided, data up to the current date will be
            included.
          schema:
            type: string
            format: date
        - name: aggregate_by
          in: query
          description: >
            Level of granularity


            This feature enables more detailed queries of specific metrics. For
            instance, you can examine a product's revenue by individual chain.


            The availability of granularity options varies between products.
            Attempting to apply an inappropriate level of granularity to a
            product will result in an empty result set.


            Can be combined without `metric_ids` to return all available metrics
            with the chosen breakdown.
          schema:
            type: string
            enum:
              - chain
              - product_id
        - name: order_direction
          in: query
          description: |
            Order direction for the results

            Sort the results in ascending or descending order based on date.
          schema:
            type: string
            default: desc
            enum:
              - asc
              - desc
        - name: assets_bridged
          in: query
          description: >
            Include bridged assets in asset metrics


            Controls whether bridged asset values are included when calculating
            asset-related metrics (e.g. `asset_market_cap_circulating`,
            `asset_transfer_volume`). Set to `false` to exclude bridged assets
            and only count native asset values.


            Defaults to `true`.
          schema:
            type: boolean
            default: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        metric_id:
                          type: string
                          description: Identifier for the metric
                        date:
                          type: string
                          description: Date for this data point
                        value:
                          type: number
                          description: Value of the metric for the given date
                        chain_id:
                          type: string
                          description: Chain identifier (when aggregated by chain)
                  errors:
                    type: array
                    description: >
                      Optional array of errors that occurred during request
                      processing. Only present if some requested entities were
                      invalid.


                      The endpoint returns data for valid entities even when
                      errors are present, allowing partial success.
                    items:
                      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
        '400':
          description: Invalid input
        '404':
          description: Product not found
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: string

````