{"uid":"cap_1DYz-Xkx2VBG4rdcqErm0","slug":"erc-20-allowance-lookup-on-base-169e82b6","name":"ERC-20 Allowance Lookup on Base","description":"ERC-20 allowance(owner, spender) on Base, raw + formatted, flags unlimited approvals.","url":"https://x402-data-api.sigrunner.workers.dev/chain/allowance?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","properties":{"owner":{"type":"string","description":"owner address"},"token":{"type":"string","description":"ERC-20 address"},"spender":{"type":"string","description":"spender address"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["token","owner","spender","allowance_raw","allowance","decimals","is_unlimited","chain"],"properties":{"chain":{"type":"string"},"owner":{"type":"string"},"token":{"type":"string"},"spender":{"type":"string"},"decimals":{"type":"integer"},"allowance":{"type":"integer"},"is_unlimited":{"type":"boolean"},"allowance_raw":{"type":"string"}}}}}}},"responseSchema":{"type":"json","example":{"chain":"base","owner":"0x5765ae06a52dc7A0BB71c36A11db512c7ea9ed10","token":"0x833589fCd6eDb6E08f4c7C32D4f71b54bdA02913","spender":"0x4200000000000000000000000000000000000006","decimals":6,"allowance":0,"is_unlimited":false,"allowance_raw":"0"}},"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_yaEcSfmFm0DUy2mgKwHvk","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 allowance granted by an owner to a spender on Base, with raw and formatted values plus an unlimited approval flag.","exampleAgentPrompt":"What is the USDC allowance that wallet 0x5765ae06a52dc7A0BB71c36A11db512c7ea9ed10 has granted to the spender 0x4200000000000000000000000000000000000006 on Base — is it unlimited?","exampleUseCases":[{"title":"Pre-trade approval check for DeFi agent","prompt":"Before executing this swap, check whether wallet 0xAbCd...1234 has approved the Uniswap router 0x4200000000000000000000000000000000000006 to spend USDC (0x833589fCd6eDb6E08f4c7C32D4f71b54bdA02913) on Base, and tell me if the allowance is unlimited."},{"title":"Unlimited approval security audit","prompt":"Scan wallet 0x5765ae06a52dc7A0BB71c36A11db512c7ea9ed10 — does it have an unlimited USDC approval set for the contract 0x4200000000000000000000000000000000000006 on Base? Flag it if so."},{"title":"Allowance sufficiency check before transfer","prompt":"I want to send 500 USDC on Base using the contract 0x4200000000000000000000000000000000000006 from owner 0x5765ae06a52dc7A0BB71c36A11db512c7ea9ed10 — check if the current allowance is enough to cover that amount."}],"resultDescription":"Returns a JSON object containing the chain (base), owner address, token address, spender address, token decimals, the allowance as a human-readable integer, the raw allowance string (in smallest units), and a boolean is_unlimited flag indicating whether the approval is effectively unlimited (max uint256).","failureModes":["Invalid or malformed owner/spender/token address returns an error or empty result","Token address not an ERC-20 contract on Base may return zero allowance or error","Network/RPC issues on Base may cause timeouts","Missing required query parameters (owner, token, spender) results in a bad request response","Payment failure via x402 protocol blocks access to the endpoint"],"whenToPreferThis":"Choose this endpoint when an AI agent needs to programmatically check ERC-20 token approvals on Base before executing a trade, transfer, or DeFi interaction — especially when detecting unlimited approvals is important for security gating. Prefer this over general blockchain RPCs when you want a pre-parsed, human-readable allowance with the unlimited flag already computed, without writing custom on-chain call logic.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-20T12:45:13.891Z","isFirstParty":false,"canonicalSlug":"erc-20-allowance-lookup-on-base-169e82b6"}