{"uid":"cap_JSwMFr-cp6Ma3IF5IwOIe","slug":"on-chain-erc-20-token-balance-lookup-47799253","name":"On-Chain ERC-20 Token Balance Lookup","description":"","url":"https://agent-commerce-factory-jm.austriaeast.cloudapp.azure.com/v1/onchain/token-balance","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["address","contract"],"properties":{"chain":{"type":"string","default":"ethereum","description":"EVM chain (ethereum, base, arbitrum, optimism, polygon, bsc)."},"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Wallet address."},"contract":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"ERC-20 token contract address."}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["machine","route","balance"],"properties":{"chain":{"type":"string"},"route":{"type":"string"},"address":{"type":"string"},"balance":{"type":"object","properties":{"raw":{"type":["string","null"]},"name":{"type":["string","null"]},"chain":{"type":["string","null"]},"symbol":{"type":["string","null"]},"address":{"type":["string","null"]},"balance":{"type":["string","null"]},"contract":{"type":["string","null"]},"decimals":{"type":["integer","null"]}}},"machine":{"type":"string"},"contract":{"type":"string"},"economics":{"type":"object","properties":{"sellPriceUsd":{"type":"number"},"upstreamCostUsdActual":{"type":["number","null"]}}}}}}}}},"responseSchema":null,"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_uOjmQv8g9bKhAgK5rnY_s","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 live ERC-20 token balance for a wallet address on a given EVM chain, including raw units, human-readable balance, token name, symbol, and decimals.","exampleAgentPrompt":"What's the current USDC balance for wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 on Ethereum? The USDC contract address is 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48.","exampleUseCases":[{"title":"Airdrop eligibility balance check","prompt":"Can you check the balance of the ARB token (contract 0x912CE59144191C1204E64559FE8253a0e49E6548) for wallet 0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B on Arbitrum? I need to verify if they received the airdrop."},{"title":"DeFi portfolio token valuation","prompt":"I'm building a DeFi portfolio summary — can you fetch the WETH balance (contract 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2) for wallet 0x47ac0Fb4F2D84898e4D9E7b4DaB3C24507a6D503 on Ethereum so I can calculate its USD value?"},{"title":"Treasury monitoring for DAO","prompt":"Please check the current USDT balance (contract 0xdAC17F958D2ee523a2206206994597C13D831ec7) held by our DAO treasury at 0x4F868C1aa37fCf307ab38D215382e88FCA6275E2 on Ethereum — we track this weekly."}],"resultDescription":"Returns a JSON object with the wallet address, contract address, chain, and a balance object containing: the raw token balance (in smallest units as a string), the human-readable balance (adjusted for decimals), the token name, symbol, decimals count, and contract address. Also includes economics metadata showing the call price.","failureModes":["Invalid wallet address format (must match 0x + 40 hex chars) returns a validation error","Invalid or non-ERC-20 contract address may return null balance fields","Unsupported chain name returns an error or empty response","Network/RPC timeout causes delayed or failed response","Token contract with non-standard decimals may produce unexpected balance values"],"whenToPreferThis":"Use this endpoint when you need live, on-chain ERC-20 token balances read directly from the blockchain — not from a centralized index or exchange. Ideal for wallet trackers, DeFi portfolio tools, airdrop verification, and treasury monitoring agents that require exact raw balances and token metadata (name, symbol, decimals) in a single call. Prefer this over exchange-based balance APIs when the wallet is non-custodial or when you need balances for arbitrary ERC-20 tokens by contract address across multiple EVM chains.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:46:30.156Z","isFirstParty":false}