GET /api/wallet-balancesAll ERC-20 + native token balances for any EVM address in one call, from Coinbase's indexed data API — no per-token contract calls, no RPC wrangling. Networks: base, ethereum, base-sepolia. Symbols/decimals populated for whitelisted tokens (USDC always included).
| Field | Type | Description |
|---|---|---|
address * | string | EVM address (0x + 40 hex) |
network | string | base (default) | ethereum | base-sepolia |
{
"address": "0xaBF4FAbd7c416fB67202E5f9002389Fc75e2a9D0",
"network": "base",
"balances": [
{
"symbol": "USDC",
"name": "USD Coin",
"contract": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"amount": "8.655",
"raw": "8655000",
"decimals": 6
}
],
"count": 1
}
curl -i "https://agent402.tools/api/wallet-balances?address=0xaBF4FAbd7c416fB67202E5f9002389Fc75e2a9D0&network=base"
The response is HTTP 402 Payment Required with exact payment requirements. Any x402 v2 client pays automatically and retries:
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/api/wallet-balances?address=0xaBF4FAbd7c416fB67202E5f9002389Fc75e2a9D0&network=base");
POST /api/testnet-fundFund any address with testnet USDC (1 USDC) or ETH (0.0001) on Base Sepolia via the Coinbase faucet — everything an agen…
POST /api/onramp-linkGenerate a single-use Coinbase Onramp URL that lets a human fund any wallet with a card or Apple Pay — the fastest way t…