Portal Community

balance

Returns an address's native ETH (or L2 native-token) balance.

FieldTypeRequiredDescription
addresstext✓ YesAddress to query, e.g. 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb.
formatselectNo (default wei)wei | gwei | ether — unit the formatted balance is expressed in.
blocktextNoBlock number/tag to query at (e.g. latest, a specific block number). Omit for the latest block.
networkselectNoSee Networks. Defaults to Ethereum:DefaultNetwork.

Example response:

{
  "success": true,
  "balanceWei": "5000000000000000000",
  "balanceFormatted": 5.0,
  "unit": "ether"
}

nonce

Returns the address's current transaction count (nonce) — the value the next transaction from this address must use.

FieldTypeRequiredDescription
addresstext✓ YesAddress to query.
blocktextNoBlock number/tag. Omit for the latest confirmed nonce.

Example response:

{ "success": true, "nonce": 42 }
Why this matters before a write: transaction.send accepts an optional explicit nonce field. Call account.nonce first if you need to submit several transactions from the same address back-to-back without waiting for each to confirm.

code

Detects whether an address is a wallet (externally-owned account, EOA) or a smart contract, by checking whether it has deployed bytecode.

FieldTypeRequiredDescription
addresstext✓ YesAddress to check.
blocktextNoBlock number/tag. Omit for latest.

Example response:

{
  "success": true,
  "bytecode": "0x",
  "isContract": false
}

An empty bytecode value ("0x") means the address is a wallet (EOA); any non-empty value means it's a contract.

history

FieldTypeRequiredDescription
addresstext✓ YesAddress to look up transaction history for.
fromBlocknumberNoLower block bound.
toBlocknumberNoUpper block bound.
Not usable in this build: standard JSON-RPC has no method to list a past transaction history for an address — Ethereum nodes don't index by address. This operation requires a separate Etherscan-compatible indexer API that isn't wired up yet. It fails clearly with INDEXER_NOT_CONFIGURED rather than silently returning an empty or partial list. See Roadmap.