Skip to main content
POST
/
tx
/
pro
/
set-slot-creator-fee
Set Slot Fee
curl --request POST \
  --url https://tx.api.heaven.xyz/tx/pro/set-slot-creator-fee \
  --header 'Content-Type: application/json' \
  --data '
{
  "pool": "<string>",
  "payer": "<string>",
  "program_id": "<string>",
  "brackets": [
    {
      "buy_fee_bps": 5000,
      "sell_fee_bps": 5000,
      "slot_offset_upperbound": 5
    }
  ],
  "max_slot_offset": 1,
  "max_fee_bps": 1,
  "enabled": true,
  "compute_unit_limit": 1,
  "compute_unit_price": 1
}
'
{
  "tx": "<string>"
}

Body

application/json

Set slot-offset based creator fee brackets on a pro pool. Useful for implementing time-decaying fees (e.g. high fees right after launch for sniper resistance that decay over slots).

pool
string
required

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

payer
string
required

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

program_id
string
required

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

brackets
object[]
required

Array of slot fee brackets (max 42). Each bracket defines buy/sell fees at a specific slot offset range from pool creation.

max_slot_offset
integer<int32>
required

Maximum slot offset at which slot-based fees apply. After this many slots, the fees revert to normal.

Required range: x >= 0
max_fee_bps
integer<int32>
required

Maximum fee in basis points across all slot brackets.

Required range: x >= 0
enabled
boolean
required

Set to true to enable slot-based fees, false to disable them.

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 with the creator wallet, and submit.