Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
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..."
Response
Liquidity removal process completed
Response for removing liquidity from a pool
User-friendly request ID for tracking
"01HJZKFABCDEFGHJKLMNPQRSTVW"
Whether liquidity removal was accepted
true
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)