# Concentrated Pool

### Steps to Integration

There are three steps in removing liquidity: 1) prepare input, 2) approve tokens, 3) conduct remove liquidity. You need to install PiperX sdk and import it to proceed.

<pre class="language-javascript"><code class="lang-javascript"><strong>import { v3RemoveLiquidity, v3PositionManagerApproval } from '@piperx/sdk/src/core'
</strong>import { WIP_ADDRESS } from '@piperx/sdk/src/constant'
</code></pre>

#### Prepare Input

You need the following inputs before you can remove a liquidity&#x20;

```typescript
token1_address: address, // if it is $IP native token, use WIP_ADDRESS
token2_address: address, // if it is $IP native token, use WIP_ADDRESS
tokenId: number // id of the liquidity that you want to remove
liquidity: bigint, // amount of lp token you want to remove to the pool
amount1Min: bigint, // minimal amount of token 1 you want to receive
amount2Min: bigint, // minmial amount of token 2 you want to receive 
expire_time: bigint// expiration timestamp for a swap
signer: ethers.Signer.
```

Note that, when remove $IP token, you should pass in the PiperX wrapped $IP token address, because the $IP token is not a ERC-20 token. For example, if you are removing liquidity from $IP - $USDC pool, please use wrapped $IP address `WIP_ADDRESS.`

#### Remove the liquidity

```typescript
await v3RemoveLiquidity(
    token1_address: string,
    token2_address: string,
    tokenId: number
    liquidity: bigint,
    amount1Min: bigint,
    amount2Min: bigint,
    expire_time: bigint,
    signer
)
```


---

# Agent Instructions: 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:

```
GET https://docs.piperx.xyz/developer/sdks/remove-liquidity/concentrated-pool.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
