Transactions

Definition

Our DeFi transactions endpoints provide in-depth views of lending protocols and the way they operate. Depending on the protocol, there are multiple "lenses" available: Protocol, Asset, Wallet, and Governance.


Protocol: Shows what is happening in the protocol as a whole over a fixed period of time. Depending on the lending protocol, this may include but is not limited to:

  • Protocol actions (collateral, deposits, repays, borrows, withdraws, liquidations)
  • Asset IDs, asset symbols, or markets
  • Borrow Rates or Debts
  • Wallet addresses of the user or repayer.

Asset/Pool: Retrieves information about all of the actions that occurred for a specific asset on the protocol within a certain time span. Depending on the lending protocol, this may include but is not limited to:

  • Asset actions (collateral, deposits, repays, borrows, withdraws, liquidations)
  • User
  • Swaps or mints
  • Amount of token(s)

Wallet: Retrieves information about all of the actions taken by a specific wallet/user on the protocol within a certain time span. Depending on the lending protocol, this may include but is not limited to:

  • Wallet actions (collateral, deposits, repays, borrows, withdraws, liquidations)
  • Borrow Rates or Debts
  • Transaction amounts
  • Asset IDs, asset symbols, or markets

Governance: Retrieves information about all of the governance actions that occurred for the protocol within a certain time span. Depending on the lending protocol, this may include but is not limited to:

  • Vote support (true or false)
  • Voting Power
  • User
  • Proposal ID or description

Details

Not every lending protocol has every lens, and different exchanges may use differing terminology. For example, the Asset lens for Aave is the structural equivalent of the Pool lens for Uniswap v2, since Uniswap uses asset pairs (asset_asset) to create a pool.


API Endpoints

[/defi/lending/{protocolId}/protocol]

[/defi/lending/{protocolId}/assets/{asset}]

[/defi/lending/{protocolId}/wallets/{walletAddress}]

[/defi/lending/{protocolId}/governance]


Availability

Our DeFi lens endpoints are available via REST API for historical (time series) data, which goes back to the creation date of the lending protocol.


Frequently Asked Questions

Why are only certain lending protocols supported in the DeFi Lenses?

  • We choose the most active protocols to give lens-level insights on. If there is a popular protocol not available, chances are we are already working on adding it!

Why do different protocols have different lenses offered?

  • Every protocol is different and may use different terminology. Additionally, not all protocols have their own voting token.