Definition

The DeFi transactions endpoints provide detailed views of DEX protocols and their operations. Depending on the protocol, multiple “lenses” are available: Protocol, Pool, and Wallet.
  • Protocol Lens: Displays overall activity in the DEX during a fixed period. Depending on the DEX, this may include but is not limited to:
    • Protocol actions (e.g., pairCreated, poolCreated)
    • Creator address, wallet address, or pool address
    • Token 0 and Token 1 address
    • Transaction hash, block number, and timestamp
  • Pool Lens: Provides information on all actions occurring for a specific pair or pool within a certain time span. Depending on the DEX, this may include but is not limited to:
    • Pool actions (mint, burn, swap, addLiquidity, removeLiquidity)
    • Pool and token addresses
    • Amount In and Amount Out
    • Sender and receiver
  • Wallet Lens: Retrieves details on all actions by a specific wallet or user within a given time span. Depending on the DEX, this may include but is not limited to:
    • Wallet actions (swap, addLiquidity, removeLiquidity, collect)
    • Pool and token addresses
    • Amount In and Amount Out
    • Sender and receiver

Details

Not every DEX is available within the Lens endpoints. The complete list of supported protocols versus supported blockchains can be found here. If a DEX is missing from this list, use the legacy DEX Trades endpoint to gather transaction data for that DEX. However:
  • This legacy endpoint only supports Ethereum DEXs (it is not multi-chain).
  • It only returns swaps, and does not include other transactions such as mints, burns, etc.

API Endpoints

/defi/dex/{protocolId}/protocol /defi/dex/{protocolId}/pools/{poolAddress} /defi/dex/{protocolId}/wallets/{walletAddress} /defi/dex/trades

Availability

The DeFi Lens endpoints are accessible via REST API for historical time-series data, with coverage dating back to the creation of each DEX.

Frequently Asked Questions

Why are only certain DEX protocols supported in the Lens endpoints?
  • The selection prioritizes the most active protocols to provide detailed lens-level insights. Popular protocols not currently available are likely under consideration for inclusion.
Why do different protocols offer different lenses?
  • Protocols vary in structure and terminology, and not all protocols have associated governance or voting tokens.
How is DEX data collected?
  • Data is sourced directly from each protocol by running dedicated nodes and monitoring every event on supported blockchains.
Why is only historical trade data available?
  • DeFi operates post-trade without order books, making only historical trade data applicable.