curl --request GET \
--url https://api.defiorbit.xyz/v1/pools/{chain_id}/{pool_address}/swaps \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.defiorbit.xyz/v1/pools/{chain_id}/{pool_address}/swaps', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.defiorbit.xyz/v1/pools/{chain_id}/{pool_address}/swaps"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.defiorbit.xyz/v1/pools/{chain_id}/{pool_address}/swaps"
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.defiorbit.xyz/v1/pools/{chain_id}/{pool_address}/swaps")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.defiorbit.xyz/v1/pools/{chain_id}/{pool_address}/swaps")
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<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.defiorbit.xyz/v1/pools/{chain_id}/{pool_address}/swaps",
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;
}{
"data": [
{
"timestamp": 1761012480,
"blockNumber": 21000000,
"logIndex": 4,
"txHash": "0xabc",
"txUrl": "https://eth.blockscout.com/tx/0xabc?utm_source=Defi_Orbit",
"zeroForOne": false,
"amountIn": 0.359,
"amountOut": 878.27,
"tokenIn": {
"address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"symbol": "WETH",
"decimals": 18
},
"tokenOut": {
"address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"symbol": "USDC",
"decimals": 6
},
"fee": 0.001,
"volumeUsd": 878.7,
"sender": "0x520e000000000000000000000000000000008aa7",
"senderUrl": "https://eth.blockscout.com/address/0x520e000000000000000000000000000000008aa7?utm_source=Defi_Orbit",
"recipient": "0x520e000000000000000000000000000000008aa7",
"priceImpact": 0.000033,
"priceImpactBps": 0.33
}
],
"pagination": {
"page": 1,
"limit": 25,
"total": 50,
"next_page": "https://api.defiorbit.xyz/v1/pools/1/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/swaps?page=2&limit=25",
"prev_page": null
},
"swapsIndexed": true,
"request_id": "req_..."
}{
"error": {
"code": "INVALID_PARAMETER",
"message": "page must be a positive integer.",
"request_id": "req_..."
}
}{
"error": {
"code": "INVALID_API_KEY",
"message": "Missing API key.",
"request_id": "req_..."
}
}{
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "Insufficient API credits.",
"request_id": "req_..."
}
}{
"error": {
"code": "ACCOUNT_SUSPENDED",
"message": "This organization is suspended.",
"request_id": "req_..."
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Pool not found",
"request_id": "req_..."
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Please try again later.",
"request_id": "req_..."
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred.",
"request_id": "req_..."
}
}Get Pool Swaps
Swap history for one indexed Uniswap V3 or Aerodrome Slipstream pool, newest first.
Each row is one swap: sold and bought amounts with token symbol and decimals, USD volume (the input at that UTC day’s closing price, or the current price when the day has no close), the unsigned price impact, and priceImpactBps — the same move in signed basis points. orientation only changes that sign. token1_per_token0 (the default) treats a token0 sale as a price drop.
txUrl and senderUrl are the block-explorer links. sender is the Swap event’s sender, usually a router.
from and to are optional inclusive bounds. A date (YYYY-MM-DD) is a UTC day; to then includes that whole day. An ISO-8601 timestamp must include a timezone. Omit both to page the full history.
page starts at 1. limit defaults to 25 and is capped at 100.
swapsIndexed is false, and data is empty, when this pool’s swaps are not recorded (no base token, or the chain has no swap stream yet). Orca pools are not on this route.
Credits: 1 per successful call.
curl --request GET \
--url https://api.defiorbit.xyz/v1/pools/{chain_id}/{pool_address}/swaps \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.defiorbit.xyz/v1/pools/{chain_id}/{pool_address}/swaps', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.defiorbit.xyz/v1/pools/{chain_id}/{pool_address}/swaps"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.defiorbit.xyz/v1/pools/{chain_id}/{pool_address}/swaps"
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.defiorbit.xyz/v1/pools/{chain_id}/{pool_address}/swaps")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.defiorbit.xyz/v1/pools/{chain_id}/{pool_address}/swaps")
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<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.defiorbit.xyz/v1/pools/{chain_id}/{pool_address}/swaps",
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;
}{
"data": [
{
"timestamp": 1761012480,
"blockNumber": 21000000,
"logIndex": 4,
"txHash": "0xabc",
"txUrl": "https://eth.blockscout.com/tx/0xabc?utm_source=Defi_Orbit",
"zeroForOne": false,
"amountIn": 0.359,
"amountOut": 878.27,
"tokenIn": {
"address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"symbol": "WETH",
"decimals": 18
},
"tokenOut": {
"address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"symbol": "USDC",
"decimals": 6
},
"fee": 0.001,
"volumeUsd": 878.7,
"sender": "0x520e000000000000000000000000000000008aa7",
"senderUrl": "https://eth.blockscout.com/address/0x520e000000000000000000000000000000008aa7?utm_source=Defi_Orbit",
"recipient": "0x520e000000000000000000000000000000008aa7",
"priceImpact": 0.000033,
"priceImpactBps": 0.33
}
],
"pagination": {
"page": 1,
"limit": 25,
"total": 50,
"next_page": "https://api.defiorbit.xyz/v1/pools/1/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/swaps?page=2&limit=25",
"prev_page": null
},
"swapsIndexed": true,
"request_id": "req_..."
}{
"error": {
"code": "INVALID_PARAMETER",
"message": "page must be a positive integer.",
"request_id": "req_..."
}
}{
"error": {
"code": "INVALID_API_KEY",
"message": "Missing API key.",
"request_id": "req_..."
}
}{
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "Insufficient API credits.",
"request_id": "req_..."
}
}{
"error": {
"code": "ACCOUNT_SUSPENDED",
"message": "This organization is suspended.",
"request_id": "req_..."
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Pool not found",
"request_id": "req_..."
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Please try again later.",
"request_id": "req_..."
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred.",
"request_id": "req_..."
}
}Authorizations
Paste your API key from the dashboard. The key starts with do_sk_.
Path Parameters
Query Parameters
Was this page helpful?