{"uid":"cap_xuhDiHjJAf99zMT8Rncgn","slug":"op-mainnet-wallet-balance-lookup-9d826080","name":"OP Mainnet Wallet Balance 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/balances?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":["address"],"properties":{"tokens":{"type":"string","pattern":"^(0x[0-9a-fA-F]{40})(,0x[0-9a-fA-F]{40}){0,19}$","description":"Comma-separated ERC-20 contract addresses on OP Mainnet, up to 20"},"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Wallet address on OP Mainnet"}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"chain":"optimism","tokens":[{"raw":"24433911","token":"0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85","symbol":"USDC","balance":"24.433911","decimals":6},{"raw":"1000000000000000000","token":"0x4200000000000000000000000000000000000042","symbol":"OP","balance":"1","decimals":18}],"address":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045","nativeSymbol":"ETH","nativeBalance":"0.181079591875347535"}},"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_sDu0ZbReQdKxh7yrESPdW","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 native ETH balance and up to 20 ERC-20 token balances for a given OP Mainnet wallet address, formatted with each token's symbol and decimals.","exampleAgentPrompt":"What's the current ETH balance and USDC balance (contract 0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85) for the Optimism wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045?","exampleUseCases":[{"title":"DeFi portfolio snapshot on Optimism","prompt":"Can you pull the live balances for my Optimism wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045, including ETH and these three tokens: 0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85, 0x4200000000000000000000000000000000000042, and 0x7F5c764cBc14f9669B88837ca1490cCa17c31607?"},{"title":"Pre-trade balance check for Optimism swap","prompt":"Before I execute this swap, check whether 0xAbCd1234abcd1234abcd1234abcd1234abcd1234 has enough OP tokens (contract 0x4200000000000000000000000000000000000042) and ETH on OP Mainnet right now."},{"title":"Monitor airdrop recipient wallet holdings","prompt":"Check what ETH and USDT (0x94b008aA00579c1307B0EF2c499aD98a8ce58e58) balances the airdrop recipient wallet 0x1234567890abcdef1234567890abcdef12345678 currently holds on Optimism Mainnet."}],"resultDescription":"A JSON object containing the wallet's native ETH balance and an array of ERC-20 token balances, each entry including the token contract address, symbol, human-readable balance adjusted for decimals, and raw balance. Data is read live from OP Mainnet.","failureModes":["Invalid wallet address format returns a validation error","Invalid or non-existent ERC-20 contract address may return zero balance or an error","More than 20 token addresses provided will fail schema validation","Network or RPC issues on OP Mainnet may cause timeouts or partial results","Payment failure (x402) if USDC balance is insufficient for the $0.005 per-call fee"],"whenToPreferThis":"Use this endpoint when you need live, formatted token balance data specifically for OP Mainnet (Optimism) wallets. It handles both native ETH and up to 20 ERC-20 tokens in a single call with decimal formatting already applied. Prefer this over Ethereum or Arbitrum siblings when the target address and tokens are on OP Mainnet specifically.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T12:40:31.796Z","isFirstParty":false,"canonicalSlug":"op-mainnet-wallet-balance-lookup-9d826080"}