> ## 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 an asset

> Use this endpoint to retrieve historical data for an asset.

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/assets/{asset_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/assets/{asset_id}/metrics:
    get:
      tags:
        - Assets
      summary: Get historical metrics for an asset
      description: >
        Use this endpoint to retrieve historical data for an asset.


        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: 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
        - name: metric_id
          in: query
          description: >
            Metric to include according to asset metric availability.


            Allows you to select one of the metrics available for a specific
            asset.


            If no metric_id is selected, the query defaults to `asset_price`.
          schema:
            type: string
          example: asset_price
        - name: chain_ids
          in: query
          description: >
            List of chains to include according to asset chain availability.


            Allows you to select one or more of the chains available for a
            specific asset. When including multiple chains, separate each one
            with a comma. Example: `ethereum,base`.
          explode: false
          schema:
            type: array
            items:
              type: string
          example:
            - ethereum
            - base
        - name: product_ids
          in: query
          description: >
            List of products to include according to asset product availability.


            Allows you to select one or more of the products available for a
            specific asset. When including multiple products, separate each one
            with a comma. Example: `usdc,usdt`.
          explode: false
          schema:
            type: array
            items:
              type: string
          example:
            - usdc
            - usdt
        - 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.
        - 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.
        - name: aggregate_by
          in: query
          description: >
            Level of granularity


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


            However, it's important to note that this level of granularity is
            not applicable to all metrics.
          explode: false
          schema:
            type: array
            items:
              type: string
          example:
            - chain
        - 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: interval
          in: query
          description: >
            Time interval for data aggregation.


            Intervals are `24h`, `7d`, `30d`, `90d`, `180d`, `365d`, `max`,
            `ytd`, `4fullq`, or a number representing days.
          schema:
            oneOf:
              - type: string
                enum:
                  - 24h
                  - 7d
                  - 30d
                  - 90d
                  - 180d
                  - 365d
                  - max
                  - ytd
                  - 4fullq
              - type: integer
      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.
                        asset_id:
                          type: string
                          description: Returns the asset ID.
                        metric_id:
                          type: string
                          description: Returns the chosen metric for the asset.
                        value:
                          type: string
                          description: Returns the value of the chosen metric.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: string

````