GET
/
lending
/
{protocolId}
/
assets
/
{assetId}
/
metrics
/
summary
Lending Asset Summary Metrics
curl --request GET \
  --url https://api.amberdata.com/defi/lending/{protocolId}/assets/{assetId}/metrics/summary \
  --header 'x-api-key: <api-key>'
{
  "status": 200,
  "title": "OK",
  "description": "Successful request",
  "payload": {
    "data": {
      "metrics": [
        {
          "timestamp": "2023-01-27 23:59:59 999",
          "totalDepositedUSD": 798407.1054579312,
          "totalBorrowedUSD": 693408.5213470148,
          "cumulativeLiquidatedUSD": 0,
          "intervalDepositedUSD": 802410.1450574565,
          "intervalWithdrawnUSD": 4025.045964467924,
          "intervalRepaidUSD": 28431.264610794253,
          "intervalBorrowedUSD": 721813.6375024171,
          "intervalLiquidatedUSD": 0,
          "intervalFlashLoanedUSD": 0
        }
      ]
    }
  }
}

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,
avalanche-mainnet,
arbitrum-mainnet,
optimism-mainnet

Path Parameters

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

[Examples] USDC | WETH. The requested asset must exist on the specified protocol.

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
market
string

[Optional] Applies only when protocolId = makerdao. Get only the aggregate data for the specific asset market.

Response

200 - application/json

200

The response is of type object.