{"uid":"cap_qoFVYIQzugisWosV3w2jo","slug":"onchain-toolkit-address-info-native-balance-nonce-code-erc-20-e082d399","name":"Onchain Toolkit – Address Info (Native Balance, Nonce, Code, ERC-20)","description":"Native balance, next nonce, and whether an address holds contract code. Pass token to read an ERC-20 balance in the same call.","url":"https://onchain-toolkit.bowling-anthony.workers.dev/address","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"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"nextNonce":37,"nativeBalance":"0.0142"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.008","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.008/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.008","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.008","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_iFnSEBkHF8xUJUZ8PZwvX","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.008","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, next transaction nonce, and whether an address holds contract bytecode for a given Ethereum address; optionally returns an ERC-20 token balance in the same call.","exampleAgentPrompt":"What's the ETH balance and next nonce for wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045, and also check its USDC balance using the USDC contract 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48?","exampleUseCases":[{"title":"Pre-flight check before sending ETH","prompt":"Before I send a transaction from 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045, can you look up its current ETH balance and the next nonce I should use?"},{"title":"Classify address as contract or EOA","prompt":"Is 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 a smart contract or a regular wallet? Check whether it has contract code deployed onchain."},{"title":"Check wallet ERC-20 token balance","prompt":"How many USDT tokens does the address 0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B hold? Use the USDT contract at 0xdAC17F958D2ee523a2206206994597C13D831ec7."}],"resultDescription":"Returns a JSON object containing: native balance (in wei or ETH), the next nonce (integer, safe to use for the next transaction), a boolean indicating whether the address contains contract bytecode, and optionally the ERC-20 token balance if a token contract address was supplied.","failureModes":["Invalid or malformed Ethereum address returns a 400 error","Unknown or unsupported network/chain results in an error response","Invalid ERC-20 token contract address may return zero balance or an error","Network congestion or RPC node unavailability may cause timeouts","Payment not received (x402) results in 402 Payment Required before data is returned"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, single-call lookup of an Ethereum address's native balance, nonce, and/or contract status — especially when you also want an ERC-20 balance in the same request without needing full block explorer data. Ideal for pre-transaction checks (nonce and balance), wallet classification (EOA vs contract), and token balance queries. Prefer over full block explorer APIs when you only need these specific fields and want a low-cost, fast response.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:36:29.698Z","isFirstParty":false}