{"uid":"cap_G5_9Lo3ZBZC8UUJwCa3_L","slug":"erc-20-token-allowance-checker-base-chain-d4200f69","name":"ERC-20 Token Allowance Checker (Base Chain)","description":"Pay-per-call crypto microdata for trading/onchain AI agents via x402 (USDC on Base): Base gas, token risk, balances, multi-venue prices, Hyperliquid book/funding, kimchi premium. No API keys.","url":"https://kr-x402-mvp.kgy5612.workers.dev/api/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","required":["owner","spender"],"properties":{"owner":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0xe4be4d0bd82d8e68203deff81f79ede0529f2617"],"description":"Token holder (alias wallet)"},"token":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"],"description":"Base ERC-20 (default USDC)"},"amount":{"type":"number","examples":[1],"description":"Optional amount to test can_spend"},"spender":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x000000000022D473030F116dDEE9F6B43aC78BA3"],"description":"Approved spender / router"}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"risk":"none","block":53250000,"chain":"base","owner":"0xe4be4d0bd82d8e68203deff81f79ede0529f2617","token":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","symbol":"USDC","spender":"0x000000000022D473030F116dDEE9F6B43aC78BA3","decimals":6,"exposure":0,"allowance":0,"revoke_tx":null,"unlimited":false,"allowance_raw":"0","owner_balance":0.079,"spender_label":"Uniswap Permit2","revoke_recommended":false}},"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_e1w_ejsI9tp1wAeWRqXpk","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":"Fetches the current ERC-20 token allowance granted by an owner to a spender on Base, including balance, exposure risk, and revoke recommendation.","exampleAgentPrompt":"Check the USDC allowance that wallet 0xe4be4d0bd82d8e68203deff81f79ede0529f2617 has granted to Uniswap Permit2 (0x000000000022D473030F116dDEE9F6B43aC78BA3) on Base — tell me the current allowance, whether it's unlimited, and if a revoke is recommended.","exampleUseCases":[{"title":"Pre-swap approval audit","prompt":"Before I swap on Uniswap, check whether my wallet 0xe4be4d0bd82d8e68203deff81f79ede0529f2617 has already approved the Permit2 router 0x000000000022D473030F116dDEE9F6B43aC78BA3 to spend my USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) on Base, and whether that allowance is safe or unlimited."},{"title":"Security sweep for unlimited approvals","prompt":"Audit wallet 0xe4be4d0bd82d8e68203deff81f79ede0529f2617 — check if the USDC allowance granted to spender 0x000000000022D473030F116dDEE9F6B43aC78BA3 on Base is unlimited and whether I should revoke it."},{"title":"Agent self-check before paying counterparty","prompt":"My agent is about to pay 1 USDC to 0x000000000022D473030F116dDEE9F6B43aC78BA3 from 0xe4be4d0bd82d8e68203deff81f79ede0529f2617 on Base — quickly check the current USDC allowance and whether the spender is already authorized for at least that amount."}],"resultDescription":"Returns a JSON object with the current allowance (human-readable and raw), whether the allowance is unlimited, the owner's token balance, the spender's known label (e.g. 'Uniswap Permit2'), a risk classification, the exposure amount, and a boolean revoke_recommended flag plus a revoke_tx if applicable. Also includes chain context (block number, chain name, token symbol, decimals).","failureModes":["Invalid Ethereum address format for owner or spender returns a validation error","Token contract address not found on Base returns an error or empty result","Network or RPC timeout may return a 503 or empty response","Wallet with zero balance or no prior approval returns allowance of 0 and revoke_recommended false","Missing required owner or spender query params returns 400 bad request"],"whenToPreferThis":"Use this endpoint when an AI agent needs to verify on-chain ERC-20 token approvals on Base before executing a DeFi transaction, auditing wallet security, or checking whether a spender (e.g. a DEX router) already has sufficient allowance. Prefer it over general blockchain explorers when you need structured, machine-readable allowance data with risk classification and revoke recommendations in a single low-cost call. Requires no API key — pay $0.002 USDC per call via x402.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:41:46.937Z","isFirstParty":false,"canonicalSlug":"erc-20-token-allowance-checker-base-chain-d4200f69"}