Get protocol state
curl --request GET \
--url https://api.swap.shield.fi/protocol/stateimport requests
url = "https://api.swap.shield.fi/protocol/state"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.swap.shield.fi/protocol/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/protocol/state",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/protocol/state"
req, _ := http.NewRequest("GET", url, nil)
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/protocol/state")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.swap.shield.fi/protocol/state")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"capabilities": {
"debug_api": true,
"faucet": true,
"freezelist_proofs": "<string>",
"protocol_config_websocket": true,
"token_admin": true
},
"controls": {
"allowed_tokens": [
"<string>"
],
"disabled_pools": [
"<string>"
],
"global_paused": true,
"paused_pairs": [
{
"token0": "<string>",
"token1": "<string>"
}
],
"paused_tokens": [
"<string>"
],
"pool_creation_is_open": true
},
"deployment": {
"abi_version": 1,
"amm_start_block": 1,
"contract_ref": "<string>",
"contract_repository": "<string>",
"deployment_fingerprint": "<string>",
"freezelist_proof_version": "<string>",
"math_version": "<string>",
"network": "<string>",
"profile": "<string>",
"programs": {},
"protocol_version": 1,
"verified_at": "<string>"
},
"fee_configuration": {
"pool_fee_protocols": [
{
"fee_protocol": 123,
"pool_key": "<string>"
}
],
"registered_fee_tiers": [
123
],
"registered_tick_spacings": [
123
],
"valid_bindings": [
{
"fee_tier": 123,
"tick_spacing": 123
}
]
},
"freshness": {
"ready_for_entry": true,
"confirmed_head": 123,
"indexed_block": 123,
"lag_blocks": 123,
"updated_at": "2023-11-07T05:31:56Z"
},
"live_compatibility": {
"artifacts_checked": 1,
"checked_at": "2023-11-07T05:31:56Z",
"failures": [
{
"program_id": "<string>"
}
]
},
"revision": 123,
"changed_at": "2023-11-07T05:31:56Z",
"observed_block": 123
}{
"error": "<string>",
"ref": "<string>"
}{
"code": "<string>",
"current_revision": 123,
"error": "<string>",
"minimum_revision": 123
}Get protocol state
Get a revisioned snapshot of protocol controls and routing configuration.
GET
/
protocol
/
state
Get protocol state
curl --request GET \
--url https://api.swap.shield.fi/protocol/stateimport requests
url = "https://api.swap.shield.fi/protocol/state"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.swap.shield.fi/protocol/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/protocol/state",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/protocol/state"
req, _ := http.NewRequest("GET", url, nil)
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/protocol/state")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.swap.shield.fi/protocol/state")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"capabilities": {
"debug_api": true,
"faucet": true,
"freezelist_proofs": "<string>",
"protocol_config_websocket": true,
"token_admin": true
},
"controls": {
"allowed_tokens": [
"<string>"
],
"disabled_pools": [
"<string>"
],
"global_paused": true,
"paused_pairs": [
{
"token0": "<string>",
"token1": "<string>"
}
],
"paused_tokens": [
"<string>"
],
"pool_creation_is_open": true
},
"deployment": {
"abi_version": 1,
"amm_start_block": 1,
"contract_ref": "<string>",
"contract_repository": "<string>",
"deployment_fingerprint": "<string>",
"freezelist_proof_version": "<string>",
"math_version": "<string>",
"network": "<string>",
"profile": "<string>",
"programs": {},
"protocol_version": 1,
"verified_at": "<string>"
},
"fee_configuration": {
"pool_fee_protocols": [
{
"fee_protocol": 123,
"pool_key": "<string>"
}
],
"registered_fee_tiers": [
123
],
"registered_tick_spacings": [
123
],
"valid_bindings": [
{
"fee_tier": 123,
"tick_spacing": 123
}
]
},
"freshness": {
"ready_for_entry": true,
"confirmed_head": 123,
"indexed_block": 123,
"lag_blocks": 123,
"updated_at": "2023-11-07T05:31:56Z"
},
"live_compatibility": {
"artifacts_checked": 1,
"checked_at": "2023-11-07T05:31:56Z",
"failures": [
{
"program_id": "<string>"
}
]
},
"revision": 123,
"changed_at": "2023-11-07T05:31:56Z",
"observed_block": 123
}{
"error": "<string>",
"ref": "<string>"
}{
"code": "<string>",
"current_revision": 123,
"error": "<string>",
"minimum_revision": 123
}Path Parameters
Response
Canonical versioned protocol state
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I