You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.
The Uniswap SDK is not clear about which interface and function to use to query a user's liquidity position such as the one shown by the front-end UI. Attaching a snapshot from the UI showing my liquidity position on the Ropsten network:
The text was updated successfully, but these errors were encountered:
This SDK is not able to query liquidity positions. You can indeed use the V2 and V3 subgraphs for that.
To get all positions for a specific address, just define the user for V2:
{
liquidityPositions(where: {user: "0x2e0647b90c3823a8c881de287ae2bd400489eea0"}) {
id
liquidityTokenBalance
}
}
and the owner in V3:
{
positions(where: {owner: "0x50ec05ade8280758e2077fcbc08d878d4aef79c3"}) {
id
liquidity
depositedToken0
depositedToken1
token0 {
name
}
token1 {
name
}
}
}
in the where clause.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The Uniswap SDK is not clear about which interface and function to use to query a user's liquidity position such as the one shown by the front-end UI. Attaching a snapshot from the UI showing my liquidity position on the Ropsten network:
The text was updated successfully, but these errors were encountered: