Skip to main content
POST
/
tx
/
sell
Create Sell Transaction
curl --request POST \
  --url https://tx.api.heaven.xyz/tx/sell \
  --header 'Content-Type: application/json' \
  --data '{
  "compute_unit_limit": 200000,
  "compute_unit_price": 40000000,
  "encoded_user_defined_event_data": "custom_event_data",
  "payer": "G2pX3b4Y8m7v5xX9L5f6y7z8A9B0C1D2E3F4G5H6I7J8K",
  "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
  },
  "source": "G2pX3b4Y8m7v5xX9L5f6y7z8A9B0C1D2E3F4G5H6I7J8K"
}'
{
  "tx": "<string>"
}

Body

application/json
encoded_user_defined_event_data
string
required

Encoded user defined event data

Example:

"custom_event_data"

payer
string
required

Payer of the transaction

Example:

"G2pX3b4Y8m7v5xX9L5f6y7z8A9B0C1D2E3F4G5H6I7J8K"

quote_response
object
required
compute_unit_limit
integer | null
default:200000

Optional compute unit limit for the transaction

Required range: x >= 0
Example:

200000

compute_unit_price
integer | null
default:40000000

Optional compute unit price for the transaction

Required range: x >= 0
Example:

40000000

source
string | null

Optional source token account for the sell operation. If not provided, the payer's associated token account will be used.

Example:

"G2pX3b4Y8m7v5xX9L5f6y7z8A9B0C1D2E3F4G5H6I7J8K"

Response

200 - application/json
tx
string
required

Base64 encoded transaction