Burns LP tokens to withdraw a proportional share of assets from the pool. This operation is processed synchronously and returns immediately with the results.
When removing liquidity, you receive:
Requires a valid JWT bearer token. The token’s public key must match the userPublicKey in the
request.
userPublicKey - Public key of the liquidity providerpoolId - LP public key of the poollpTokensToRemove - Amount of LP tokens to burnnonce - Unique value for replay protectionsignature - Request signature200 OK with withdrawn amounts and transfer IDs400 Bad Request if validation fails or insufficient balance401 Unauthorized if authentication fails409 Conflict if nonce already used500 Internal Server Error if removal failsBearer authentication header of the form Bearer <token>, where <token> is your auth token.
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.
Hex-encoded secp256k1 public key of the liquidity provider. This must match the public key in your authentication token.
"03abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567"
Unique identifier of the pool to remove liquidity from. This is the pool's identity public key.
"03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899"
Amount of LP tokens to burn, in their smallest unit. You will receive a proportional share of the pool's assets.
"100000.00000000"
Unique nonce to prevent replay attacks.
Each nonce can only be used once per user.
"remove-liquidity-nonce-789"
Hex-encoded secp256k1 signature of the request. Must be signed by the private key corresponding to userPublicKey.
"3045022100def..."
Liquidity removal process completed
Response for removing liquidity from a pool
User-friendly request ID for tracking
"01HJZKFABCDEFGHJKLMNPQRSTVW"
Whether liquidity removal was accepted
true
Settlement service request ID for correlation
"018D5E56-9D80-7890-A1B2-C3D4E5F6G7H8"
Amount of asset A withdrawn (populated if accepted)
x >= 0"50000000"
Amount of asset B withdrawn (populated if accepted)
x >= 0"25000"
Spark transfer ID for asset A withdrawal (populated if accepted)
"spark-transfer-a-789"
Spark transfer ID for asset B withdrawal (populated if accepted)
"spark-transfer-b-012"
User-friendly error message (populated if rejected)