Explorer top-level stats
curl --request GET \
--url https://api.leokit.dev/explorer/statsimport requests
url = "https://api.leokit.dev/explorer/stats"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.leokit.dev/explorer/stats', 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.leokit.dev/explorer/stats",
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.leokit.dev/explorer/stats"
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.leokit.dev/explorer/stats")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.leokit.dev/explorer/stats")
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": {
"total_swaps": 123,
"swaps_24h": 123,
"volume_24h_usd": 123,
"total_volume_usd": 123,
"total_fees_usd": 123,
"near_ecosystem_fees_usd": 123,
"unique_chains": 123,
"unique_wallets_24h": 123,
"avg_swap_size_usd": 123,
"success_rate": 123,
"protocols_active": 123,
"supported_chains": 123,
"supported_protocols": 123,
"volume_by_protocol": {}
}
}Explorer API
Stats
Top-level totals over the entire LeoKit swap dataset (24h + lifetime)
GET
/
explorer
/
stats
Explorer top-level stats
curl --request GET \
--url https://api.leokit.dev/explorer/statsimport requests
url = "https://api.leokit.dev/explorer/stats"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.leokit.dev/explorer/stats', 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.leokit.dev/explorer/stats",
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.leokit.dev/explorer/stats"
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.leokit.dev/explorer/stats")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.leokit.dev/explorer/stats")
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": {
"total_swaps": 123,
"swaps_24h": 123,
"volume_24h_usd": 123,
"total_volume_usd": 123,
"total_fees_usd": 123,
"near_ecosystem_fees_usd": 123,
"unique_chains": 123,
"unique_wallets_24h": 123,
"avg_swap_size_usd": 123,
"success_rate": 123,
"protocols_active": 123,
"supported_chains": 123,
"supported_protocols": 123,
"volume_by_protocol": {}
}
}Endpoint
GET /leokit/explorer/stats
Response
{
"data": {
"total_swaps": 482015,
"swaps_24h": 1842,
"volume_24h_usd": 12480921.55,
"total_volume_usd": 4720112350.20,
"total_fees_usd": 481200.45,
"near_ecosystem_fees_usd": 18230.55,
"unique_chains": 28,
"unique_wallets_24h": 982,
"avg_swap_size_usd": 6770.40,
"success_rate": 1.0,
"protocols_active": 9,
"supported_chains": 32,
"supported_protocols": 11,
"volume_by_protocol": {
"thorchain": { "count": 192015, "volume_usd": 1820000000 },
"chainflip": { "count": 122104, "volume_usd": 945000000 },
"near": { "count": 51200, "volume_usd": 380000000 }
}
}
}
Field Reference
| Field | Description |
|---|---|
total_swaps | Lifetime swap count |
swaps_24h | Swaps in the past 24 hours |
volume_24h_usd | USD volume in the past 24 hours |
total_volume_usd | USD volume across the most recent 10,000 indexed rows |
total_fees_usd | Sum of (affiliate_fee_bps / 10000) * volume_usd across the same window |
near_ecosystem_fees_usd | NEAR-ecosystem affiliate fees received at leodex.near |
unique_chains | Distinct source chains observed in the indexed window |
unique_wallets_24h | Distinct from_address values in the past 24 hours |
avg_swap_size_usd | volume_24h_usd / swaps_24h |
success_rate | Currently always 1.0 (failed swaps are not indexed) |
protocols_active | Distinct protocol names observed in the indexed window |
supported_chains | Total chains LeoKit can swap (configuration-derived, not data-derived) |
supported_protocols | Total protocols LeoKit can route to |
volume_by_protocol | Per-protocol count + volume_usd |
Caching
| Header | Value |
|---|---|
X-Cache | HIT or MISS |
Errors
| Status | Description |
|---|---|
500 | Failed to query Supabase or aggregate results |
Response
200 - application/json
Aggregated swap stats.
Show child attributes
Show child attributes
⌘I