Raw chain-state lookup
curl --request GET \
--url https://api.leokit.dev/explorer/onchain/{chain}/{hash}import requests
url = "https://api.leokit.dev/explorer/onchain/{chain}/{hash}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.leokit.dev/explorer/onchain/{chain}/{hash}', 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/onchain/{chain}/{hash}",
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/onchain/{chain}/{hash}"
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/onchain/{chain}/{hash}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.leokit.dev/explorer/onchain/{chain}/{hash}")
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": {
"type": "evm"
}
}Explorer API
Onchain Lookup
Raw chain-state lookup for a transaction hash on EVM or UTXO networks
GET
/
explorer
/
onchain
/
{chain}
/
{hash}
Raw chain-state lookup
curl --request GET \
--url https://api.leokit.dev/explorer/onchain/{chain}/{hash}import requests
url = "https://api.leokit.dev/explorer/onchain/{chain}/{hash}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.leokit.dev/explorer/onchain/{chain}/{hash}', 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/onchain/{chain}/{hash}",
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/onchain/{chain}/{hash}"
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/onchain/{chain}/{hash}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.leokit.dev/explorer/onchain/{chain}/{hash}")
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": {
"type": "evm"
}
}Endpoint
GET /leokit/explorer/onchain/{chain}/{hash}
Request
| Path parameter | Type | Required | Description |
|---|---|---|---|
chain | string | Yes | Chain code (case-insensitive) — see supported list below |
hash | string | Yes | Transaction hash |
Supported Chains
EVM (via DRPC)
ETH, ARB / ARBITRUM, BASE, OP / OPTIMISM, BSC / BNB / BNBCHAIN, AVAX / AVAX_CCHAIN, POLYGON / MATIC, FTM, LINEA, SCROLL, BLAST, ZKSYNC, SONIC, HYPERLIQUID
UTXO (via mempool.space)
BTC, LTC, DOGE, BCH
Response
EVM Chains
{
"data": {
"type": "evm",
"block_number": 19842018,
"status": "success",
"confirmations": 24,
"gas_used": 165820,
"effective_gas_price_gwei": "5.4321",
"nonce": 142,
"log_count": 4,
"input_data": "0x..."
}
}
| Field | Description |
|---|---|
type | "evm" |
block_number | Block height |
status | "success" (0x1), "failed" (0x0), or null if pending |
confirmations | latestBlock - blockNumber |
gas_used | Gas units consumed |
effective_gas_price_gwei | Effective gas price formatted as a 4-decimal string (gwei) |
nonce | Sender nonce |
log_count | Number of event logs |
input_data | Raw transaction calldata hex |
UTXO Chains
{
"data": {
"type": "utxo",
"block_height": 842018,
"confirmed_at": "2026-04-28T12:00:00.000Z",
"fee_sat": 1820,
"size": 412,
"vsize": 240
}
}
| Field | Description |
|---|---|
type | "utxo" |
block_height | Block height when confirmed |
confirmed_at | Block time as ISO-8601 |
fee_sat | Total fee in satoshis |
size | Transaction size in bytes |
vsize | Virtual size (witness-discounted) in bytes |
Unknown Chain
If the chain is not in either supported set:{ "data": { "type": "unknown" } }
Errors
| Status | Description |
|---|---|
400 | Missing hash path parameter |
500 | Upstream RPC/explorer call failed |
Examples
# Ethereum
curl "https://api.leokit.dev/leokit/explorer/onchain/ETH/0xabc..."
# Arbitrum (alias)
curl "https://api.leokit.dev/leokit/explorer/onchain/ARBITRUM/0xdef..."
# Bitcoin
curl "https://api.leokit.dev/leokit/explorer/onchain/BTC/abc1234..."
Notes
- EVM lookups return partial data if either
eth_getTransactionByHashoreth_getTransactionReceiptfails — fields will benullrather than the request erroring out. - This endpoint is intentionally chain-agnostic at the response level (
typediscriminates EVM vs UTXO). Future chains will use newtypevalues. - For multi-protocol swap status (the cross-chain settlement view), use
/leokit/statusinstead.