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}
{
  "data": {
    "type": "evm"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.leokit.dev/llms.txt

Use this file to discover all available pages before exploring further.

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