> For the complete documentation index, see [llms.txt](https://turbos.gitbook.io/turbos/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://turbos.gitbook.io/turbos/developer-docs/via-sdk/clmm/removeliquidityandburn.md).

# removeLiquidityAndBurn

Remove a specific liquidity that includes follow steps:

1. decrease liquidity
2. collect fees
3. collect rewards
4. final burn

### Signature

`removeLiquidity(options: RemoveLiquidityOptions): Promise<Transaction>`

### Params

```typescript
interface RemoveLiquidityOptions extends DecreaseLiquidityOptions {
  collectAmountA: string | number;
  collectAmountB: string | number;
  rewardAmounts: (string | number)[];
}
```

`DecreaseLiquidityOptions` can be found at page [decreaseLiquidity](/turbos/developer-docs/via-sdk/clmm/decreaseliquidity.md)

### Examples

```typescript
const turbosSdk = new TurbosSdk(Network.testnet, {
  url: 'https://fullnode.testnet.sui.io',
});
const signer = turbosSdk.account.getKeypairFromMnemonics("your mnemonic");
const poolId = '0xb32fb8ec0b447a833066496bd7251d3a2ee57a0a97c54bf4cc945a986235582a';
const pool = await turbosSdk.pool.getPool(poolId);
const positionId =
  '0x3b457840790091866473be5fd0365f988d220b593d3af09040daea1dc7bcdf60';
const position = await turbosSdk.nft.getPositionFields(positionId);
const txb = await turbosSdk.pool.removeLiquidity({
  pool: poolId,
  decreaseLiquidity: position.liquidity,
  nft: positionId,
  amountA: position.tokens_owed_a,
  amountB: position.tokens_owed_b,
  slippage: 3,
  address: signer.toSuiAddress(),
  collectAmountA: MAX_UINT_64.toString(), // The maximum value of u64 can be passed in, so the contract will automatically handle extracting all fees.
  collectAmountB: MAX_UINT_64.toString(),
  rewardAmounts: pool.reward_infos.map(() => MAX_UINT_64.toString()),
  deadline: Date.now() + 60 * 60 * 1000,
});
txb.setSender(signer.toSuiAddress());
const result = await turbosSdk.provider.signAndExecuteTransaction({
  transaction: txb,
  signer,
});
console.log(result);
```

**collectAmountA,collectAmountB,rewardAmounts**

Pass in the desired number to extract, along with the maximum `u64` value, letting the contract automatically handle the extraction process.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://turbos.gitbook.io/turbos/developer-docs/via-sdk/clmm/removeliquidityandburn.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
