Skip to main content
GET
/
explorer
/
stats
Explorer top-level stats
curl --request GET \
  --url https://api.leokit.dev/explorer/stats
import 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
No authentication required. Cached for 60 seconds.

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

FieldDescription
total_swapsLifetime swap count
swaps_24hSwaps in the past 24 hours
volume_24h_usdUSD volume in the past 24 hours
total_volume_usdUSD volume across the most recent 10,000 indexed rows
total_fees_usdSum of (affiliate_fee_bps / 10000) * volume_usd across the same window
near_ecosystem_fees_usdNEAR-ecosystem affiliate fees received at leodex.near
unique_chainsDistinct source chains observed in the indexed window
unique_wallets_24hDistinct from_address values in the past 24 hours
avg_swap_size_usdvolume_24h_usd / swaps_24h
success_rateCurrently always 1.0 (failed swaps are not indexed)
protocols_activeDistinct protocol names observed in the indexed window
supported_chainsTotal chains LeoKit can swap (configuration-derived, not data-derived)
supported_protocolsTotal protocols LeoKit can route to
volume_by_protocolPer-protocol count + volume_usd

Caching

HeaderValue
X-CacheHIT or MISS
The cache TTL is 60 seconds.

Errors

StatusDescription
500Failed to query Supabase or aggregate results

Response

200 - application/json

Aggregated swap stats.

data
object
required