Get rebalance state
curl --request GET \
--url https://api.swap.shield.fi/pools/{key}/rebalance-state \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.swap.shield.fi/pools/{key}/rebalance-state"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.swap.shield.fi/pools/{key}/rebalance-state', 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://api.swap.shield.fi/pools/{key}/rebalance-state",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.swap.shield.fi/pools/{key}/rebalance-state"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.swap.shield.fi/pools/{key}/rebalance-state")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.swap.shield.fi/pools/{key}/rebalance-state")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"fee_growth_global0_x_128": "<string>",
"fee_growth_global1_x_128": "<string>",
"lower": {
"fee_growth_outside0_x_128": "<string>",
"fee_growth_outside1_x_128": "<string>",
"tick": 123
},
"observed_block": 1,
"sqrt_price_x_128": "<string>",
"tick": 123,
"tick_lower_hint": 123,
"tick_spacing": 1,
"tick_upper_hint": 123,
"upper": {
"fee_growth_outside0_x_128": "<string>",
"fee_growth_outside1_x_128": "<string>",
"tick": 123
}
}
}{
"error": "<string>",
"code": "<string>",
"ref": "<string>"
}{
"error": "<string>",
"code": "<string>",
"ref": "<string>"
}{
"error": "<string>",
"code": "<string>",
"ref": "<string>"
}Get rebalance state
Read pool state and tick data for a position rebalance.
GET
/
pools
/
{key}
/
rebalance-state
Get rebalance state
curl --request GET \
--url https://api.swap.shield.fi/pools/{key}/rebalance-state \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.swap.shield.fi/pools/{key}/rebalance-state"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.swap.shield.fi/pools/{key}/rebalance-state', 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://api.swap.shield.fi/pools/{key}/rebalance-state",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.swap.shield.fi/pools/{key}/rebalance-state"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.swap.shield.fi/pools/{key}/rebalance-state")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.swap.shield.fi/pools/{key}/rebalance-state")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"fee_growth_global0_x_128": "<string>",
"fee_growth_global1_x_128": "<string>",
"lower": {
"fee_growth_outside0_x_128": "<string>",
"fee_growth_outside1_x_128": "<string>",
"tick": 123
},
"observed_block": 1,
"sqrt_price_x_128": "<string>",
"tick": 123,
"tick_lower_hint": 123,
"tick_spacing": 1,
"tick_upper_hint": 123,
"upper": {
"fee_growth_outside0_x_128": "<string>",
"fee_growth_outside1_x_128": "<string>",
"tick": 123
}
}
}{
"error": "<string>",
"code": "<string>",
"ref": "<string>"
}{
"error": "<string>",
"code": "<string>",
"ref": "<string>"
}{
"error": "<string>",
"code": "<string>",
"ref": "<string>"
}Authorizations
Session JWT (browsers receive it as an httpOnly cookie from POST /auth/verify; 15 min, silently renewed via POST /auth/refresh), or a long-lived API token (ss_…) minted at POST /api-tokens. API tokens work on data and trading endpoints and can request WebSocket tickets; token management and admin endpoints accept session JWTs only.
Path Parameters
Pool key
Query Parameters
Current lower tick
Current upper tick
Current position liquidity
New lower tick
New upper tick
Response
Consistent pool state and mint hints
Show child attributes
Show child attributes