Lens - Pool - Uniswap

This API retrieves information about all of the actions that occurred for a specific liquidity pool on the protocol within a certain timespan.

🚧

Time Range Limit

The maximum time range (difference between endDate and startDate) is 60 days.

Understanding Actions in Uniswap

There are many different types of actions in Uniswap, as you'll see in the action property for each item of the payload.data array. The guide below will help you understand the possible actions.

Uniswap v2 ActionsUniswap v3 Actions
SwapSwap
MintMint

Swap (v2)

Within the liquidity pool denoted by poolAddress, the protocol is executing a trade that swaps amount0In of token0 for amount1Out of token1. The recipient of the token1 quantity is denoted by the to address.

Normalized amounts are computed using the decimal count for the respective tokens. In this example, token0 is USDC with 6 decimals. Hence amount0Normalized is amount0 shifted 6 decimals from the right. token1 is WETH with 18 decimals. Hence amount1Normalized is amount1 shifted 18 decimals from the right.

In other words, the address to received 7.1 ETH after swapping 26,823 USDC in Uniswap v2.

{
  "action": "Swap",
  "event": "Swap(index_topic_1 address sender, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out, index_topic_2 address to)",
  "timestamp": "2022-01-03 23:36:52 000",
  "blockNumber": 13935536,
  "transactionHash": "0x0b5a9fd5544757f00ff257c543614653eaa12c2e6d6b7428daf4380125c9de46",
  "logIndex": 6,
  "poolAddress": "0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc",
  "token0": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
  "token1": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
  "sender": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
  "amount0In": "26823361137",
  "amount1In": "0",
  "amount0Out": "0",
  "amount1Out": "7118283966568551127",
  "amount0InNormalized": "26823.361137",
  "amount1InNormalized": "0.0",
  "amount0OutNormalized": "0.0",
  "amount1OutNormalized": "7.118283966568551",
  "to": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57"
}
propertytype
actionstring
eventstring
timestampstring | number
blockNumbernumber
transactionHashstring
logIndexnumber
poolAddressstring
token0string
token1string
senderstring
amount0Instring
amount1Instring
amount0Outstring
amount1Outstring
amount0InNormalizedstring
amount1InNormalizedstring
amount0OutNormalizedstring
amount1OutNormalizedstring
tostring

Mint (v2)

Creates amount0 and amount1 liquidity pool tokens for token0 and token1 because liquidity was provided for the pool at poolAddress.

{
  "action": "Mint",
  "event": "Mint(index_topic_1 address sender, uint256 amount0, uint256 amount1)",
  "timestamp": "2022-01-04 14:54:24 000",
  "blockNumber": 13939620,
  "transactionHash": "0x23e9246ac4035aa48a3ade2702870fca88d7256ecd0f8a17424f92c29628d7aa",
  "logIndex": 411,
  "poolAddress": "0x4cedf45d496e5bc36beda9197b0edc4957d98080",
  "token0": "0x74edaf28fc4b9e6a1618d613839daaf6a9d075db",
  "token1": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
  "sender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
  "amount0": "13987749186848981681050",
  "amount1": "225028717662222390",
  "amount0Normalized": "1.3987749186848982E13",
  "amount1Normalized": "0.22502871766222238"
}

Swap (v3)

Within the liquidity pool denoted by poolAddress, the protocol is executing a trade that swaps amount0 of token0 for amount1 of token1. The recipient of the token1 quantity is denoted by the recipient address.

Note that amount1 is negative. This indicates that amount1 of token1 was removed from the liquidity pool and that at least amount0 of token0 was added, vice-versa if amount0 was negative.

Normalized amounts are computed using the decimal count for the respective tokens. In this example, token1Address is USDC with 6 decimals. Hence amount1Normalized is amount1 shifted 6 decimals from the right. token0Address is DAI with 18 decimals. Hence amount0Normalized is amount0 shifted 18 decimals from the right.

In other words, the address recipient received 2136.125 USDC after swapping 2,136.290 DAI in Uniswap v3.

walletAddress is the initiator of this swap.

{
  "blockNumber": 15066199,
  "transactionHash": "0xa779935b68b544a055d2caae5bcb1a162b0c440e8577320c9f6027a8b689f923",
  "logIndex": 191,
  "timestamp": "2022-07-03 00:07:07 000",
  "factoryAddress": "0x1f98431c8ad98523631ae4a59f267346ea31f984",
  "poolAddress": "0x5777d92f208679db4b9778590fa3cab3ac9e2168",
  "event": "Swap(address indexed sender, address indexed recipient, uint256 amount0, uint256 amount1, uint160 sqrtPriceX96, uint128 liquidity, int24 tick)",
  "action": "Swap",
  "walletAddress": "0x9af79773f619f6d68e35ec8fe62660649b011a90",
  "tick": "-276324",
  "sender": "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45",
  "amount0": "2136290387768991186457",
  "amount1": "-2136125245",
  "liquidity": "3557659723537831479985487",
  "recipient": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
  "sqrtPriceX96": "79229061675456427773788",
  "amount0Normalized": "2136.2903877689911864570",
  "amount1Normalized": "-2136.1252450",
  "token0Address": "0x6b175474e89094c44da98b954eedeac495271d0f",
  "token1Address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
}
propertytype
blockNumbernumber
transactionHashstring
logIndexnumber
timestampstring | number
factoryAddressstring
poolAddressstring
eventstring
actionstring
walletAddressstring
tickstring
senderstring
amount0string
amount1string
liquiditystring
recipientstring
sqrtPriceX96string
amount0Normalizedstring
amount1Normalizedstring
token0Addressstring
token1Addressstring

Mint (v3)

{
  "blockNumber": 13659033,
  "transactionHash": "0x77cc6275f6807fec3159c3fbf5bff8ac025427a419b0a3cbefd4d2f9c7be52d6",
  "logIndex": 125,
  "timestamp": "2021-11-21 15:41:04 000",
  "factoryAddress": "0x1f98431c8ad98523631ae4a59f267346ea31f984",
  "poolAddress": "0x5777d92f208679db4b9778590fa3cab3ac9e2168",
  "event": "Mint(address sender, address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1)",
  "action": "Mint",
  "walletAddress": "0xcaacebe2fdac9d3783563b9b80c714df82705226",
  "owner": "0xc36442b4a4522e871399cd717abdd847ab11fe88",
  "amount": "407110841443516028943",
  "sender": "0xc36442b4a4522e871399cd717abdd847ab11fe88",
  "amount0": "26356922330371906206695",
  "amount1": "34704623518",
  "tickLower": "16500891",
  "tickUpper": "16500894",
  "amount0Normalized": "26356.9223303719062066950",
  "amount1Normalized": "34704.6235180",
  "token0Address": "0x6b175474e89094c44da98b954eedeac495271d0f",
  "token1Address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
}
propertytype
blockNumbernumber
transactionHashstring
logIndexnumber
timestampstring | number
factoryAddressstring
poolAddressstring
eventstring
actionstring
walletAddressstring
ownerstring
amountstring
senderstring
amount0string
amount1string
tickLowerstring
tickUpperstring
amount0Normalizedstring
amount1Normalizedstring
token0Addressstring
token1Addressstring
Language
Authentication
Header
Click Try It! to start a request and see the response here!