81trust / 100

Base Live Balance

by base-live-balance in Onchain & crypto

x402 APIPassing, checked 33 min ago

Native ETH balance plus up to 20 ERC20 token balances for one wallet on Base mainnet, in a single Multicall3 round trip regardless of token count.

POST https://x402.agentindex.world/base/live-balance

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
65 ms typical, 65 ms slowest 5%
Last check
33 min ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://x402.agentindex.world/base/live-balance" \
  -H "content-type: application/json" \
  -d '{"tokens":["0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","0x4200000000000000000000000000000000000006"],"wallet":"0xb3F32bdfe8D07825BC0D7387295aB1D7559BA69d"}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fx402.agentindex.world%2Fbase%2Flive-balance
const res = await pay("https://x402.agentindex.world/base/live-balance", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"tokens":["0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","0x4200000000000000000000000000000000000006"],"wallet":"0xb3F32bdfe8D07825BC0D7387295aB1D7559BA69d"}),
});
console.log(await res.json());

Example input

{
  "tokens": [
    "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "0x4200000000000000000000000000000000000006"
  ],
  "wallet": "0xb3F32bdfe8D07825BC0D7387295aB1D7559BA69d"
}

Example output

{
  "native_balance_eth": 0,
  "native_balance_wei": "0",
  "tokens": [
    {
      "balance": 0.027892,
      "balance_raw": "27892",
      "decimals": 6,
      "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
    },
    {
      "balance": 0,
      "balance_raw": "0",
      "decimals": 18,
      "token": "0x4200000000000000000000000000000000000006"
    }
  ],
  "wallet": "0xb3F32bdfe8D07825BC0D7387295aB1D7559BA69d"
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
33 min agoPassed402210 ms$0.003
4 h agoPassed40251 ms$0.003
9 h agoPassed40265 ms$0.003