Retrieves a liquidity provider’s return in a time interval including fees earned, impermanent loss and related metadata.
Protocols Supported
This endpoint only supports Uniswap v2.
Blockchains Supported
This endpoint only supports data from
ethereum-mainnet
.
Not specifying startDate and endDate
If the startDate and endDate query parameters are not provided, the API will return a 404 error as these are required parameters in order to retrieve the data.
Time Range Limit
The maximum time range (difference between endDate and startDate) is 731 days (2 years).
Potential Use-Cases
You can use the historical data for a liquidity provider’s return by plotting the day-to-day changes in impermanent loss in order to understand how their provided assets have performed over time. A visual representation is easy to digest/understand and quickly identify trends, spikes and patterns. For example, if impermanent loss seems to spike at certain times of the year, it might be tied to broader market movements or specific events.
Sample Visualization
The responses from this endpoint can be visualized like this
Response Data
Field | Type | Description |
---|---|---|
payload.data[index].protocol | string | The name of the protocol, i.e. "uniswapv2". |
payload.data[index].start | string | Timestamp start of the query interval. |
payload.data[index].end | string | Timestamp end of the query interval. |
payload.data[index].poolAddress | string | The address of the token, i.e. the address of the pair or liquidity pool. |
payload.data[index].holderAddress | string | The address of the token holder, i.e. the address of the liquidity provider. |
payload.data[index].token0Address | string | The address of token0, i.e. the first token in the pool. |
payload.data[index].token1Address | string | The address of token1, i.e. the second token in the pool. |
payload.data[index].token0IfHeld | string | How many units of token0 the liquidity provider holds at the end of the query interval if they simply held them in his wallet instead of providing liquidity. |
payload.data[index].token1IfHeld | string | How many units of token1 the liquidity provider holds at the end of the query interval if they simply held them in his wallet instead of providing liquidity. |
payload.data[index].token0Lp | string | How many units of token0 the liquidity provider holds at the end of the query interval. |
payload.data[index].token1Lp | string | how many units of token1 the liquidity provider holds at the end of the query interval. |
payload.data[index].change0 | string | The difference between tokens0Lp and Tokens0IfHeld less fees. change0 = tokens0IfHeld - (tokens0Lp - fees0Total) |
payload.data[index].change1 | string | The difference between tokens1Lp and Tokens1IfHeld less fees. change1 = tokens1IfHeld - (tokens1Lp - fees1Total) |
payload.data[index].fees0Total | string | Total units of token0 fees earned. fees0Total = fees0Unclaimed + fees0Claimed. |
payload.data[index].fees1Total | string | Total units of token1 fees earned. fees1Total = fees1Unclaimed + fees1Claimed. |
payload.data[index].fees0Unclaimed | string | Total units of token0 fees the liquidity provider has claimed and removed from the pool. |
payload.data[index].fees1Unclaimed | string | Total units of token1 the liquidity provider has claimed and removed from the pool. |
payload.data[index].fees0Claimed | string | Total units of token0 fees the liquidity provider has removed from the pool. |
payload.data[index].fees1Claimed | string | Total units of token1 fees the liquidity provider has claimed and removed from the pool. |
payload.data[index].positionOpen | boolean | Indicates if the LP's liquidity position is still active i.e. the LP has not burned ALL of their liquidity. |
payload.data[index].fees | number | Total fees earned in USD. fees = feesClaimed + feesUnclaimed. |
payload.data[index].feesClaimed | number | Total fees claimed in USD. |
payload.data[index].feesUnclaimed | number | Total fees unclaimed in USD. |
payload.data[index].impermanentLoss | number | Loss as a result of providing liquidity in USD. |
payload.data[index].return | number | Return in USD. |