{"uid":"cap_fQEwERikg0AFVzosZHuwq","slug":"erc-20-token-allowance-checker-base-chain-970650f4","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/v1/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_X3jKJEEpP9OJk7CfGB_4s","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 current ERC-20 token allowance granted by an owner to a spender on Base, including risk assessment, balance, and revocation recommendation.","exampleAgentPrompt":"Check what USDC allowance wallet 0xe4be4d0bd82d8e68203deff81f79ede0529f2617 has granted to Uniswap Permit2 (0x000000000022D473030F116dDEE9F6B43aC78BA3) on Base, and tell me if I should revoke it.","exampleUseCases":[{"title":"Pre-trade approval safety check","prompt":"Before my swap, check if wallet 0xe4be4d0bd82d8e68203deff81f79ede0529f2617 has given Uniswap Permit2 (0x000000000022D473030F116dDEE9F6B43aC78BA3) unlimited USDC approval on Base, and whether that's risky."},{"title":"Revocation decision for stale approvals","prompt":"I want to clean up my wallet 0xe4be4d0bd82d8e68203deff81f79ede0529f2617 — check the USDC allowance it gave to 0x000000000022D473030F116dDEE9F6B43aC78BA3 on Base and tell me if you'd recommend revoking it."},{"title":"Agent portfolio risk monitoring","prompt":"As part of my onchain risk check, look up how much USDC token (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) wallet 0xe4be4d0bd82d8e68203deff81f79ede0529f2617 has approved for spender 0x000000000022D473030F116dDEE9F6B43aC78BA3 on Base, and flag any unlimited exposure."}],"resultDescription":"Returns a JSON object with: the current allowance (human-readable and raw), whether it is unlimited, the owner's token balance, the spender's human-readable label (e.g. 'Uniswap Permit2'), a risk rating ('none', 'low', 'high'), an exposure value, a boolean revoke_recommended flag, an optional revoke_tx hex for on-chain revocation, token symbol and decimals, and the Base block number at query time.","failureModes":["Invalid owner or spender address format (must be 0x-prefixed 40-char hex) returns 400","Unsupported token contract returns error or empty result","Payment not included or insufficient USDC triggers x402 payment-required response","RPC/network timeout on Base returns 503 or delayed response","Non-Base token addresses silently default to USDC contract"],"whenToPreferThis":"Use this endpoint when an AI agent needs to programmatically audit ERC-20 token approvals on Base without managing API keys — particularly for pre-trade safety checks, wallet security audits, or automated revocation workflows. Prefer this over block explorers when you need structured JSON with risk labels and revocation hints ready for agent consumption. The pay-per-call x402 model (0.002 USDC) makes it suitable for on-demand queries without subscription overhead.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:42:20.481Z","isFirstParty":false,"canonicalSlug":"erc-20-token-allowance-checker-base-chain-d4200f69"}