Pro Pool API
Set LP Fee
Set market cap based LP provider fee brackets on a pro pool. LP fees are distributed proportionally to liquidity providers. Only the pool creator can call this.
Example — 0.3% below $500k, 0.1% above:
market_cap_upper_bound | buy_fee_bps | sell_fee_bps | Effective rate |
|---|---|---|---|
500000000000 | 30 | 30 | 0.3% below $500k |
9223372036854775807 | 10 | 10 | 0.1% above $500k |
POST
/
tx
/
pro
/
set-lp-fee
Set LP Fee
curl --request POST \
--url https://tx.api.heaven.xyz/tx/pro/set-lp-fee \
--header 'Content-Type: application/json' \
--data '
{
"pool": "<string>",
"payer": "<string>",
"program_id": "<string>",
"brackets": [
{
"market_cap_upper_bound": 100000000000,
"buy_fee_bps": 100,
"sell_fee_bps": 100
}
],
"compute_unit_limit": 1,
"compute_unit_price": 1
}
'import requests
url = "https://tx.api.heaven.xyz/tx/pro/set-lp-fee"
payload = {
"pool": "<string>",
"payer": "<string>",
"program_id": "<string>",
"brackets": [
{
"market_cap_upper_bound": 100000000000,
"buy_fee_bps": 100,
"sell_fee_bps": 100
}
],
"compute_unit_limit": 1,
"compute_unit_price": 1
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
pool: '<string>',
payer: '<string>',
program_id: '<string>',
brackets: [{market_cap_upper_bound: 100000000000, buy_fee_bps: 100, sell_fee_bps: 100}],
compute_unit_limit: 1,
compute_unit_price: 1
})
};
fetch('https://tx.api.heaven.xyz/tx/pro/set-lp-fee', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tx.api.heaven.xyz/tx/pro/set-lp-fee",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pool' => '<string>',
'payer' => '<string>',
'program_id' => '<string>',
'brackets' => [
[
'market_cap_upper_bound' => 100000000000,
'buy_fee_bps' => 100,
'sell_fee_bps' => 100
]
],
'compute_unit_limit' => 1,
'compute_unit_price' => 1
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://tx.api.heaven.xyz/tx/pro/set-lp-fee"
payload := strings.NewReader("{\n \"pool\": \"<string>\",\n \"payer\": \"<string>\",\n \"program_id\": \"<string>\",\n \"brackets\": [\n {\n \"market_cap_upper_bound\": 100000000000,\n \"buy_fee_bps\": 100,\n \"sell_fee_bps\": 100\n }\n ],\n \"compute_unit_limit\": 1,\n \"compute_unit_price\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://tx.api.heaven.xyz/tx/pro/set-lp-fee")
.header("Content-Type", "application/json")
.body("{\n \"pool\": \"<string>\",\n \"payer\": \"<string>\",\n \"program_id\": \"<string>\",\n \"brackets\": [\n {\n \"market_cap_upper_bound\": 100000000000,\n \"buy_fee_bps\": 100,\n \"sell_fee_bps\": 100\n }\n ],\n \"compute_unit_limit\": 1,\n \"compute_unit_price\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tx.api.heaven.xyz/tx/pro/set-lp-fee")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"pool\": \"<string>\",\n \"payer\": \"<string>\",\n \"program_id\": \"<string>\",\n \"brackets\": [\n {\n \"market_cap_upper_bound\": 100000000000,\n \"buy_fee_bps\": 100,\n \"sell_fee_bps\": 100\n }\n ],\n \"compute_unit_limit\": 1,\n \"compute_unit_price\": 1\n}"
response = http.request(request)
puts response.read_body{
"tx": "<string>"
}Body
application/json
Request to set LP provider trading fee brackets on a pro pool.
On-chain address of the pro pool state account.
Public key of the pool creator wallet.
Program ID of the Heaven DEX program.
Fee brackets (max 4). Each defines buy/sell basis points below a market cap threshold.
Show child attributes
Show child attributes
Maximum compute units for the transaction.
Required range:
x >= 0Priority fee in micro-lamports per compute unit.
Required range:
x >= 0Response
200 - application/json
Base64 encoded versioned transaction. Decode, sign with the creator wallet, and submit.
⌘I
Set LP Fee
curl --request POST \
--url https://tx.api.heaven.xyz/tx/pro/set-lp-fee \
--header 'Content-Type: application/json' \
--data '
{
"pool": "<string>",
"payer": "<string>",
"program_id": "<string>",
"brackets": [
{
"market_cap_upper_bound": 100000000000,
"buy_fee_bps": 100,
"sell_fee_bps": 100
}
],
"compute_unit_limit": 1,
"compute_unit_price": 1
}
'import requests
url = "https://tx.api.heaven.xyz/tx/pro/set-lp-fee"
payload = {
"pool": "<string>",
"payer": "<string>",
"program_id": "<string>",
"brackets": [
{
"market_cap_upper_bound": 100000000000,
"buy_fee_bps": 100,
"sell_fee_bps": 100
}
],
"compute_unit_limit": 1,
"compute_unit_price": 1
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
pool: '<string>',
payer: '<string>',
program_id: '<string>',
brackets: [{market_cap_upper_bound: 100000000000, buy_fee_bps: 100, sell_fee_bps: 100}],
compute_unit_limit: 1,
compute_unit_price: 1
})
};
fetch('https://tx.api.heaven.xyz/tx/pro/set-lp-fee', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tx.api.heaven.xyz/tx/pro/set-lp-fee",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pool' => '<string>',
'payer' => '<string>',
'program_id' => '<string>',
'brackets' => [
[
'market_cap_upper_bound' => 100000000000,
'buy_fee_bps' => 100,
'sell_fee_bps' => 100
]
],
'compute_unit_limit' => 1,
'compute_unit_price' => 1
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://tx.api.heaven.xyz/tx/pro/set-lp-fee"
payload := strings.NewReader("{\n \"pool\": \"<string>\",\n \"payer\": \"<string>\",\n \"program_id\": \"<string>\",\n \"brackets\": [\n {\n \"market_cap_upper_bound\": 100000000000,\n \"buy_fee_bps\": 100,\n \"sell_fee_bps\": 100\n }\n ],\n \"compute_unit_limit\": 1,\n \"compute_unit_price\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://tx.api.heaven.xyz/tx/pro/set-lp-fee")
.header("Content-Type", "application/json")
.body("{\n \"pool\": \"<string>\",\n \"payer\": \"<string>\",\n \"program_id\": \"<string>\",\n \"brackets\": [\n {\n \"market_cap_upper_bound\": 100000000000,\n \"buy_fee_bps\": 100,\n \"sell_fee_bps\": 100\n }\n ],\n \"compute_unit_limit\": 1,\n \"compute_unit_price\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tx.api.heaven.xyz/tx/pro/set-lp-fee")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"pool\": \"<string>\",\n \"payer\": \"<string>\",\n \"program_id\": \"<string>\",\n \"brackets\": [\n {\n \"market_cap_upper_bound\": 100000000000,\n \"buy_fee_bps\": 100,\n \"sell_fee_bps\": 100\n }\n ],\n \"compute_unit_limit\": 1,\n \"compute_unit_price\": 1\n}"
response = http.request(request)
puts response.read_body{
"tx": "<string>"
}