Skip to main content
POST
/
tx
/
pro
/
add-liquidity
Deposit Liquidity
curl --request POST \
  --url https://tx.api.heaven.xyz/tx/pro/add-liquidity \
  --header 'Content-Type: application/json' \
  --data '
{
  "payer": "<string>",
  "mint": "<string>",
  "config_version": 1,
  "program_id": "<string>",
  "max_token_a": 1,
  "max_token_b": 1,
  "min_lp_tokens": 1,
  "pool": "<string>",
  "compute_unit_limit": 1,
  "compute_unit_price": 1
}
'
{
  "tx": "<string>"
}

Body

application/json

Deposit liquidity to a pro pool. The amounts deposited will be proportional to the current pool reserves. You receive LP tokens representing your share of the pool.

payer
string
required

Public key of the wallet that will sign and pay for the transaction.

mint
string
required

Mint address of the SPL token (token A) in the pool.

config_version
integer<int32>
required

Protocol config version. Use 1 for community tokens, 2 for creator tokens, 3 for pro pools.

Required range: x >= 0
program_id
string
required

Program ID of the Heaven DEX program. Use HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o for mainnet.

max_token_a
integer<int64>
required

Maximum amount of token A (native units) to deposit. The actual amount may be less to maintain the pool ratio.

Required range: x >= 0
max_token_b
integer<int64>
required

Maximum amount of SOL (lamports) to deposit. The actual amount may be less to maintain the pool ratio.

Required range: x >= 0
min_lp_tokens
integer<int64>
required

Minimum LP tokens to receive. Set to 0 to accept any amount. Higher values protect against slippage.

Required range: x >= 0
pool
string
required

On-chain address of the pro pool state account. Returned in the response when creating a pool.

compute_unit_limit
integer<int32> | null

Maximum compute units for the transaction. Higher values allow more complex operations but cost more. Defaults to a sensible value if omitted.

Required range: x >= 0
compute_unit_price
integer<int64> | null

Priority fee in micro-lamports per compute unit. Higher values increase transaction priority. Defaults to a sensible value if omitted.

Required range: x >= 0

Response

200 - application/json
tx
string
required

Base64 encoded versioned transaction. Decode, sign, and submit.