Get pool oracle
curl --request GET \
--url https://api.swap.shield.fi/pools/{key}/oracleimport requests
url = "https://api.swap.shield.fi/pools/{key}/oracle"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.swap.shield.fi/pools/{key}/oracle', 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}/oracle",
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}/oracle"
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}/oracle")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.swap.shield.fi/pools/{key}/oracle")
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": {
"activated_at": 123,
"current_liquidity": "<string>",
"current_tick": 123,
"end_at": 123,
"epoch": 1,
"evaluated_at": 123,
"harmonic_liquidity": "<string>",
"mean_tick": 123,
"observed_block": 1,
"oldest_at": 123,
"paused": true,
"start_at": 123,
"tick_variance": "<string>",
"totals": {
"lp_fees0": "<string>",
"lp_fees1": "<string>",
"protocol_fees0": "<string>",
"protocol_fees1": "<string>",
"swaps": "<string>",
"volume0": "<string>",
"volume1": "<string>"
},
"zero_liquidity_seconds": 1,
"last_trade_at": 123
}
}{
"error": "<string>",
"code": "<string>",
"ref": "<string>"
}{
"error": "<string>",
"code": "<string>",
"ref": "<string>"
}{
"error": "<string>",
"code": "<string>",
"ref": "<string>"
}{
"error": "<string>",
"code": "<string>",
"ref": "<string>"
}Get pool oracle
Read an indexed pool oracle snapshot for a selected time window.
GET
/
pools
/
{key}
/
oracle
Get pool oracle
curl --request GET \
--url https://api.swap.shield.fi/pools/{key}/oracleimport requests
url = "https://api.swap.shield.fi/pools/{key}/oracle"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.swap.shield.fi/pools/{key}/oracle', 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}/oracle",
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}/oracle"
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}/oracle")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.swap.shield.fi/pools/{key}/oracle")
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": {
"activated_at": 123,
"current_liquidity": "<string>",
"current_tick": 123,
"end_at": 123,
"epoch": 1,
"evaluated_at": 123,
"harmonic_liquidity": "<string>",
"mean_tick": 123,
"observed_block": 1,
"oldest_at": 123,
"paused": true,
"start_at": 123,
"tick_variance": "<string>",
"totals": {
"lp_fees0": "<string>",
"lp_fees1": "<string>",
"protocol_fees0": "<string>",
"protocol_fees1": "<string>",
"swaps": "<string>",
"volume0": "<string>",
"volume1": "<string>"
},
"zero_liquidity_seconds": 1,
"last_trade_at": 123
}
}{
"error": "<string>",
"code": "<string>",
"ref": "<string>"
}{
"error": "<string>",
"code": "<string>",
"ref": "<string>"
}{
"error": "<string>",
"code": "<string>",
"ref": "<string>"
}{
"error": "<string>",
"code": "<string>",
"ref": "<string>"
}