Transaction detail
curl --request GET \
--url https://api.leokit.dev/explorer/tx/{id}import requests
url = "https://api.leokit.dev/explorer/tx/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.leokit.dev/explorer/tx/{id}', 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/tx/{id}",
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/tx/{id}"
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/tx/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.leokit.dev/explorer/tx/{id}")
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": {
"id": "<string>",
"tx_hash": "<string>",
"from_asset": "<string>",
"to_asset": "<string>",
"from_address": "<string>",
"to_address": "<string>",
"volume_usd": 123,
"protocol": "<string>",
"swap_date": "2023-11-07T05:31:56Z",
"from_symbol": "<string>",
"to_symbol": "<string>",
"from_chain": "<string>",
"to_chain": "<string>",
"scanner_url": "<string>",
"related_txs": [
{
"id": "<string>",
"tx_hash": "<string>",
"from_asset": "<string>",
"to_asset": "<string>",
"from_address": "<string>",
"to_address": "<string>",
"volume_usd": 123,
"protocol": "<string>",
"swap_date": "2023-11-07T05:31:56Z",
"from_symbol": "<string>",
"to_symbol": "<string>",
"from_chain": "<string>",
"to_chain": "<string>"
}
]
}
}Explorer API
Transaction Detail
Single-transaction lookup with native-scanner URL and related-tx context
GET
/
explorer
/
tx
/
{id}
Transaction detail
curl --request GET \
--url https://api.leokit.dev/explorer/tx/{id}import requests
url = "https://api.leokit.dev/explorer/tx/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.leokit.dev/explorer/tx/{id}', 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/tx/{id}",
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/tx/{id}"
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/tx/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.leokit.dev/explorer/tx/{id}")
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": {
"id": "<string>",
"tx_hash": "<string>",
"from_asset": "<string>",
"to_asset": "<string>",
"from_address": "<string>",
"to_address": "<string>",
"volume_usd": 123,
"protocol": "<string>",
"swap_date": "2023-11-07T05:31:56Z",
"from_symbol": "<string>",
"to_symbol": "<string>",
"from_chain": "<string>",
"to_chain": "<string>",
"scanner_url": "<string>",
"related_txs": [
{
"id": "<string>",
"tx_hash": "<string>",
"from_asset": "<string>",
"to_asset": "<string>",
"from_address": "<string>",
"to_address": "<string>",
"volume_usd": 123,
"protocol": "<string>",
"swap_date": "2023-11-07T05:31:56Z",
"from_symbol": "<string>",
"to_symbol": "<string>",
"from_chain": "<string>",
"to_chain": "<string>"
}
]
}
}Endpoint
GET /leokit/explorer/tx/{id}
{id} is the swap row id or transaction hash. As a fallback, you can pass ?tx_hash=0x... to look up by hash without using the path segment.
No authentication required.
Response
Success (200)
{
"data": {
"id": "01953c9a-...",
"tx_hash": "0xabc...",
"from_asset": "ETH.USDC-0xA0b...",
"to_asset": "BTC.BTC",
"from_address": "0x1234...",
"to_address": "bc1q...",
"volume_usd": 1234.56,
"protocol": "thorchain",
"swap_date": "2026-04-28T12:00:00.000Z",
"from_symbol": "USDC",
"to_symbol": "BTC",
"from_chain": "ETH",
"to_chain": "BTC",
"scanner_url": "https://etherscan.io/tx/0xabc...",
"related_txs": [
/* up to 5 ExplorerTransaction objects from the same `from_address` */
]
}
}
| Field | Description |
|---|---|
scanner_url | Native chain scanner URL for tx_hash (Etherscan, mempool.space, etc.) |
related_txs | Up to 5 most recent other swaps from the same from_address |
ExplorerTransaction (see overview).
Errors
| Status | Description |
|---|---|
400 | Missing id path parameter and no tx_hash query |
404 | No row matched id or tx_hash |
Examples
# By tx hash (path)
curl "https://api.leokit.dev/leokit/explorer/tx/0xabc..."
# By tx hash (query)
curl "https://api.leokit.dev/leokit/explorer/tx/x?tx_hash=0xabc..."
# By internal swap id
curl "https://api.leokit.dev/leokit/explorer/tx/01953c9a-..."
⌘I