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

> Use this endpoint to retrieve historical data for a project. Fill in the required fields on the modal to the right.

This endpoint supports partial success - if some of the requested metric, 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.




## OpenAPI

````yaml /api-reference/openapi.json get /v2/projects/{project_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}/metrics:
    get:
      tags:
        - Projects
      summary: Get historical metrics for a project
      description: >
        Use this endpoint to retrieve historical data for a project. Fill in the
        required fields on the modal to the right.


        This endpoint supports partial success - if some of the requested
        metric, 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.
      parameters:
        - name: project_id
          in: path
          description: |
            ID of the project

            Allows you to select one of the projects available.

            The full list is available on the projects endpoint (see above).
          required: true
          schema:
            type: string
            format: string
        - name: metric_ids
          in: query
          description: >
            List of metrics to include according to projects metric
            availability.


            Allows you to select one or more of the metrics available for a
            specific project. 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 project.
          explode: false
          schema:
            type: array
            items:
              type: string
          example:
            - fees
            - revenue
        - name: chain_ids
          in: query
          description: >
            List of chains to include according to projects chain availability.


            Allows you to select one or more of the chains available for a
            specific project. When including multiple chains, separate each one
            with a comma. Example: `ethereum,base`.


            The full list of available chains can be retrieved from the
            projects/:project_id endpoint.
          explode: false
          schema:
            type: array
            items:
              type: string
          example:
            - ethereum
            - base
        - name: product_ids
          in: query
          description: >
            List of products to include according to projects product
            availability.


            Allows you to select one or more of the products available for a
            specific project. When including multiple products, separate each
            one with a comma. Example: `usdc,usdt`.


            The full list of available products can be retrieved from the
            projects endpoint.
          explode: false
          schema:
            type: array
            items:
              type: string
          example:
            - usdc
            - usdt
        - name: market_sector_ids
          in: query
          description: >
            List of market sector IDs to filter projects by.


            Allows you to select one or more market sectors to filter the
            results. Only projects belonging to any of the specified market
            sectors will be included. When including multiple market sectors,
            separate each one with a comma. Example: `blockchains-l1,lending`.


            The full list of available market sectors can be retrieved from the
            `/v2/market-sectors` endpoint.
          explode: false
          schema:
            type: array
            items:
              type: string
          example:
            - blockchains-l1
            - lending
        - name: aggregate_by
          in: query
          description: >
            Level of granularity


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


            However, it's important to note that this level of granularity is
            not applicable to all metrics. For example, while it is possible to
            segment the fees metric by chain, the price metric cannot be
            aggregated in this manner.


            The availability of granularity options varies between projects.
            Attempting to apply an inappropriate level of granularity to a
            project 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
          example: chain
        - name: start
          in: query
          schema:
            type: string
            format: date
          description: >
            Start date

            Allows you to select the start date for the query. If no start is
            selected, the query defaults to launch date or the first date for
            which there is data available for the chosen metric(s).
        - name: end
          in: query
          schema:
            type: string
            format: date
          description: >
            End date


            Allows you to select the end date for the query. If no end is
            selected, the query defaults to the latest date for which there is
            data available for the chosen metric(s).
        - name: order_direction
          description: >
            Timestamp ordering


            Allows you to define how the response is sorted. The response is
            always sorted by timestamp, and by selecting `desc` the response
            starts from the most recent entry, and vice versa for `asc`.


            If no order_direction is selected, the response defaults to `desc`.
          in: query
          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:
                        timestamp:
                          type: string
                          description: Returns the historical date for a given metric(s).
                        project_name:
                          type: string
                          description: >-
                            Returns the project name used on the web
                            application.
                        project_id:
                          type: string
                          description: Returns the project ID.
                        chain:
                          type: string
                          description: |
                            Returns the chosen metric(s) per chain.

                            Has to be selected from the aggregate_by parameter.
                        business_line:
                          type: string
                          description: |
                            Returns the chosen metric(s) per business line.

                            Has to be selected from the aggregate_by parameter.
                        version:
                          type: string
                          description: |
                            Returns the chosen metric(s) per version.

                            Has to be selected from the aggregate_by parameter.
                        metric_id(s):
                          type: string
                          description: >
                            Returns the chosen metric(s) for the project.


                            The full list of available metrics can be retrieved
                            from the projects/:project_id endpoint (see above).


                            The metric_id(s) have to be selected from the
                            metric_ids parameter.
                  errors:
                    type: array
                    description: >
                      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.
                    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
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: string

````