GET
/
lending
/
{protocolId}
/
protocol
Protocol Lens
curl --request GET \
  --url https://api.amberdata.com/defi/lending/{protocolId}/protocol \
  --header 'x-api-key: <api-key>'
{
  "status": 200,
  "title": "OK",
  "description": "Successful request",
  "payload": {
    "metadata": {
      "next": "https://api.amberdata.com/defi/lending/aavev2/protocol?cursor=N4IgDgTg9gLlDGUA2BJAJiAXCAhjgbgKb4BMIANCAJYB28SArmoQIJJIAqEONAzjvBhUoNAKJEaMXlgBmOJL0KUhAW0IAxKBBU4YWEAAsGOmgCVCONDgBGSQhRBoqEQoOE19LAMoBhB7xgcCBgAEV17TABGADZoyIAGAHYATkSSaPjMykIaNDCYCJi4yPSAFkyKyl4qAC8IkABmB2YiJCgwQggAWShmWXlFShktHT1sACteEQcwHABzQsotKjnaeS9A4PzC2ISUjIr4pYgVtaRRXO2sIsiS6PLDgF8gA"
    },
    "data": [
      {
        "action": "UseReserveAsCollateral",
        "timestamp": "2022-08-21 11:00:03 000",
        "blockNumber": 15383603,
        "transactionHash": "0x0bee33572d60aaf827adb727c0db3fc72f78c7c80257c69bafa37c180907666d",
        "logIndex": 529,
        "assetId": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84",
        "assetSymbol": "STETH",
        "marketId": "0xb53c1a33016b2dc2ff3653530bff1848a515c8c5",
        "market": "main",
        "reserveAsCollateralEnabled": true,
        "user": "0xb9428f4e0c0c104f89dfd1fd3f4ca89549666666"
      }
    ]
  }
}

Authorizations

x-api-key
string
header
default:API_KEY
required

Headers

x-amberdata-blockchain-id
enum<string>
default:polygon-mainnet

[Optional] The id of the blockchain for which you want protocol 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:aavev2
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

size
integer

[Optional] Number of records per page. If not specified, the API will default to and try to return 1000 actions under payload.data.

direction
enum<string>

[Optional] The order in which to return the results (ascending or descending). By default. records are returned in ascending order, so the oldest records are returned first.

Available options:
asc,
desc
timeFormat
enum<string>
Available options:
milliseconds,
ms,
iso,
iso8601,
hr,
human_readable
action
enum<string>

[Optional] Payload only includes data filtered by the action.

Available options:
Deposit,
Withdraw,
LiquidationCall,
Repay,
Borrow,
FlashLoan

Response

200 - application/json

200

The response is of type object.