{"uid":"cap_NEob2eZr-_hjt4KmESaET","slug":"x402-agent-hub-erc-20-token-balance-5bc15857","name":"x402 Agent Hub – ERC-20 Token Balance","description":"ERC-20 token balance of any address on 7 EVM chains, returned raw and decimal-formatted with the token symbol, so agents never mis-scale USDC (6) vs 18-decimal tokens. You only pay for successful reads: invalid input, not-found and upstream errors cancel settlement.","url":"https://x402-agent-hub.x402-agent-hub.workers.dev/v1/chain/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":["address","token"],"properties":{"chain":{"type":"string","description":"base (default), ethereum, arbitrum, optimism, polygon, bsc or avalanche. Chain IDs also accepted."},"token":{"type":"string","description":"0x-prefixed ERC-20 token contract address."},"address":{"type":"string","description":"0x-prefixed wallet or contract address."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"chain":"base","token":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","address":"0x1721E9841257A34DbDBA407D4DBA3a727a02d072","balance":{"raw":"4250000","symbol":"USDC","decimals":6,"formatted":"4.25"},"chainId":8453,"blockNumber":38211554}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_sINQCD-ZrKio7e-yZiTjt","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","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 any wallet or contract address on 7 EVM chains, provided in both raw integer and human-readable decimal form with the token symbol and decimals.","exampleAgentPrompt":"What's the USDC balance of wallet 0x1721E9841257A34DbDBA407D4DBA3a727a02d072 on Base — give me the properly formatted amount, not just the raw integer.","exampleUseCases":[{"title":"DeFi portfolio balance checker","prompt":"Check how much USDC the wallet 0x1721E9841257A34DbDBA407D4DBA3a727a02d072 holds on Base, and make sure the amount is decimal-corrected so I see the real dollar figure, not the raw 6-decimal integer."},{"title":"Multi-chain token monitoring","prompt":"Look up the USDT balance for address 0xAbCd1234...5678 on both Ethereum and Arbitrum — I need the formatted balances so I can compare holdings across chains."},{"title":"Smart contract token audit","prompt":"What is the WETH balance held by the smart contract at 0xDeAd...BeeF on Polygon? Give me the human-readable amount with the correct 18-decimal formatting."}],"resultDescription":"A JSON object containing the chain name, chain ID, token contract address, queried wallet address, block number of the read, and a balance object with four fields: raw (integer string), formatted (human-readable decimal string), symbol (e.g. 'USDC'), and decimals (e.g. 6 or 18).","failureModes":["Invalid or malformed wallet/token address returns an error without charging","Unsupported chain name or chain ID returns an error without charging","Token contract address does not exist on the specified chain returns not-found without charging","Upstream RPC node unavailability triggers an error that cancels settlement","Missing required query parameters (address or token) results in a validation error"],"whenToPreferThis":"Choose this endpoint when you need correctly scaled ERC-20 token balances across multiple EVM chains without building your own RPC infrastructure. It is particularly valuable when you need to avoid decimal-scaling bugs (e.g. USDC's 6 decimals vs. most tokens' 18), and when you only want to pay per successful read. Prefer it over generic RPC calls when working with agents that need ready-to-use formatted numbers.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-14T12:33:56.979Z","isFirstParty":false,"canonicalSlug":"x402-agent-hub-erc-20-token-balance-5bc15857"}