Transactions
Definition
Our DeFi transactions endpoints provide in-depth views of DEX protocols and the way they operate. Depending on the protocol, there are multiple "lenses" available: Protocol, Pool, and Wallet.
Protocol Lens: Shows what is happening in the DEX as a whole over a fixed period of time. Depending on the DEX, this may include but is not limited to:
- Protocol actions (pairCreated, poolCreated)
- Creator address, wallet address, or pool address
- Token 0 and Token 1 address
- Transaction hash, Block Number and Timestamp
Pool Lens: Retrieves information about all of the actions that occurred for a specific pair/pool on the DEX 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 information about all of the actions taken by a specific wallet/user on the DEX within a certain 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. However, the complete list of supported protocols versus supported blockchains can be found here. If there is a DEX missing from this list, you could use our legacy DEX Trades endpoint to gather transaction data for that DEX. However, this endpoint only supports Ethereum DEX's (it is not multi-chain) and only returns Swaps (it 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/trades/{pool}/historical/]
Availability
Our DeFi Lens endpoints are available via REST API for historical (time series) data, which goes back to the creation date of the DEX.
Frequently Asked Questions
Why are only certain DEX protocols supported in the Lens endpoints?
- 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.
How do you collect/extract DEX data?
- We pull all of our DEX data directly from the protocol. This is because we run our own nodes and listen to every event on every chain we support.
Why is there only historical trade data?
- Everything in DeFi is post-trade as there are no order books.
Updated about 1 year ago