Account Operations
resource: account — ETH balances, nonces, and EOA/contract detection
balance
Returns an address's native ETH (or L2 native-token) balance.
| Field | Type | Required | Description |
|---|---|---|---|
address | text | ✓ Yes | Address to query, e.g. 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb. |
format | select | No (default wei) | wei | gwei | ether — unit the formatted balance is expressed in. |
block | text | No | Block number/tag to query at (e.g. latest, a specific block number). Omit for the latest block. |
network | select | No | See 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.
| Field | Type | Required | Description |
|---|---|---|---|
address | text | ✓ Yes | Address to query. |
block | text | No | Block 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.
| Field | Type | Required | Description |
|---|---|---|---|
address | text | ✓ Yes | Address to check. |
block | text | No | Block 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
| Field | Type | Required | Description |
|---|---|---|---|
address | text | ✓ Yes | Address to look up transaction history for. |
fromBlock | number | No | Lower block bound. |
toBlock | number | No | Upper 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.