GET
/
lending
/
{protocolId}
/
assets
/
{asset}
Asset Lens
curl --request GET \
  --url https://api.amberdata.com/defi/lending/{protocolId}/assets/{asset} \
  --header 'x-api-key: <api-key>'
{
  "status": 200,
  "title": "OK",
  "description": "Successful request",
  "payload": {
    "metadata": {
      "next": "https://api.amberdata.com/defi/lending/aavev2/assets/WETH?cursor=N4IgDgTg9gLlDGUA2BJAJiAXCAhjgbgKb4BMIANCALY4QDWhMWAdgK5JKUCWz8SraQgEEOAFQg5mAZxzwYXKMwCiRZjClYAZjiRTCleVUIAxKBBpNsAC1Y1mAJUI40OAEZJCFEGi4RCchWYsECEAZQBhLykYWhgAERwYT0wARgA2NJSABgAOFJSAFgBWLNLKQmY0BKSsdMyUkjSC0pbKKS4AL2SQAGYvQSIkKDBCCABZKEEtHT1KTTMLYIArKUUvMBwAc2SUyjMuTZ4dUJiIeMSdjOyAdgBONJaykH3D5h0lSurL%2Bsbmx8ocFI9DB0MEsgAPeBZEh4HA9W6uEgkHqaQg5NBZHBZQhFeAFTQka5ONC3XI9eDXIppeDwMgAXyAA"
    },
    "data": [
      {
        "action": "Withdraw",
        "timestamp": "2022-08-21 11:09:05 000",
        "blockNumber": 15383647,
        "transactionHash": "0xc03a13328450f14094551250865c7e3b3f97ccae37a3cc1079efed098033c2b7",
        "logIndex": 669,
        "assetId": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
        "assetSymbol": "WETH",
        "marketId": "0xb53c1a33016b2dc2ff3653530bff1848a515c8c5",
        "market": "main",
        "amount": 0.4072108498457563,
        "user": "0xe26684de8d5a40a35c3fc15c9328c7f3a523759b",
        "to": "0xe26684de8d5a40a35c3fc15c9328c7f3a523759b"
      }
    ]
  }
}

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 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,
compoundv2,
makerdao
asset
string
default:WETH
required

[Examples] WETH The token symbol

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>

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

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

[Optional] Payload only includes data filtered by the action.<BR>[Examples] UseReserveAsCollateral|Deposit|Withdraw|LiquidationCall|Repay|Borrow|FlashLoan

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

Response

200
application/json

200

The response is of type object.