getPositions
Fetches all liquidity positions for a given user address on Angstrom.
warning
This method is only available through the data endpoint.
Parameters
Parameter | Type | Description |
---|---|---|
user_address | string | The address of the user |
start_token_id | number | The first position token id to look at |
end_token_id | number | The last position token id to look at (auto CAP at start_token_id + 100) |
pool_id | string? | (optional) Hex string of the PoolId of the pool whose key you wish to filter by |
max_results | number? | (optional) The number of results to return |
block_number | number? | (optional) Block height to fetch the configuration at (defaults to latest) |
Result
Array<UserLiquidityPosition>
— Returns an array of objects, each containing:
Field | Type | Description |
---|---|---|
token_id | string | The ID of the liquidity position |
tick_lower | number | The lower tick boundary of the position |
tick_upper | number | The upper tick boundary of the position |
liquidity | number | The liquidity of the position |
pool_key | object | The PoolKey for the pool |
Request
curl "https://api.data.angstrom.xyz" \
-X POST -H "Content-Type: application/json" -d '
{
"jsonrpc":"2.0",
"id":1,
"method":"angstrom_getPositions",
"params":[
"0xMyAddress"
1,
2
]
}
'