Explorer period analytics
curl --request GET \
--url https://api.leokit.dev/explorer/analyticsimport requests
url = "https://api.leokit.dev/explorer/analytics"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.leokit.dev/explorer/analytics', 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/analytics",
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/analytics"
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/analytics")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.leokit.dev/explorer/analytics")
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": {
"generated_at": "2023-11-07T05:31:56Z",
"summary": {
"total_deposits": 123,
"total_quotes": 123,
"total_volume_usd": 123,
"total_fees_usd": 123,
"near_ecosystem_fees_usd": 123,
"conversion_rate": 123
},
"volume_timeline": [
{
"date": "<string>",
"count": 123,
"volume_usd": 123,
"fees_usd": 123
}
],
"protocols": [
{
"name": "<string>",
"count": 123,
"volume_usd": 123,
"success_rate": 123
}
],
"top_pairs": [
{
"from_asset": "<string>",
"to_asset": "<string>",
"count": 123,
"volume_usd": 123
}
],
"chains": [
{
"chain": "<string>",
"source_count": 123,
"dest_count": 123
}
]
}
}Explorer API
Analytics
Period-bucketed swap analytics — timelines, top pairs, protocol/chain breakdown
GET
/
explorer
/
analytics
Explorer period analytics
curl --request GET \
--url https://api.leokit.dev/explorer/analyticsimport requests
url = "https://api.leokit.dev/explorer/analytics"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.leokit.dev/explorer/analytics', 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/analytics",
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/analytics"
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/analytics")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.leokit.dev/explorer/analytics")
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": {
"generated_at": "2023-11-07T05:31:56Z",
"summary": {
"total_deposits": 123,
"total_quotes": 123,
"total_volume_usd": 123,
"total_fees_usd": 123,
"near_ecosystem_fees_usd": 123,
"conversion_rate": 123
},
"volume_timeline": [
{
"date": "<string>",
"count": 123,
"volume_usd": 123,
"fees_usd": 123
}
],
"protocols": [
{
"name": "<string>",
"count": 123,
"volume_usd": 123,
"success_rate": 123
}
],
"top_pairs": [
{
"from_asset": "<string>",
"to_asset": "<string>",
"count": 123,
"volume_usd": 123
}
],
"chains": [
{
"chain": "<string>",
"source_count": 123,
"dest_count": 123
}
]
}
}Endpoint
GET /leokit/explorer/analytics
Request
| Parameter | Type | Required | Description |
|---|---|---|---|
period | string | No | One of 7d, 30d (default), 90d, 6m, 1y, all |
| Period | Bucket size |
|---|---|
7d–90d, 6m | 1 day |
1y, all | 1 week (Monday-aligned) |
Response
{
"data": {
"period": "30d",
"generated_at": "2026-04-28T12:00:00.000Z",
"summary": {
"total_deposits": 51200,
"total_quotes": 0,
"total_volume_usd": 380120000.00,
"total_fees_usd": 38012.45,
"near_ecosystem_fees_usd": 18230.55,
"conversion_rate": 0
},
"volume_timeline": [
{ "date": "2026-04-01", "count": 1820, "volume_usd": 12480921.55, "fees_usd": 1248.09 }
],
"protocols": [
{ "name": "thorchain", "count": 18200, "volume_usd": 122480000.00, "success_rate": 1.0 }
],
"top_pairs": [
{
"from_asset": "ETH.USDC-0xA0b...",
"to_asset": "BTC.BTC",
"count": 482,
"volume_usd": 12480.55
}
],
"chains": [
{ "chain": "ETH", "source_count": 18402, "dest_count": 4820 }
]
}
}
Field Reference
Summary
| Field | Description |
|---|---|
total_deposits | Indexed swap count for the period |
total_quotes | Currently always 0 (quote-level data is not part of the explorer feed) |
total_volume_usd | USD volume across the period |
total_fees_usd | Sum of fees across the timeline (after merging NEAR ecosystem fees) |
near_ecosystem_fees_usd | NEAR-ecosystem fees received at leodex.near over the period |
conversion_rate | Currently always 0 (no quote data merged here) |
volume_timeline[]
| Field | Description |
|---|---|
date | Bucket start date (ISO YYYY-MM-DD). Weekly buckets are aligned to Monday |
count | Swap count in the bucket (includes synthetic NEAR-ecosystem entries when merged) |
volume_usd | USD volume in the bucket |
fees_usd | Affiliate fees in the bucket |
fee_usd and implied_volume_usd (computed as fee / 10 bps) to the matching bucket.
protocols[]
| Field | Description |
|---|---|
name | Protocol slug |
count | Swap count |
volume_usd | USD volume |
success_rate | Currently always 1.0 |
near row reflects the merged NEAR-ecosystem traffic (implied volume + on-chain swap count).
top_pairs[]
Top 10 trading pairs in the period, sorted by volume_usd.
chains[]
Per-chain source_count (swaps originating on the chain) and dest_count (swaps landing on the chain), sorted by total.
Errors
| Status | Description |
|---|---|
400 | period not one of the allowed values |
⌘I