Remove from Specific Bins
Selectively withdraw liquidity from individual bins while maintaining positions in others. Perfect for rebalancing, profit-taking, or adjusting your range.
Prerequisites
Position ID with active liquidity
List of bin IDs to remove from
Understanding of current bin distribution
Gas for transaction execution
Basic Usage
const pair = await sdk.Pair.getPair(pairAddress);
// Remove from specific bins only
const tx = await sdk.Pair.removeLiquidity(pair, {
positionId: "0x123...abc",
binIds: [8388606, 8388607, 8388609] // Selected bins
});
await sdk.fullClient.signAndExecuteTransaction({
transaction: tx,
signer: keypair
});Method Parameters
Common Strategies
Remove Out-of-Range Bins
Harvest High-Fee Bins
Rebalance Toward Active Price
What Happens
Liquidity Burned: Your shares in selected bins are burned
Tokens Returned: Receive proportional reserves + fees
Position Updated: Remaining bins stay untouched
Fees Collected: Accumulated fees automatically included
Calculate Before Removing
Gas Optimization
Important Notes
Cannot remove from bins without liquidity
Fees are included automatically
Position NFT remains active
Can add back to same bins later
Related Topics
Remove All Liquidity - Complete withdrawal
Get Position Bins - Check bins first
Calculate Output Amounts - Preview returns
Last updated