Get a pool
curl --request GET \
--url https://api.swap.shield.fi/pools/{key}import requests
url = "https://api.swap.shield.fi/pools/{key}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.swap.shield.fi/pools/{key}', 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}",
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/pools/{key}"
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/pools/{key}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.swap.shield.fi/pools/{key}")
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{
"data": {
"created_at": "<string>",
"creator": "<string>",
"enabled": true,
"fee_percent": "<string>",
"id": "<string>",
"init_tx": "<string>",
"key": "<string>",
"token0": "<string>",
"token1": "<string>",
"display_flipped": true,
"reserve0": "<string>",
"reserve1": "<string>",
"base_token": {
"address": "<string>",
"decimals": 123,
"id": "<string>",
"name": "<string>",
"symbol": "<string>",
"amm_token_program": "<string>",
"image": "<string>",
"underlying_program": "<string>",
"underlying_token_id": "<string>"
},
"quote_token": {
"address": "<string>",
"decimals": 123,
"id": "<string>",
"name": "<string>",
"symbol": "<string>",
"amm_token_program": "<string>",
"image": "<string>",
"underlying_program": "<string>",
"underlying_token_id": "<string>"
},
"stats": {
"active_tick": 123,
"fee_growth_global0_x_128": "<string>",
"fee_growth_global1_x_128": "<string>",
"fee_protocol": 123,
"id": "<string>",
"liquidity": "<string>",
"max_liquidity_per_tick": "<string>",
"next_init_above": 123,
"next_init_below": 123,
"pool": "<string>",
"price": "<string>",
"price_reversed": "<string>",
"protocol_fees0": "<string>",
"protocol_fees1": "<string>",
"tick_spacing": 123
},
"token0_info": {
"address": "<string>",
"decimals": 123,
"id": "<string>",
"name": "<string>",
"symbol": "<string>",
"amm_token_program": "<string>",
"image": "<string>",
"underlying_program": "<string>",
"underlying_token_id": "<string>"
},
"token1_info": {
"address": "<string>",
"decimals": 123,
"id": "<string>",
"name": "<string>",
"symbol": "<string>",
"amm_token_program": "<string>",
"image": "<string>",
"underlying_program": "<string>",
"underlying_token_id": "<string>"
}
}
}{
"error": "<string>",
"ref": "<string>"
}{
"error": "<string>",
"ref": "<string>"
}Get a pool
Retrieve one pool by its canonical pool key.
GET
/
pools
/
{key}
Get a pool
curl --request GET \
--url https://api.swap.shield.fi/pools/{key}import requests
url = "https://api.swap.shield.fi/pools/{key}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.swap.shield.fi/pools/{key}', 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}",
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/pools/{key}"
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/pools/{key}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.swap.shield.fi/pools/{key}")
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{
"data": {
"created_at": "<string>",
"creator": "<string>",
"enabled": true,
"fee_percent": "<string>",
"id": "<string>",
"init_tx": "<string>",
"key": "<string>",
"token0": "<string>",
"token1": "<string>",
"display_flipped": true,
"reserve0": "<string>",
"reserve1": "<string>",
"base_token": {
"address": "<string>",
"decimals": 123,
"id": "<string>",
"name": "<string>",
"symbol": "<string>",
"amm_token_program": "<string>",
"image": "<string>",
"underlying_program": "<string>",
"underlying_token_id": "<string>"
},
"quote_token": {
"address": "<string>",
"decimals": 123,
"id": "<string>",
"name": "<string>",
"symbol": "<string>",
"amm_token_program": "<string>",
"image": "<string>",
"underlying_program": "<string>",
"underlying_token_id": "<string>"
},
"stats": {
"active_tick": 123,
"fee_growth_global0_x_128": "<string>",
"fee_growth_global1_x_128": "<string>",
"fee_protocol": 123,
"id": "<string>",
"liquidity": "<string>",
"max_liquidity_per_tick": "<string>",
"next_init_above": 123,
"next_init_below": 123,
"pool": "<string>",
"price": "<string>",
"price_reversed": "<string>",
"protocol_fees0": "<string>",
"protocol_fees1": "<string>",
"tick_spacing": 123
},
"token0_info": {
"address": "<string>",
"decimals": 123,
"id": "<string>",
"name": "<string>",
"symbol": "<string>",
"amm_token_program": "<string>",
"image": "<string>",
"underlying_program": "<string>",
"underlying_token_id": "<string>"
},
"token1_info": {
"address": "<string>",
"decimals": 123,
"id": "<string>",
"name": "<string>",
"symbol": "<string>",
"amm_token_program": "<string>",
"image": "<string>",
"underlying_program": "<string>",
"underlying_token_id": "<string>"
}
}
}{
"error": "<string>",
"ref": "<string>"
}{
"error": "<string>",
"ref": "<string>"
}⌘I