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

# Lending Protocol Summary Metrics

> This API provides aggregated insights into the lending protocols.



## OpenAPI

````yaml get /lending/{protocolId}/metrics/summary
openapi: 3.1.0
info:
  title: Defi API
  version: '2'
servers:
  - url: https://api.amberdata.com/defi
security:
  - sec0: []
paths:
  /lending/{protocolId}/metrics/summary:
    get:
      summary: Lending Protocol Summary Metrics
      description: This API provides aggregated insights into the lending protocols.
      operationId: lending-protocol-metrics-summary
      parameters:
        - name: protocolId
          in: path
          schema:
            type: string
            enum:
              - aavev2
              - aavev3
              - makerdao
              - compoundv2
            default: aavev3
          required: true
        - name: startDate
          in: query
          description: >-
            **[Optional]** Payload only includes data after this date
            (inclusive).<BR>**[Formats]** `seconds | milliseconds |
            iso8601`<BR>**[Examples]** `1578531600 | 1578531600000 |
            2020-09-01T01:00:00`
          schema:
            type: string
            format: date-time
        - name: endDate
          in: query
          description: >-
            **[Optional]** Payload only includes data before this date
            (exclusive).<BR>**[Formats]** `seconds | milliseconds |
            iso8601`<BR>**[Examples]** `1578531600 | 1578531600000 |
            2020-09-01T01:00:00`
          schema:
            type: string
            format: date-time
        - name: timeFormat
          in: query
          description: '**[Optional]** Time format of the timestamps in the return payload.'
          schema:
            type: string
            enum:
              - milliseconds
              - ms
              - iso
              - iso8601
              - hr
              - human_readable
            default: hr
        - name: x-amberdata-blockchain-id
          in: header
          description: >-
            **[Optional]** The id of the blockchain for which you want data
            from. Defaults to `ethereum-mainnet` if not specified. Use the
            [Information
            Protocols](https://docs.amberdata.io/reference/defi-lending-information-protocols)
            API to view the supported protocol and blockchain id combinations.
          schema:
            type: string
            enum:
              - ethereum-mainnet
              - polygon-mainnet
              - avalanche-mainnet
              - arbitrum-mainnet
              - optimism-mainnet
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 200
                  title:
                    type: string
                    example: OK
                  description:
                    type: string
                    example: Successful request
                  payload:
                    type: object
                    properties:
                      data:
                        type: object
                        properties:
                          metrics:
                            type: array
                            items:
                              type: object
                              properties:
                                timestamp:
                                  type: string
                                  example: 2023-04-15 23:59:59 999
                                totalDepositedUSD:
                                  type: number
                                  example: 6222493181.885701
                                totalBorrowedUSD:
                                  type: number
                                  example: 1823899948.8358312
                                cumulativeLiquidatedUSD:
                                  type: number
                                  example: 1191296637.9286466
                                cumulativeProtocolRevenueUSD:
                                  type: number
                                  example: 37393417.20677932
                                cumulativeInterestAccumulatedUSD:
                                  type: number
                                  example: 306905185.2241058
                                intervalProtocolRevenueUSD:
                                  type: number
                                  example: 19426.00786467653
                                intervalInterestAccumulatedUSD:
                                  type: number
                                  example: 129690.42546114429
                                intervalNumberOfDeposits:
                                  type: integer
                                  example: 194
                                intervalNumberOfWithdraws:
                                  type: integer
                                  example: 167
                                intervalNumberOfRepays:
                                  type: integer
                                  example: 84
                                intervalNumberOfBorrows:
                                  type: integer
                                  example: 135
                                intervalNumberOfLiquidations:
                                  type: integer
                                  example: 0
                                intervalNumberOfUsers:
                                  type: integer
                                  example: 184
                                intervalDepositedUSD:
                                  type: number
                                  example: 76866301.15099154
                                intervalWithdrawnUSD:
                                  type: number
                                  example: 54899588.095887944
                                intervalRepaidUSD:
                                  type: number
                                  example: 27420866.29421422
                                intervalBorrowedUSD:
                                  type: number
                                  example: 30527102.567837324
                                intervalLiquidatedUSD:
                                  type: number
                                  example: 0
                                intervalFlashLoanedUSD:
                                  type: number
                                  example: 4162717.1348569775
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      x-default: API_KEY
      name: x-api-key

````