{"uid":"cap_CNI3kJuCMHKS8aXnnMN2F","slug":"erc-20-balance-allowance-bundle-e54b4eeb","name":"ERC-20 Balance Allowance Bundle","description":"Returns both the ERC-20 balanceOf and allowance for a given token, owner, and spender in one paid call. Returns: each named part service's own result, in one paid call, keyed by the part's name -- exactly what each part returns when bought alone; the call succeeds only when every part answers. It takes the union of the parts' query parameters. Query: address, owner, spender, token.","url":"https://ari001.tailb4ac3a.ts.net/v1/ventures/ethereum_contract_abi_service/erc20_balance_allowance_bundle?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","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["token","address","owner","spender"],"properties":{"owner":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"0x + 40 hex"},"token":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"ERC-20 contract, 0x + 40 hex"},"address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"holder, 0x + 40 hex"},"spender":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"0x + 40 hex"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["ok","service"],"properties":{"ok":{"type":"boolean"},"error":{"type":"string","description":"present when ok is false"},"parts":{"type":"object","properties":{"erc20_allowance":{"type":"object","required":["ok","service"],"properties":{"ok":{"type":"boolean"},"chain":{"type":"string"},"error":{"type":"string","description":"present when ok is false"},"method":{"type":"string"},"result":{"type":"string","description":"the uint256 as a decimal string"},"service":{"type":"string"}}},"erc20_balanceof":{"type":"object","required":["ok","service"],"properties":{"ok":{"type":"boolean"},"chain":{"type":"string"},"error":{"type":"string","description":"present when ok is false"},"method":{"type":"string"},"result":{"type":"string","description":"the uint256 as a decimal string"},"service":{"type":"string"}}}}},"service":{"type":"string"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.006","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.006/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.006","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.006","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_GNPLxZebRa9evEdgU6T7n","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.006","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns both the ERC-20 token balance and spender allowance for a given token, owner, and spender in a single bundled call.","exampleAgentPrompt":"What's the USDC balance and how much is approved for Uniswap's router to spend, for wallet 0xAbCd...1234 with token 0xA0b8...eB48 and spender 0x68b3...1C68? Give me both in one call.","exampleUseCases":[{"title":"Pre-swap DeFi approval check","prompt":"Before I approve a swap on Uniswap, can you check both my USDC balance and how much I've already approved the router to spend? My wallet is 0x1234...abcd, the USDC token is 0xA0b8...eB48, and the Uniswap v3 router spender is 0x68b3...1C68."},{"title":"Portfolio and approval audit","prompt":"I want to audit my token position — can you pull both the token balance and the current allowance for my wallet 0xDEAD...BEEF on the DAI contract 0x6B17...D3E7, with spender being Aave's lending pool at 0x7d2...a3f in one shot?"},{"title":"Bot pre-trade eligibility check","prompt":"My trading bot needs to verify that wallet 0xABCD...1111 holds enough WETH (token 0xC02a...eE18) and has already approved the DEX contract 0x7a25...9Fa2 before placing an order — can you fetch both the balance and allowance together?"}],"resultDescription":"A JSON object with an 'ok' boolean and a 'parts' object containing two sub-results: 'erc20_balanceof' (with the token balance as a uint256 decimal string, chain, method, and ok/error) and 'erc20_allowance' (with the approved allowance as a uint256 decimal string, chain, method, and ok/error). The entire call fails if either part fails.","failureModes":["Invalid Ethereum address format (not matching 0x + 40 hex) returns a validation error","Either sub-call (balanceOf or allowance) failing causes the entire bundle to fail with ok=false","Non-existent or non-ERC-20 contract address may return zero or an RPC error","Network/RPC downtime causes the call to fail","Missing required query parameters (token, address, owner, or spender) returns an error"],"whenToPreferThis":"Choose this endpoint when you need both the ERC-20 balance and allowance for the same token and addresses in a single network round trip, saving latency and cost compared to making two separate calls. Ideal for DeFi bots, pre-trade checks, or any workflow that must evaluate both holding amount and spending approval before acting. If you only need one of the two values, prefer the individual balanceOf or allowance endpoints instead.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T12:30:13.007Z","isFirstParty":false,"canonicalSlug":"erc-20-balance-allowance-bundle-e54b4eeb"}