{"uid":"cap_OkUwE2RHPuAV0QHIx9suB","slug":"op-mainnet-erc-20-allowance-lookup-a3f9f1cd","name":"OP Mainnet ERC-20 Allowance Lookup","description":"Pay-per-call data for AI agents, paid in USDC on Base with x402: token risk checks (rug check) on Base, Ethereum, Arbitrum, Optimism, Polygon and Solana, onchain reads (balances, transactions, gas, contracts, NFTs, whale trades, new pools, ENS and Basenames), ECB exchange rates, and Canadian sales tax and business days.","url":"https://ca-tax-api-mainnet.lxtap.workers.dev/optimism/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":["token","owner","spender"],"properties":{"owner":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Address that granted the approval"},"token":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"ERC-20 contract on OP Mainnet"},"spender":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Address allowed to spend"}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"raw":"60000000","chain":"optimism","owner":"0x9B1e7350517c2C94a990e55aC6c20De37675c703","token":"0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85","symbol":"USDC","spender":"0xFb4e4811C7A811E098A556bD79B64c20b479E431","allowance":"60","unlimited":false,"ownerBalance":"66.148476","spendableNow":"60"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_6pv_9IMc8NA69_2Y8hJmC","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","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 on OP Mainnet, including how much a spender may transfer from an owner, whether the approval is unlimited, the owner's current balance, and the transferable amount.","exampleAgentPrompt":"Check the ERC-20 allowance on OP Mainnet for token 0x7F5c764cBc14f9669B88837ca1490cCa17c31607 — I want to know how much the spender 0xE592427A0AEce92De3Edee1F18E0157C05861564 is approved to transfer from owner 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045, whether it's unlimited, and how much they could actually move right now.","exampleUseCases":[{"title":"DeFi protocol approval audit","prompt":"On OP Mainnet, check the USDC allowance (token 0x7F5c764cBc14f9669B88837ca1490cCa17c31607) that the Uniswap router at 0xE592427A0AEce92De3Edee1F18E0157C05861564 has been granted by my wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 — is the approval unlimited, and how much could it actually move?"},{"title":"Security review of unlimited approvals","prompt":"I want to verify whether the spender 0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45 has an unlimited ERC-20 approval for the OP Mainnet token at 0x4200000000000000000000000000000000000042 from owner 0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B — fetch the allowance details and tell me if it's effectively uncapped."},{"title":"Pre-swap allowance check on Optimism","prompt":"Before I run a swap on Optimism, can you check how much of the token at 0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1 the DEX contract 0x1111111254EEB25477B68fb85Ed929f73A960582 is allowed to spend from 0x9C5AE89C4Af6aA32cE58588DBaF90d18a855B6de, and whether that covers the amount in my wallet?"}],"resultDescription":"Returns a structured object with the numeric allowance granted to the spender, a boolean indicating whether the approval is effectively unlimited (e.g. max uint256), the owner's current token balance, and the actual amount the spender could transfer right now (the lesser of allowance and balance).","failureModes":["Invalid Ethereum address format for token, owner, or spender — returns 400 error","Token address does not correspond to a valid ERC-20 contract on OP Mainnet — may return zero or error","RPC node timeout or OP Mainnet congestion causing delayed or failed response","Missing required query parameters — returns validation error","Non-existent allowance returns zero values without error"],"whenToPreferThis":"Use this endpoint when you specifically need ERC-20 allowance data on OP Mainnet (Optimism). Prefer it over Ethereum or Base equivalents when the token and addresses are on Optimism. It is the right choice for auditing DeFi approvals, checking pre-swap permissions, or verifying whether a spender has unlimited or bounded access to an owner's tokens on Optimism.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T12:44:55.308Z","isFirstParty":false,"canonicalSlug":"op-mainnet-erc-20-allowance-lookup-a3f9f1cd"}