Adds liquidity to an existing pool by depositing both assets. The operation is processed synchronously and returns immediately with the results.
LP (Liquidity Provider) tokens represent your share of the pool. They can be:
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 poolassetASparkTransferId
- Transfer proof for Asset AassetBSparkTransferId
- Transfer proof for Asset B (empty for single-sided)assetAAmountToAdd
- Amount of Asset A to depositassetBAmountToAdd
- Amount of Asset B to deposit (0 for single-sided)nonce
- Unique value for replay protectionsignature
- Request signature200 OK
with LP tokens minted and amounts used400 Bad Request
if validation fails or transfers invalid401 Unauthorized
if authentication fails409 Conflict
if nonce already used500 Internal Server Error
if liquidity addition failsBearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Liquidity addition details including assets, amounts, and authentication
Request body for adding liquidity to a pool.
When adding liquidity to a pool, you must provide both assets in the correct ratio for constant product pools, or can provide single-sided liquidity for single-sided pools. The system will automatically calculate the optimal amounts and refund any excess.
Liquidity addition executed successfully
Response for adding liquidity to a pool