{"uid":"cap_yi7PQVgmPfqD0SHo3lbat","slug":"x402-chain-tools-erc-20-token-balance-d1d2be33","name":"x402 Chain Tools – ERC-20 Token Balance","description":"Get an ERC-20 token balance for a Base address.","url":"https://blockchain-api.x402-chain-tools.workers.dev/chain/token-balance","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"token":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"ERC-20 token contract address on Base."},"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Base wallet address."}}},"responseSchema":{"type":"json","example":{"ok":true,"token":"0x0000000000000000000000000000000000000002","address":"0x0000000000000000000000000000000000000001","balance":{"raw":"0","decimals":6,"formatted":"0"},"network":"eip155:8453"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_CIBz1xzpxXlhgJM9FN3cz","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns the ERC-20 token balance (raw, formatted, and decimal-adjusted) for a given wallet address on Base Mainnet.","exampleAgentPrompt":"What's the USDC balance on Base for wallet address 0xAbCd...1234? The USDC contract on Base is 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913.","exampleUseCases":[{"title":"DeFi portfolio balance check","prompt":"Check how many USDC tokens wallet 0xAbCd1234...5678 is holding on Base — the USDC contract address is 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913."},{"title":"Pre-transfer token sufficiency check","prompt":"Before I send tokens, can you check if address 0xDead...Beef has at least some WETH on Base? The WETH contract is 0x4200000000000000000000000000000000000006."},{"title":"Monitoring wallet holdings for an agent","prompt":"Keep an eye on how many USDC tokens are in our treasury wallet 0xCafe...F00D on Base — the token contract is 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 — and let me know the current balance right now."}],"resultDescription":"Returns a JSON object with ok status, the queried token contract address, the wallet address, and a balance object containing the raw integer balance string, the token's decimal precision, and a human-readable formatted balance string, plus the network identifier (eip155:8453 for Base Mainnet).","failureModes":["Invalid token contract address format (not a valid 0x ERC-20 address) returns an error","Invalid wallet address format (not a valid 0x address) returns an error","Token contract address does not correspond to a deployed ERC-20 on Base returns zero or error","Network congestion or RPC unavailability may cause timeouts","Payment failure (insufficient x402 balance) blocks the request"],"whenToPreferThis":"Choose this endpoint when you need the ERC-20 token balance of a specific wallet on Base Mainnet and require both the raw on-chain value and the human-readable formatted amount. It is ideal for agents that need to verify token holdings before executing a transfer, checking DeFi portfolio positions, or monitoring treasury balances. Prefer this over native ETH balance endpoints when the asset is an ERC-20 token rather than ETH itself.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:37:58.997Z","isFirstParty":false}