{"uid":"cap_amzHn5t_4Xgq-oHIbmznF","slug":"agent-data-tools-erc-20-token-balance-on-base-9a8ded54","name":"Agent Data Tools: ERC-20 Token Balance on Base","description":"ERC-20 token balance of a wallet on Base (USDC, USDT, WETH or any token, via balanceOf): raw amount, decimals, symbol and the human-readable amount, live from the token contract. Use to check stablecoin or token holdings before a transfer or trade; for the native coin use base_balance. Both inputs are 0x addresses (40 hex characters); no contract returns 404 and a non-ERC-20 contract 422, both uncharged.","url":"https://agent-data-tools.revmesh2074.workers.dev/base/token-balance?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["token","address"],"properties":{"token":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"],"description":"Token: a ticker such as USDC, USDT, WETH or DAI, or the 0x ERC-20 contract address"},"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"],"description":"0x wallet address"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"raw":{"type":"string"},"chain":{"type":"string"},"token":{"type":"string"},"symbol":{"type":"string"},"address":{"type":"string"},"balance":{"type":"string"},"chainId":{"type":"number"},"decimals":{"type":"number"}}}}}}},"responseSchema":{"type":"json","example":{"raw":"2500000","chain":"Base","token":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","symbol":"USDC","address":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045","balance":"2.5","chainId":8453,"decimals":6}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_96NoHQKC66M8RbFT9zDf6","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","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 for a given wallet address on the Base blockchain, including human-readable and raw amounts.","exampleAgentPrompt":"What's the USDC balance for wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 on Base — the USDC contract address is 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913?","exampleUseCases":[{"title":"DeFi portfolio balance check","prompt":"Check how much USDC the wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 holds on Base using the USDC contract 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913."},{"title":"Pre-payment token sufficiency check","prompt":"Before I send a transaction, verify that wallet 0xAbc123...def has at least 50 USDC on Base — the USDC token contract is 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913."},{"title":"Agent treasury monitoring","prompt":"Check the current balance of our agent's treasury wallet 0x1234...5678 for the WETH token at contract 0x4200000000000000000000000000000000000006 on Base so I know if we need to top it up."}],"resultDescription":"Returns a JSON object with the wallet's token balance as a human-readable decimal string (e.g. '2.5'), the raw integer balance, the token symbol, decimals, the chain name ('Base'), chain ID (8453), the token contract address, and the queried wallet address.","failureModes":["Invalid or malformed 0x token contract address returns an error","Invalid or malformed 0x wallet address returns an error","Token contract not deployed on Base returns an empty or zero balance","Network/RPC timeout on Base node returns a 5xx error","Missing required query parameters (token or address) returns a 400 error"],"whenToPreferThis":"Choose this endpoint when you need the ERC-20 token balance of a specific wallet on the Base L2 network with no API key or account setup, paying only $0.001 per call in USDC. Prefer this over Etherscan or Alchemy when you want a pay-per-use model with no subscription, or when you need a simple lookup that integrates with x402 micropayment flows for AI agents.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-19T12:44:52.311Z","isFirstParty":false,"canonicalSlug":"agent-data-tools-erc-20-token-balance-on-base-9a8ded54"}