{"uid":"cap_rQQEpmbpXF7Up2mBA8ph5","slug":"agent-data-tools-erc-20-token-balance-lookup-70ac74a6","name":"Agent Data Tools: ERC-20 Token Balance Lookup","description":"ERC-20 token balance of a wallet on Optimism (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 op_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/op/token-balance?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","required":["token","address"],"properties":{"token":{"type":"string","description":"Token: a ticker such as USDC, USDT, WETH or DAI, or the 0x ERC-20 contract address"},"address":{"type":"string","description":"0x wallet address"}}},"responseSchema":{"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"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USD","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_9RpSJXf6w5YQnkQK54xjy","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","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 of a given wallet address for a specified token contract on a supported EVM chain","exampleAgentPrompt":"What's the USDC balance (contract 0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85) for wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 on Optimism?","exampleUseCases":[{"title":"DeFi portfolio balance check","prompt":"How much USDC does wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 currently hold? The USDC contract on Optimism is 0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85."},{"title":"Airdrop eligibility verification","prompt":"Check whether wallet 0xAbCd1234...5678 holds any of the governance token at contract 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984 on Ethereum — I need to know the exact balance."},{"title":"Smart contract treasury audit","prompt":"What is the current token balance of our treasury wallet 0xBEEF...CAFE for the WETH contract 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 on the Ethereum mainnet?"}],"resultDescription":"Returns a JSON object with the human-readable token balance (e.g. '2.5'), the raw integer balance (e.g. '2500000'), the token symbol, decimals, the wallet address queried, the token contract address, the chain name (e.g. 'Optimism'), and the numeric chain ID.","failureModes":["Invalid or malformed wallet address returns an error or empty response","Invalid ERC-20 contract address returns an error or zero balance","Chain not supported results in an error response","Network timeout or RPC node unavailability causes a request failure","Wallet with zero balance returns balance of '0' rather than an error","Missing required query parameters (token or address) returns a 400-level error"],"whenToPreferThis":"Use this endpoint when you need a live, on-chain ERC-20 token balance for a specific wallet-and-token-contract pair across Base, Ethereum, Arbitrum, Optimism, or Polygon, and you want pay-per-call pricing with no API key setup. Prefer it over general blockchain explorers when building AI agent workflows that need structured JSON output and micropayment-compatible access via x402.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T06:45:10.718Z","isFirstParty":false,"canonicalSlug":"agent-data-tools-erc-20-token-balance-lookup-70ac74a6"}