Skip to main content
POST
/
tx
/
pro
/
sell
Create Pro Sell Transaction
curl --request POST \
  --url https://tx.api.heaven.xyz/tx/pro/sell \
  --header 'Content-Type: application/json' \
  --data '
{
  "payer": "<string>",
  "quote_response": {
    "amount_in": 1,
    "amount_in_ui": 123,
    "config_version": 1,
    "minimum_out": 1,
    "minimum_out_ui": 123,
    "mint": "<string>",
    "program_id": "<string>",
    "slippage_bps": 1
  },
  "encoded_user_defined_event_data": "<string>",
  "pool": "<string>",
  "compute_unit_limit": 1,
  "compute_unit_price": 1,
  "source": "<string>"
}
'
{
  "tx": "<string>"
}

Body

application/json

Request to create a sell transaction for a pro pool. First call Quote Pro Sell to get the quote_response, then pass it here.

payer
string
required

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

quote_response
object
required

The full quote response object from the Quote Pro Sell endpoint. Contains the calculated amounts, fees, and slippage parameters.

encoded_user_defined_event_data
string
required

Arbitrary string data emitted as an on-chain event. Useful for tracking or attributing transactions.

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
source
string | null

Optional source wallet. If different from payer, tokens will be debited from this wallet. Defaults to payer if omitted.

Response

200 - application/json
tx
string
required

Base64 encoded versioned transaction. Decode, sign with the payer, and submit to the Solana network.