Skip to main content
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": {}
}

Endpoint

GET /leokit/explorer/onchain/{chain}/{hash}
No authentication required.

Request

Path parameterTypeRequiredDescription
chainstringYesChain code (case-insensitive) — see supported list below
hashstringYesTransaction 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..."
  }
}
FieldDescription
type"evm"
block_numberBlock height
status"success" (0x1), "failed" (0x0), or null if pending
confirmationslatestBlock - blockNumber
gas_usedGas units consumed
effective_gas_price_gweiEffective gas price formatted as a 4-decimal string (gwei)
nonceSender nonce
log_countNumber of event logs
input_dataRaw 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
  }
}
FieldDescription
type"utxo"
block_heightBlock height when confirmed
confirmed_atBlock time as ISO-8601
fee_satTotal fee in satoshis
sizeTransaction size in bytes
vsizeVirtual size (witness-discounted) in bytes

Unknown Chain

If the chain is not in either supported set:
{ "data": { "type": "unknown" } }

Errors

StatusDescription
400Missing hash path parameter
500Upstream 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_getTransactionByHash or eth_getTransactionReceipt fails — fields will be null rather than the request erroring out.
  • This endpoint is intentionally chain-agnostic at the response level (type discriminates EVM vs UTXO). Future chains will use new type values.
  • For multi-protocol swap status (the cross-chain settlement view), use /leokit/status instead.

Path Parameters

chain
string
required
hash
string
required

Response

200 - application/json

Chain-specific transaction state. Body shape depends on chain family (evm or utxo).

data
object
required