# try_native_balance

Returns an address's native-token balance as exact Wei at an explicit block, as native_balance does. A balance read cannot revert, so a failed read raises here too.

Canonical HTML: <https://determica.com/docs/functions/try_native_balance>

- Kind: scalar function
- Category: [Chain reads](/docs/category/chain-reads.md)
- Tags: RPC

Returns an address's native-token balance as exact Wei at an explicit block, as native_balance does. A balance read cannot revert, so a failed read raises here too.

## Overload 1: try_native_balance(CLIENT, ADDRESS, BIGINT)

```sql
try_native_balance(CLIENT, ADDRESS, BIGINT)
```

As native_balance at an explicit block height; an RPC error raises.

- Kind: scalar
- Execution context: Live RPC
- Behavior: Transform
- Execution modes: Live Client
- Input shape: Scalar Arguments
- Planning contract: Runtime
- Cardinality: One Per Input
- Determinism: External State
- Return shape: Scalar
- Schema stability: Fixed
- Stability: Stable
- Side effects: network_io

### Requirements

- attached_live_client
- rpc

### Risks

- provider_limits
- chain_reorganization

### Inputs

- `client` (CLIENT; required; positional) — Readable EVM state represented by a live, pinned, or execution CLIENT.
- `address` (ADDRESS; required; positional) — Account or contract address whose native balance should be read.
- `block_number` (BIGINT; required; positional) — Optional historical block height; NULL gives NULL without an RPC call.

### Returns

Native balance in Wei

Returns a UINT256 raw Wei balance; NULL only for a NULL input.

- `balance` (UINT256)

Native balance in Wei. Returns a UINT256 raw Wei balance; NULL only for a NULL input.

### Examples

_Named parameters · Needs RPC · RPC required_

```sql
-- vitalik.eth at block 4200000
SELECT try_native_balance(
    $client,
    '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'::address, -- vitalik.eth
    4200000
) AS balance;
```
