# Liquidity Pool

> Inspect, burn or reclaim the pool liquidity a launch holds on Uniswap (EVM) and Meteora DAMM (Solana) launches.

On Uniswap V2, V3 and V4 launches (EVM chains), the dev wallet receives the pool liquidity: LP tokens on V2, a position NFT on V3 and V4. These endpoints read that holding, lock it for good, or pull the token and native back to the dev wallet. Other EVM platforms lock or burn liquidity themselves and answer `400`.

On Solana, the same routes manage the position a Meteora DAMM launch opened, with different response fields (see each endpoint's notes). Other Solana platforms answer `400`. The web app only uses these endpoints on Uniswap launches.

Base URL: `https://api-mig.proxima.tools`

## Endpoints

- `GET /launch/lp/info/{launch_id}`: Retrieve LP info
- `POST /launch/lp/burn/{launch_id}`: Burn LP
- `POST /launch/lp/reclaim/{launch_id}`: Reclaim LP

## The LP info object

The dev wallet's liquidity in the launch's Uniswap pool and what it would redeem. Amounts are raw units (wei for the native side), as decimal strings. On Uniswap V3 and V4, `lp_balance` is the position's liquidity and `lp_total_supply` the pool's active liquidity.

- `ok` (boolean): Always `true`.
- `pair` (string): V2 pair address. On V3, the pool address, or the zero address when no pool is found. On V4, the Uniswap V4 PositionManager address.
- `lp_balance` (string): LP held by the dev wallet.
- `lp_total_supply` (string): Total LP supply of the pair.
- `token_reserve` (string): Token reserve of the pool.
- `native_reserve` (string): Native reserve of the pool.
- `token_redeemable` (string): Tokens the dev's LP would redeem.
- `native_redeemable` (string): Native the dev's LP would redeem.

```json
{
  "ok": true,
  "pair": "0x5e1f7a2b9c4d8e3f6a0b1c7d2e9f4a8b3c6d5e1f",
  "lp_balance": "14142135623730950488",
  "lp_total_supply": "14142135623730951488",
  "token_reserve": "800000000000000000000000000",
  "native_reserve": "2500000000000000000",
  "token_redeemable": "799999999999943431000000000",
  "native_redeemable": "2499999999999823223"
}
```

### Retrieve LP info

`GET /launch/lp/info/{launch_id}`

Returns the dev wallet's liquidity in the launch's pool and what it would redeem. (Bearer JWT)

- Token: Upgraded session token, bound to a license.
- Read-only tokens: allowed.
- Retry: Safe to retry.

> On Uniswap V4 the response also carries `token_id`, the position NFT ID.

> On Solana (Meteora DAMM launches) the response has another shape: `pool`, `position_nft_mint`, `unlocked_liquidity`, `permanent_locked_liquidity`, `token_reserve`, `native_reserve`, `fees_token` and `fees_native`, all strings except `ok`.

#### Path parameters

- `launch_id` (string, required): Launch ID: the 15-digit chain-encoded ID. Its first three digits name the chain (`101` Solana, `201` BSC, `202` Base, `204` Ethereum).

#### Returns 200 OK

Returns an LP info object.

- `ok` (boolean): Always `true`.
- `pair` (string): V2 pair address. On V3, the pool address, or the zero address when no pool is found. On V4, the Uniswap V4 PositionManager address.
- `lp_balance` (string): LP held by the dev wallet.
- `lp_total_supply` (string): Total LP supply of the pair.
- `token_reserve` (string): Token reserve of the pool.
- `native_reserve` (string): Native reserve of the pool.
- `token_redeemable` (string): Tokens the dev's LP would redeem.
- `native_redeemable` (string): Native the dev's LP would redeem.

#### Errors

| Status | Code | Message | When | What to do |
| --- | --- | --- | --- | --- |
| 400 | `bad_request` | `invalid launch id format` | `launch_id` is not a chain-encoded launch ID. | Pass the 15-digit chain-encoded launch ID exactly as the API returned it. |
| 404 | `not_found` | `launch not found` | No launch with this ID belongs to the license in your token. | Check the launch ID and that your token is upgraded onto the license that owns the launch. |
| 400 | `bad_request` | `token not launched` | EVM: the launch is still a draft (imported launches pass). | Launch the token with [Launch a token](/reference/launch-execution/#launch) first. |
| 400 | `bad_request` | `LP reclaim/burn is only available for uniswap v2/v3/v4 launches; <platform> manages liquidity at the platform level` | EVM: the launch is not on Uniswap V2, V3 or V4; its platform adds and locks the liquidity itself. | Use these endpoints only on Uniswap V2, V3 and V4 launches; there is no liquidity to manage on other EVM platforms. |
| 400 | `bad_request` | `dev wallet is watched, cannot sign` | EVM: the launch's dev wallet is a watch-only wallet, so Proxima cannot sign for it. | Use a launch whose dev wallet Proxima holds the key for. |
| 400 | `bad_request` | `uniswap v2 pair not yet created` | Uniswap V2: the token has no pair against the wrapped native token yet. | Retry once trading has opened on Uniswap V2. |
| 400 | `bad_request` | `dev holds no uniswap v3 position for this token` | Uniswap V3: the dev wallet holds no position for this token, for example after a burn or a reclaim. | Treat the liquidity as already burned, reclaimed or moved out of the dev wallet; there is nothing left to manage. |
| 400 | `bad_request` | `this launch's liquidity position is held by <owner>, not by the dev wallet` | Uniswap V4: the position NFT is no longer in the dev wallet; after [Burn LP](/reference/liquidity/#burn-lp) it is held by `0x…dEaD`. | Treat the liquidity as burned if `<owner>` is the dead address; otherwise move the position back to the dev wallet. |
| 400 | `bad_request` | `this launch's liquidity position no longer exists` | Uniswap V4: the position was closed, for example by [Reclaim LP](/reference/liquidity/#reclaim-lp). | Treat the liquidity as reclaimed; there is nothing left to manage. |
| 400 | `bad_request` | `no uniswap v4 liquidity position was minted to this launch's dev wallet` | Uniswap V4: no position mint to the dev wallet was found after the token's creation block. | Check that trading was opened from this launch's dev wallet; there is no position for Proxima to manage. |
| 422 | `upstream_failure` | `evm_rpc api issue: v4 position read: <error>` | Uniswap V4: an RPC read failed. `message` names the read (`v4 position read`, `v4 position search`, `v4 pool read`, `v4 pool reserves`, `v4 position fees`); the body adds `service: "evm_rpc"`. | Retry in a few seconds. |
| 400 | `bad_request` | `lp management is only available on meteoradamm launches` | Solana: the launch is not a Meteora DAMM launch. | On Solana, use these endpoints only for Meteora DAMM launches. |
| 400 | `bad_request` | `launch is not deployed yet` | Solana: the launch is still a draft. | Launch the token with [Launch a token](/reference/launch-execution/#launch) first. |
| 400 | `bad_request` | `this launch holds no position (imported pools are not ours)` | Solana: the launch has no position Proxima opened, as with an imported pool. | Manage the pool from the wallet that created it; Proxima only manages positions it opened. |
| 404 | `not_found` | `position account not found on-chain` | Solana: the position account no longer exists on-chain; a reclaim that withdrew everything closes it. | Treat the liquidity as reclaimed; there is nothing left to manage. |
| 422 | `upstream_failure` | `rpc api issue: Failed to fetch position account` | Solana: reading the position or the pool from the RPC failed. The body adds `service: "rpc"`. | Retry in a few seconds. |

#### Example request

```bash
curl "https://api-mig.proxima.tools/launch/lp/info/202000000000318" \
  -H "Authorization: Bearer $PROXIMA_JWT"
```

#### Example response

```json
{
  "ok": true,
  "pair": "0x5e1f7a2b9c4d8e3f6a0b1c7d2e9f4a8b3c6d5e1f",
  "lp_balance": "14142135623730950488",
  "lp_total_supply": "14142135623730951488",
  "token_reserve": "800000000000000000000000000",
  "native_reserve": "2500000000000000000",
  "token_redeemable": "799999999999943431000000000",
  "native_redeemable": "2499999999999823223"
}
```

### Burn LP

`POST /launch/lp/burn/{launch_id}`

Permanently locks the dev wallet's liquidity by sending it to the dead address. (Bearer JWT)

- Token: Upgraded session token, bound to a license.
- Read-only tokens: refused with `403 read_only_token`.
- Retry: Check before retrying. Read [Retrieve LP info](/reference/liquidity/#get-lp-info) first: if the dev no longer holds the liquidity (`lp_balance` of `0`, or a `400` saying so), the first call landed. A repeat after it landed is refused with `400`.

On V2 the LP tokens go to `0x…dEaD`; on V3 and V4 the position NFT is locked. Takes no body.

> Irreversible: burned liquidity can never be reclaimed.

> On V3 and V4 the backend answers `token_id` and `lp_liquidity_locked` instead of `lp_burned`.

> On Solana (Meteora DAMM launches) the position is permanently locked in place and the response is `ok`, `signature` and `liquidity_locked`.

#### Path parameters

- `launch_id` (string, required): Launch ID: the 15-digit chain-encoded ID. Its first three digits name the chain (`101` Solana, `201` BSC, `202` Base, `204` Ethereum).

#### Returns 200 OK

- `ok` (boolean): Always `true` on success.
- `tx_hash` (string): Transaction hash.
- `lp_burned` (string): LP amount burned.

#### Errors

| Status | Code | Message | When | What to do |
| --- | --- | --- | --- | --- |
| 400 | `bad_request` | `invalid launch id format` | `launch_id` is not a chain-encoded launch ID. | Pass the 15-digit chain-encoded launch ID exactly as the API returned it. |
| 404 | `not_found` | `launch not found` | No launch with this ID belongs to the license in your token. | Check the launch ID and that your token is upgraded onto the license that owns the launch. |
| 400 | `bad_request` | `token not launched` | EVM: the launch is still a draft (imported launches pass). | Launch the token with [Launch a token](/reference/launch-execution/#launch) first. |
| 400 | `bad_request` | `LP reclaim/burn is only available for uniswap v2/v3/v4 launches; <platform> manages liquidity at the platform level` | EVM: the launch is not on Uniswap V2, V3 or V4; its platform adds and locks the liquidity itself. | Use these endpoints only on Uniswap V2, V3 and V4 launches; there is no liquidity to manage on other EVM platforms. |
| 400 | `bad_request` | `dev wallet is watched, cannot sign` | EVM: the launch's dev wallet is a watch-only wallet, so Proxima cannot sign for it. | Use a launch whose dev wallet Proxima holds the key for. |
| 400 | `bad_request` | `uniswap v2 pair not yet created` | Uniswap V2: the token has no pair against the wrapped native token yet. | Retry once trading has opened on Uniswap V2. |
| 400 | `bad_request` | `dev holds no LP tokens` | Uniswap V2: the dev wallet holds no LP tokens, for example after a burn or a reclaim. | Read [Retrieve LP info](/reference/liquidity/#get-lp-info): the LP was already burned, reclaimed or moved, so there is nothing to burn. |
| 400 | `bad_request` | `dev holds no uniswap v3 position for this token` | Uniswap V3: the dev wallet holds no position for this token, for example after a burn or a reclaim. | Treat the liquidity as already burned, reclaimed or moved out of the dev wallet; there is nothing left to manage. |
| 400 | `bad_request` | `this launch's liquidity position is held by <owner>, not by the dev wallet` | Uniswap V4: the position NFT is no longer in the dev wallet; after [Burn LP](/reference/liquidity/#burn-lp) it is held by `0x…dEaD`. | Treat the liquidity as burned if `<owner>` is the dead address; otherwise move the position back to the dev wallet. |
| 400 | `bad_request` | `this launch's liquidity position no longer exists` | Uniswap V4: the position was closed, for example by [Reclaim LP](/reference/liquidity/#reclaim-lp). | Treat the liquidity as reclaimed; there is nothing left to manage. |
| 400 | `bad_request` | `no uniswap v4 liquidity position was minted to this launch's dev wallet` | Uniswap V4: no position mint to the dev wallet was found after the token's creation block. | Check that trading was opened from this launch's dev wallet; there is no position for Proxima to manage. |
| 422 | `upstream_failure` | `evm_rpc api issue: v4 position read: <error>` | Uniswap V4: an RPC read failed. `message` names the read (`v4 position read`, `v4 position search`, `v4 pool read`, `v4 pool reserves`, `v4 position fees`); the body adds `service: "evm_rpc"`. | Retry in a few seconds. |
| 422 | `upstream_failure` | `evm_tx_engine api issue: <error>` | EVM: the transaction could not be sent or failed on-chain. The body adds `service: "evm_tx_engine"`. | Read [Retrieve LP info](/reference/liquidity/#get-lp-info) before calling again: the transaction may have landed. |
| 400 | `bad_request` | `lp management is only available on meteoradamm launches` | Solana: the launch is not a Meteora DAMM launch. | On Solana, use these endpoints only for Meteora DAMM launches. |
| 400 | `bad_request` | `launch is not deployed yet` | Solana: the launch is still a draft. | Launch the token with [Launch a token](/reference/launch-execution/#launch) first. |
| 400 | `bad_request` | `this launch holds no position (imported pools are not ours)` | Solana: the launch has no position Proxima opened, as with an imported pool. | Manage the pool from the wallet that created it; Proxima only manages positions it opened. |
| 404 | `not_found` | `position account not found on-chain` | Solana: the position account no longer exists on-chain; a reclaim that withdrew everything closes it. | Treat the liquidity as reclaimed; there is nothing left to manage. |
| 400 | `bad_request` | `position has no unlocked liquidity to lock` | Solana: the position's liquidity is already all locked or withdrawn. | Stop here: nothing is left to lock. |
| 422 | `upstream_failure` | `rpc api issue: Failed to fetch position account` | Solana: reading the position or the pool from the RPC failed. The body adds `service: "rpc"`. | Retry in a few seconds. |
| 422 | `upstream_failure` | `tx_engine api issue: lp transaction failed: <error>` | Solana: the transaction could not be sent. The body adds `service: "tx_engine"`. | Read [Retrieve LP info](/reference/liquidity/#get-lp-info) before calling again. |
| 422 | `upstream_failure` | `tx_engine api issue: lp transaction did not land` | Solana: the transaction did not land. | Read [Retrieve LP info](/reference/liquidity/#get-lp-info) to confirm nothing moved, then call again. |

#### Example request

```bash
curl -X POST "https://api-mig.proxima.tools/launch/lp/burn/202000000000318" \
  -H "Authorization: Bearer $PROXIMA_JWT"
```

#### Example response

```json
{
  "ok": true,
  "tx_hash": "0x4c9e2f7a1b8d3c6e5f0a9b2c7d4e1f8a3b6c5d0e9f2a7b4c1d8e3f6a5b0c9d2e",
  "lp_burned": "14142135623730950488"
}
```

### Reclaim LP

`POST /launch/lp/reclaim/{launch_id}`

Removes the dev wallet's liquidity and returns the token and native to the dev wallet. (Bearer JWT)

- Token: Upgraded session token, bound to a license.
- Read-only tokens: refused with `403 read_only_token`.
- Retry: Check before retrying. Read [Retrieve LP info](/reference/liquidity/#get-lp-info) first: if the dev no longer holds the liquidity, the first call landed and a repeat is refused with `400`. On Solana a failed call may have withdrawn part of it; calling again reclaims what is left.

Expected amounts come from a snapshot read before the transaction and can drift slightly by the time it lands. Takes no body.

> Removes the launch's pool liquidity; the token stays tradable only on whatever liquidity remains.

> On V3 and V4 the backend answers `token_id` and `lp_reclaimed_liquidity` instead of `lp_reclaimed`.

> On Solana (Meteora DAMM launches) the reclaim withdraws the unlocked liquidity, claims the fees and closes the position when nothing stays locked. The response is `ok`, `signatures`, `position_closed`, `liquidity_removed`, `fees_token` and `fees_native`.

#### Path parameters

- `launch_id` (string, required): Launch ID: the 15-digit chain-encoded ID. Its first three digits name the chain (`101` Solana, `201` BSC, `202` Base, `204` Ethereum).

#### Returns 200 OK

- `ok` (boolean): Always `true` on success.
- `tx_hash` (string): Transaction hash.
- `lp_reclaimed` (string): LP amount removed.
- `expected_token_out` (string): Tokens expected back, raw units.
- `expected_native_out` (string): Native expected back, wei.

#### Errors

| Status | Code | Message | When | What to do |
| --- | --- | --- | --- | --- |
| 400 | `bad_request` | `invalid launch id format` | `launch_id` is not a chain-encoded launch ID. | Pass the 15-digit chain-encoded launch ID exactly as the API returned it. |
| 404 | `not_found` | `launch not found` | No launch with this ID belongs to the license in your token. | Check the launch ID and that your token is upgraded onto the license that owns the launch. |
| 400 | `bad_request` | `token not launched` | EVM: the launch is still a draft (imported launches pass). | Launch the token with [Launch a token](/reference/launch-execution/#launch) first. |
| 400 | `bad_request` | `LP reclaim/burn is only available for uniswap v2/v3/v4 launches; <platform> manages liquidity at the platform level` | EVM: the launch is not on Uniswap V2, V3 or V4; its platform adds and locks the liquidity itself. | Use these endpoints only on Uniswap V2, V3 and V4 launches; there is no liquidity to manage on other EVM platforms. |
| 400 | `bad_request` | `dev wallet is watched, cannot sign` | EVM: the launch's dev wallet is a watch-only wallet, so Proxima cannot sign for it. | Use a launch whose dev wallet Proxima holds the key for. |
| 400 | `bad_request` | `uniswap v2 pair not yet created` | Uniswap V2: the token has no pair against the wrapped native token yet. | Retry once trading has opened on Uniswap V2. |
| 400 | `bad_request` | `dev holds no LP tokens` | Uniswap V2: the dev wallet holds no LP tokens, for example after a burn or a reclaim. | Read [Retrieve LP info](/reference/liquidity/#get-lp-info): the LP was already burned, reclaimed or moved, so there is nothing to reclaim. |
| 400 | `bad_request` | `dev holds no uniswap v3 position for this token` | Uniswap V3: the dev wallet holds no position for this token, for example after a burn or a reclaim. | Treat the liquidity as already burned, reclaimed or moved out of the dev wallet; there is nothing left to manage. |
| 400 | `bad_request` | `position has no liquidity to reclaim` | Uniswap V3 and V4: the position holds no liquidity. | Stop here: nothing is left to reclaim. |
| 400 | `bad_request` | `this launch's liquidity position is held by <owner>, not by the dev wallet` | Uniswap V4: the position NFT is no longer in the dev wallet; after [Burn LP](/reference/liquidity/#burn-lp) it is held by `0x…dEaD`. | Treat the liquidity as burned if `<owner>` is the dead address; otherwise move the position back to the dev wallet. |
| 400 | `bad_request` | `this launch's liquidity position no longer exists` | Uniswap V4: the position was closed, for example by [Reclaim LP](/reference/liquidity/#reclaim-lp). | Treat the liquidity as reclaimed; there is nothing left to manage. |
| 400 | `bad_request` | `no uniswap v4 liquidity position was minted to this launch's dev wallet` | Uniswap V4: no position mint to the dev wallet was found after the token's creation block. | Check that trading was opened from this launch's dev wallet; there is no position for Proxima to manage. |
| 422 | `upstream_failure` | `evm_rpc api issue: v4 position read: <error>` | Uniswap V4: an RPC read failed. `message` names the read (`v4 position read`, `v4 position search`, `v4 pool read`, `v4 pool reserves`, `v4 position fees`); the body adds `service: "evm_rpc"`. | Retry in a few seconds. |
| 422 | `upstream_failure` | `evm_tx_engine api issue: <error>` | EVM: the transaction could not be sent or failed on-chain. The body adds `service: "evm_tx_engine"`. | Read [Retrieve LP info](/reference/liquidity/#get-lp-info) before calling again: the transaction may have landed. |
| 400 | `bad_request` | `lp management is only available on meteoradamm launches` | Solana: the launch is not a Meteora DAMM launch. | On Solana, use these endpoints only for Meteora DAMM launches. |
| 400 | `bad_request` | `launch is not deployed yet` | Solana: the launch is still a draft. | Launch the token with [Launch a token](/reference/launch-execution/#launch) first. |
| 400 | `bad_request` | `this launch holds no position (imported pools are not ours)` | Solana: the launch has no position Proxima opened, as with an imported pool. | Manage the pool from the wallet that created it; Proxima only manages positions it opened. |
| 404 | `not_found` | `position account not found on-chain` | Solana: the position account no longer exists on-chain; a reclaim that withdrew everything closes it. | Treat the liquidity as reclaimed; there is nothing left to manage. |
| 400 | `bad_request` | `position has nothing left to reclaim` | Solana: the position has no unlocked liquidity and no fees to claim. | Stop here: the liquidity and fees were already reclaimed. |
| 422 | `upstream_failure` | `rpc api issue: Failed to fetch position account` | Solana: reading the position or the pool from the RPC failed. The body adds `service: "rpc"`. | Retry in a few seconds. |
| 422 | `upstream_failure` | `tx_engine api issue: lp transaction failed: <error>` | Solana: a transaction could not be sent. The reclaim sends up to three transactions in a row (withdraw, claim fees, close), so the ones before it may have landed. The body adds `service: "tx_engine"`. | Read [Retrieve LP info](/reference/liquidity/#get-lp-info) before calling again. |
| 422 | `upstream_failure` | `tx_engine api issue: lp transaction did not land` | Solana: a transaction did not land; the ones sent before it may have. | Read [Retrieve LP info](/reference/liquidity/#get-lp-info) to see what is left, then call again to reclaim the rest. |

#### Example request

```bash
curl -X POST "https://api-mig.proxima.tools/launch/lp/reclaim/202000000000318" \
  -H "Authorization: Bearer $PROXIMA_JWT"
```

#### Example response

```json
{
  "ok": true,
  "tx_hash": "0x4c9e2f7a1b8d3c6e5f0a9b2c7d4e1f8a3b6c5d0e9f2a7b4c1d8e3f6a5b0c9d2e",
  "lp_reclaimed": "14142135623730950488",
  "expected_token_out": "799999999999943431000000000",
  "expected_native_out": "2499999999999823223"
}
```
