Token balances (named contracts)
POST /api/token-balancesERC-20 balances of one wallet for a NAMED list of token contracts (1-20) - the targeted complement to the full-portfolio wallet-balance tool. One balance read for the whole list plus symbol/decimals per contract (cached an hour server-side), so 'how much USDC and WETH does this wallet hold on Base?' is a single cheap call with exact decimal strings, not a portfolio dump.
Input
| Field | Type | Description |
|---|---|---|
address * | string | 0x-prefixed 40-char EVM wallet address. |
contracts * | array | 1-20 ERC-20 contract addresses to read. |
network | string | ethereum / base / polygon / arbitrum / optimism (default ethereum). |
Example output
{
"network": "ethereum",
"chainId": 1,
"address": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"tokens": [
{
"contract": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"symbol": "USDC",
"name": "USDC",
"decimals": 6,
"balance": "37.192124",
"raw": "37192124"
},
{
"contract": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"symbol": "WETH",
"name": "Wrapped Ether",
"decimals": 18,
"balance": "1.461",
"raw": "1461000000000000000"
}
],
"source": "alchemy",
"fetchedAt": "2026-08-22T12:00:00.000Z"
}
Try it - see the 402 challenge (free)
curl -i -X POST https://agent402.tools/api/token-balances \
-H "Content-Type: application/json" \
-d '{"address":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045","contracts":["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"],"network":"ethereum"}'
The response is HTTP 402 Payment Required with exact payment requirements. Any x402 v2 client pays automatically and retries:
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();
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/api/token-balances", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"contracts": [
"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
],
"network": "ethereum"
}),
});
Related tools
Crypto order book
GET /api/crypto-orderbookL2 order-book snapshot for a spot pair: best bid/ask, mid price, spread (absolute + %), and the top N aggregated price l…
try in playground →Stablecoin peg monitor
GET /api/stablecoin-pegLive $1-peg deviation for the top USD stablecoins (USDT, USDC, USDS, DAI, USDe, PYUSD, USDD, TUSD, FDUSD by default, or …
try in playground →Wallet balance (native + ERC-20)
POST /api/wallet-balanceLook up the native coin balance (ETH/MATIC) plus every ERC-20 holding for a wallet address on Ethereum, Base, Polygon, A…
try in playground →