Wallet token balances (indexed)

$0.002 per call · USDC via x402 · GET /api/wallet-balances

All token balances for any address in one call, from Coinbase's indexed data API - ERC-20 + native on EVM, SPL on Solana; no per-token contract calls, no RPC wrangling. Send GET /api/wallet-balances with the required field address and pay $0.002 per call over x402 or MPP (there is no free tier). It returns a JSON object with address, network, balances and count.

Networks: base, ethereum, base-sepolia, solana, solana-devnet. Symbols/decimals populated for whitelisted tokens (USDC always included).

Category: Wallet operations · Tags: cdp coinbase wallet onboarding x402 agent-wallet balances erc-20

TRY IN PLAYGROUND →

Parameters

NameTypeRequiredDescription
addressstringyesWallet address - EVM 0x… or Solana base58, matching the network Also accepted as addr, wallet, account.
networkstringnobase (default) | ethereum | base-sepolia | solana | solana-devnet

Example request

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

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

Example response

{
  "address": "0xaBF4FAbd7c416fB67202E5f9002389Fc75e2a9D0",
  "network": "base",
  "balances": [
    {
      "symbol": "USDC",
      "name": "USD Coin",
      "contract": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
      "amount": "8.655",
      "raw": "8655000",
      "decimals": 6
    }
  ],
  "count": 1
}
FieldTypeAlways presentIn the example
addressstringyes0xaBF4FAbd7c416fB67202E5f9002389Fc75e2a9D0
networkstringyesbase
balancesarray of objectsyes1 item in the example
countnumberyes1

From an MCP client

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

The hosted connector at https://agent402.tools/mcp needs a payment for wallet-balances; 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/wallet-balances?address=0xaBF4FAbd7c416fB67202E5f9002389Fc75e2a9D0&network=base");

Part of these workflows

Wallet token balances (indexed) is one step in this skill pack, each sold as a single call:

Related tools

Onchain SQL (query Base with SQL)

$0.020 · POST /api/onchain-sql

Run read-only SQL against Coinbase's indexed, DECODED blockchain data - base.events (decoded logs with parameters), base…

Onchain SQL schema

$0.002 · GET /api/onchain-sql-schema

The table + column schema for the onchain-sql tool - every queryable table (base.events, base.transactions, base.blocks,…

Onramp link (fund a wallet with a card)

$0.001 · POST /api/onramp-link

Generate a single-use Coinbase Onramp URL that lets a human fund any wallet with a card or Apple Pay - the fastest way t…

Testnet faucet (try x402 free)

$0.001 · POST /api/testnet-fund

Fund any address with testnet money via the Coinbase faucet - USDC (1) or ETH (0.0001) on Base Sepolia, USDC (1) or SOL …

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…

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…