{"uid":"cap_Hh9UA8inFRvVt7zw1tLyJ","slug":"basebrief-x402-erc-20-token-allowance-lookup-db79512b","name":"BaseBrief x402 – ERC-20 Token Allowance Lookup","description":"Gas, balances, token metadata and allowances for $0.004 per result.","url":"https://basebrief-x402.savannah-5966.chatgpt.site/api/v1/base/allowance","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","owner","spender"],"properties":{"owner":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Base mainnet owner address."},"token":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Base mainnet token address."},"spender":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Base mainnet spender address."}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["evidence","limitations"],"properties":{"evidence":{"type":"object","additionalProperties":true},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true}}}}},"responseSchema":{"type":"json","example":{"evidence":{"chain":"Base mainnet","chainId":8453,"blockNumber":"35123456","pointInTime":true},"limitations":["Point-in-time direct Base JSON-RPC evidence."]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004","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.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_g4lUtBxOE48q5oatLFUzZ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","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 address to a spender address on Base mainnet, charged at $0.004 USDC per call via x402.","exampleAgentPrompt":"Check how much USDC (token 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) the owner wallet 0xAbCd1234... has approved for the Uniswap router 0x2626664c... to spend on Base mainnet.","exampleUseCases":[{"title":"Pre-swap allowance check for DeFi agent","prompt":"Before executing the swap, check whether wallet 0xUserWallet... has already approved enough USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) for the Uniswap v3 router 0x2626664c... to spend on Base mainnet."},{"title":"Security audit of wallet approvals","prompt":"I want to verify the exact token allowance that my wallet 0xMyWallet... has granted to the Aave lending pool contract 0xAavePoo... for the WETH token 0x4200000000000000000000000000000000000006 on Base — can you fetch the current approved amount?"},{"title":"Automated DeFi bot pre-flight check","prompt":"Before my yield farming bot proceeds, check if wallet 0xBotWallet... has approved the vault contract 0xVaultAddr... to spend cbETH token 0x2Ae3F1Ec... on Base mainnet and tell me the approved allowance."}],"resultDescription":"Returns a JSON object with the current allowance amount (in token base units) between the specified owner and spender for the given ERC-20 token on Base mainnet, along with on-chain evidence including chain ID (8453), block number at query time, and a flag indicating this is a point-in-time snapshot. Includes a limitations array noting the data reflects a single RPC query and may change with subsequent blocks.","failureModes":["Invalid Ethereum address format (not matching ^0x[0-9a-fA-F]{40}$) returns 400 validation error","Token address is not a valid ERC-20 contract on Base mainnet — may return zero or RPC error","x402 payment failure if USDC balance or payment authorization is insufficient","Base mainnet RPC node downtime or latency spikes causing delayed or failed responses","Queried block may become stale between request and use — allowance can change in subsequent blocks"],"whenToPreferThis":"Use this endpoint when you need a quick, cheap, on-chain point-in-time ERC-20 allowance check specifically on Base mainnet (chain 8453) and want a pay-per-call model via x402 without API key management. Prefer this over general blockchain RPC services when you need structured JSON evidence with provenance metadata rather than raw RPC responses, and when operating in an autonomous agent context that supports x402 micropayments.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:39:44.942Z","isFirstParty":false}