Onchain Query API · TX

by Onchain Query API

GETBase

$0.003

per call · USD Coin on Base

Transaction lookup and decode on any major EVM chain. Turns a raw tx hash into agent-readable facts: success or failure status, block number, sender and recipient, native value transferred, gas used, fee in native token and USD, and every ERC-20 transfer decoded with token symbol, decimals and human-readable amount. Returns found=false for an unknown hash instead of erroring.

Endpoint

GET https://chain.cyberwarex.com/tx

4

Calls / 30d

1

Unique payers / 30d

Sep 1

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://chain.cyberwarex.com/tx", {
  method: "GET",
});
const data = await res.json();
cURL
curl -X GET \
  "https://chain.cyberwarex.com/tx?chain=base&hash=0x2f1c8b3d4e5a6f708192a3b4c5d6e7f8091a2b3c4d5e6f708192a3b4c5d6e7f8" \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "block": 21874431,
  "chain": "base",
  "erc20_transfers": [
    {
      "from": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
      "symbol": "USDC",
      "to": "0x1F98431c8aD98523631AE4a59f267346ea31F984",
      "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "value": 25,
      "value_raw": "25000000"
    }
  ],
  "fee": {
    "native": 5.34e-7,
    "usd": 0.00171
  },
  "found": true,
  "from": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
  "gas_used": 64231,
  "hash": "0x2f1c8b3d4e5a6f708192a3b4c5d6e7f8091a2b3c4d5e6f708192a3b4c5d6e7f8",
  "logs_count": 3,
  "status": "success",
  "to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "value_native": 0
}

Payment details

Pay to0x058d0cc5cc97e61e8a9f38d6d6365bce525921b2
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase
Schemesexact

Is this your API?

Pin it to the top of Onchain Data and the homepage with a featured placement.

Get featured →

More from Onchain Query API & similar services