List pool trades
curl --request GET \
--url https://api.swap.shield.fi/pools/{key}/tradesimport requests
url = "https://api.swap.shield.fi/pools/{key}/trades"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.swap.shield.fi/pools/{key}/trades', 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}/trades",
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}/trades"
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}/trades")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.swap.shield.fi/pools/{key}/trades")
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": [
{
"amount0": "<string>",
"amount1": "<string>",
"executedAt": "<string>",
"id": "<string>",
"legIndex": 123,
"pool": "<string>",
"tradeType": "mint",
"transactionHash": "<string>",
"fee0": "<string>",
"fee1": "<string>",
"liquidityAfter": "<string>",
"protocolFee0": "<string>",
"protocolFee1": "<string>",
"sqrtPriceAfter": "<string>",
"tickAfter": 123
}
],
"pagination": {
"limit": 123,
"offset": 123,
"total": 123
}
}{
"error": "<string>",
"code": "<string>",
"ref": "<string>"
}{
"error": "<string>",
"code": "<string>",
"ref": "<string>"
}{
"error": "<string>",
"code": "<string>",
"ref": "<string>"
}List pool trades
List indexed trades for a pool.
GET
/
pools
/
{key}
/
trades
List pool trades
curl --request GET \
--url https://api.swap.shield.fi/pools/{key}/tradesimport requests
url = "https://api.swap.shield.fi/pools/{key}/trades"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.swap.shield.fi/pools/{key}/trades', 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}/trades",
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}/trades"
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}/trades")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.swap.shield.fi/pools/{key}/trades")
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": [
{
"amount0": "<string>",
"amount1": "<string>",
"executedAt": "<string>",
"id": "<string>",
"legIndex": 123,
"pool": "<string>",
"tradeType": "mint",
"transactionHash": "<string>",
"fee0": "<string>",
"fee1": "<string>",
"liquidityAfter": "<string>",
"protocolFee0": "<string>",
"protocolFee1": "<string>",
"sqrtPriceAfter": "<string>",
"tickAfter": 123
}
],
"pagination": {
"limit": 123,
"offset": 123,
"total": 123
}
}{
"error": "<string>",
"code": "<string>",
"ref": "<string>"
}{
"error": "<string>",
"code": "<string>",
"ref": "<string>"
}{
"error": "<string>",
"code": "<string>",
"ref": "<string>"
}Path Parameters
Pool key
Query Parameters
Page size (1-100)
Page offset
Indexed pool trade type filter
Available options:
mint, add_liquidity, remove_liquidity, burn, collect, swap