USDC balance

$0.003 per call · USDC via x402 · GET /api/usdc-balance · Cached 30s

Read the USDC balance of any address on Base, Polygon, Arbitrum, Optimism, Ethereum, Monad, Celo, Avalanche, or Sei. Send GET /api/usdc-balance with the required field address and pay $0.003 per call over x402 or MPP (there is no free tier). It returns a JSON object with address, usdc, raw, token and network.

Read-only on-chain call. The minimal single-token read for payment flows - for EVERY token a wallet holds in one call use wallet-balance. ?address=0x…&network=base

Category: Payments & x402 · Tags: usdc balance wallet erc20 multichain

TRY IN PLAYGROUND →

Parameters

NameTypeRequiredDescription
addressstringyes0x EVM address Also accepted as addr, wallet, account.
networkstringnochain: base | polygon | arbitrum | optimism | ethereum | monad | celo | avalanche | sei | robinhood (default base)

Example request

curl -i "https://agent402.tools/api/usdc-balance?address=0xaBF4FAbd7c416fB67202E5f9002389Fc75e2a9D0&network=base"

Without payment this returns HTTP 402 Payment Required with the exact price for usdc-balance; any x402 v2 or MPP client pays it and retries.

Example response

{
  "address": "0x…",
  "usdc": "12.5",
  "raw": "12500000",
  "token": "USDC",
  "network": "base"
}
FieldTypeAlways presentIn the example
addressstringyes0x…
usdcstringyes12.5
rawstringyes12500000
tokenstringyesUSDC
networkstringyesbase

From an MCP client

catalog.call {
  "slug": "usdc-balance",
  "params": {
    "address": "0xaBF4FAbd7c416fB67202E5f9002389Fc75e2a9D0",
    "network": "base"
  }
}

The hosted connector at https://agent402.tools/mcp needs a payment for usdc-balance; the stdio package pays it from a wallet or from AGENT402_CREDITS_KEY. Local install: npx -y agent402-mcp.

Errors and behavior

Paid call (JavaScript agent)

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();
client.setSpendControls?.(false); // keep your own spending ceiling in code
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agent402.tools/api/usdc-balance?address=0xaBF4FAbd7c416fB67202E5f9002389Fc75e2a9D0&network=base");

Related tools

Token balances (named contracts)

$0.002 · POST /api/token-balances

ERC-20 balances of one wallet for a NAMED list of token contracts (1-20) - the targeted complement to the full-portfolio…

Build USDC transfer authorization

$0.003 · POST /api/transfer-authorization

Build the EIP-3009 transferWithAuthorization typed data for a gasless USDC transfer on Base/Polygon/Arbitrum/Optimism/Et…

Verify x402 settlement

$0.004 · GET /api/x402-verify

Confirm a USDC payment actually settled: given a tx hash (and network), returns whether it succeeded and the USDC transf…

Wallet balance (native + ERC-20)

$0.002 · POST /api/wallet-balance

Look up the native coin balance (ETH/MATIC) plus every ERC-20 holding for a wallet address on Ethereum, Base, Polygon, A…

B20 token info

$0.005 · GET /api/b20-token-info

ERC-20 metadata plus B20 signals for any Base address: name, symbol, decimals, total supply, best-effort paused/cap, byt…

Gas price

$0.001 · GET /api/gas-estimate

Current gas price on Base, Polygon, Arbitrum, Optimism, Ethereum, Monad, Celo, Avalanche, Sei, or Robinhood Chain - for …