Close position
Close position
When you withdraw all the liquidity from your position, you can decide whether to close the position. Please note that when closing the position, you must also withdraw all the current position's liquidity, fees, and rewards.
Function input params
Please refer to the original function for specific parameter types.
poolID
: The object id about which pool you want to operation.posID
: The object id about position.minAmountA
: The minimum amount of coin A that a user can acquire.maxAmountB
: The minimum amount of coin B that a user can acquire.
Because of pool price will change, the amount of coin A and coin B will change. So the min_amount_a
and min_amount_a
means no matter how the price moves, the amount quantity that I need to receive at least is typically obtained by adding the amount potentially acquired through calculations to the slippage adjustment.
rewarderCoinTypes
: If these not empty, it will collect rewarders in this position, if you already open the position. You can even determine which types of rewards you want to harvest by specifying the coin types you pass.
Example
Last updated