POST
/
v1
/
liquidity
/
remove
Remove Liquidity
curl --request POST \
  --url https://api.amm.flashnet.xyz/v1/liquidity/remove \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "lpTokensToRemove": "100000",
  "nonce": "remove-liquidity-1702934567890",
  "poolId": "03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899",
  "signature": "3045022100def...",
  "userPublicKey": "03abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567"
}'
{
"error": "Insufficient LP token balance",
"requestId": "01HJZKFABCDEFGHJKLMNPQRSTVW"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Liquidity removal details including LP tokens and authentication

Request body for removing liquidity from a pool.

When removing liquidity, you burn LP tokens to receive back a proportional share of both assets from the pool. The exact amounts depend on the current pool reserves and your share of the total LP tokens.

Response

200
application/json

Liquidity removal process completed

Response for removing liquidity from a pool