hookr_build_remove_liquidity · Build a removal of liquidity
read-onlyBuilds the removal of a share of a position's liquidity to the wallet that owns it, each amount out floored at the pool's price now less the slippage and simulated from the wallet: name tokenId for a position on Uniswap's PositionManager (the whole position burns it, as the positions page does), or poolId for the launch's own position on a pool the wallet launched, which goes through the Launcher's withdraw once its principal lock has ended. Removing is never gated, and it returns ok with the call and its gas, or refused or unknown with the reason and no calls.
Input schema
{
"type": "object",
"properties": {
"wallet": {
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$",
"description": "The wallet that signs and is paid."
},
"tokenId": {
"type": "string",
"pattern": "^[1-9][0-9]{0,77}$",
"description": "A position on Uniswap's PositionManager, by its token id. Name tokenId or poolId, not both."
},
"poolId": {
"type": "string",
"pattern": "^0x[0-9a-fA-F]{64}$",
"description": "A pool the wallet launched through Hookr: its launch's own position, which the Launcher holds for the wallet. Name tokenId or poolId, not both."
},
"percent": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"description": "The share of the position's liquidity to take out, a whole percent (default 100). 100 on a PositionManager position burns it; its fees come out with the principal."
},
"slippageBps": {
"type": "integer",
"minimum": 0,
"maximum": 1000,
"description": "How far below what the pool's price gives now each amount out may land, in basis points (default 50)."
}
},
"required": [
"wallet"
],
"additionalProperties": false
}