GET
/
lending
/
{protocolId}
/
metrics
/
summary
Lending Protocol Summary Metrics
curl --request GET \
  --url https://api.amberdata.com/defi/lending/{protocolId}/metrics/summary \
  --header 'x-api-key: <api-key>'
{
  "status": 200,
  "title": "OK",
  "description": "Successful request",
  "payload": {
    "data": {
      "metrics": [
        {
          "timestamp": "2023-04-15 23:59:59 999",
          "totalDepositedUSD": 6222493181.885701,
          "totalBorrowedUSD": 1823899948.8358312,
          "cumulativeLiquidatedUSD": 1191296637.9286466,
          "cumulativeProtocolRevenueUSD": 37393417.20677932,
          "cumulativeInterestAccumulatedUSD": 306905185.2241058,
          "intervalProtocolRevenueUSD": 19426.00786467653,
          "intervalInterestAccumulatedUSD": 129690.42546114429,
          "intervalNumberOfDeposits": 194,
          "intervalNumberOfWithdraws": 167,
          "intervalNumberOfRepays": 84,
          "intervalNumberOfBorrows": 135,
          "intervalNumberOfLiquidations": 0,
          "intervalNumberOfUsers": 184,
          "intervalDepositedUSD": 76866301.15099154,
          "intervalWithdrawnUSD": 54899588.095887944,
          "intervalRepaidUSD": 27420866.29421422,
          "intervalBorrowedUSD": 30527102.567837324,
          "intervalLiquidatedUSD": 0,
          "intervalFlashLoanedUSD": 4162717.1348569775
        }
      ]
    }
  }
}

Authorizations

x-api-key
string
header
default:API_KEY
required

Headers

x-amberdata-blockchain-id
enum<string>

[Optional] The id of the blockchain for which you want data from. Defaults to ethereum-mainnet if not specified. Use the Information Protocols API to view the supported protocol and blockchain id combinations.

Available options:
ethereum-mainnet,
polygon-mainnet,
avalanche-mainnet,
arbitrum-mainnet,
optimism-mainnet

Path Parameters

protocolId
enum<string>
default:aavev3
required
Available options:
aavev2,
aavev3,
makerdao,
compoundv2

Query Parameters

startDate
string<date-time>

[Optional] Payload only includes data after this date (inclusive).<BR>[Formats] seconds | milliseconds | iso8601<BR>[Examples] 1578531600 | 1578531600000 | 2020-09-01T01:00:00

endDate
string<date-time>

[Optional] Payload only includes data before this date (exclusive).<BR>[Formats] seconds | milliseconds | iso8601<BR>[Examples] 1578531600 | 1578531600000 | 2020-09-01T01:00:00

timeFormat
enum<string>
default:hr

[Optional] Time format of the timestamps in the return payload.

Available options:
milliseconds,
ms,
iso,
iso8601,
hr,
human_readable

Response

200 - application/json

200

The response is of type object.