TriportRPC

Get ETH wallet balance

GEThttps://api.triport.io/v1/eth/wallet/balance/0x742d35Cc6634C0532925a3b844Bc9e7595f06b8b

Returns the native ETH balance of an Ethereum address, as both raw wei and a decimal ETH amount, at a given block.

Ethereumeth_read_rpcfree — 10 RPS (basic 20, pro 100, business 250; enterprise unlimited)

GET /v1/eth/wallet/balance/{address} returns the native ETH balance held by an Ethereum address. The balance is returned twice: as wei — the exact u256 amount encoded as a decimal string so it never loses precision — and as eth, a convenience floating-point value already divided by 10¹⁸. The response also echoes the resolved block height the balance was read at.

This is the simplest way to display an account's spendable ETH, check a contract's treasury, or confirm a deposit. It is available on the free tier, so it is a good first call when integrating. The native balance does not include ERC-20 token balances — those live in their token contracts; use Get ERC-20 token balances for those.

By default the balance is read at the latest block. Pass the optional block query parameter to read a historical or pending balance — it accepts a tag (latest, pending, safe, finalized) or a block number in hex or decimal.

Parameters

Path parameters

addressstring (0x-prefixed, 40 hex chars)required
The Ethereum address to query. Must match ^0x[0-9a-fA-F]{40}$.
Query parametersobject
blockstringoptional
Block tag or number to read the balance at. Accepts latest, pending, safe, finalized, or a block number in hex (0x...) or decimal. Defaults to latest.

Response

Response fields

FieldTypeDescription
addressstringThe queried address, echoed back. Always present.
weistringExact balance in wei (u256) as a decimal string. Always present. Parse with a big-integer type to avoid precision loss.
ethnumber (double)Convenience balance in ETH (wei ÷ 10¹⁸), ≥ 0. Always present. May lose precision for very large balances — prefer wei for accounting.
blockinteger (int64)The resolved block height the balance was read at, ≥ 0.

Errors

Errors use the shared Triport REST envelope (error, message, request_id). See Errors for the full envelope and every code.

CodeHTTPMeaningWhen it happens
unauthorized401No or invalid credentialsThe Authorization header is missing, malformed, or the key is revoked.
trial_expired401Free trial endedThe free 7-day trial period has lapsed; upgrade to continue.
subscription_expired401Subscription lapsedA previously active paid subscription has expired.
tier_insufficient403Tier too lowThe API key's tier is below what the eth_read_rpc category requires (not expected on free tier for this endpoint).
rate_limited429RPS exceededSustained + burst RPS exceeded for your tier. Honor Retry-After (always 1) and retry.

Examples

JavaScript (fetch)

const address = "0x742d35Cc6634C0532925a3b844Bc9e7595f06b8b";


const res = await fetch(
  `https://api.triport.io/v1/eth/wallet/balance/${address}`,
  { headers: { Authorization: `Bearer ${process.env.TRIPORT_API_KEY}` } },
);


const { wei, eth, block } = await res.json();
console.log(`${eth} ETH (${BigInt(wei)} wei) at block ${block}`);

TypeScript SDK (@triport/sdk)

import { Triport } from "@triport/sdk";


const client = new Triport({ apiKey: process.env.TRIPORT_API_KEY! });


const balance = await client.eth.wallet.balance(
  "0x742d35Cc6634C0532925a3b844Bc9e7595f06b8b",
  { block: "latest" },
);


console.log(BigInt(balance.wei)); // 2000000000000000000n
console.log(balance.eth);         // 2.0

Python (triport-sdk)

import os
from triport import Triport


client = Triport(api_key=os.environ["TRIPORT_API_KEY"])


balance = client.eth.wallet.balance(
    "0x742d35Cc6634C0532925a3b844Bc9e7595f06b8b",
    block="latest",
)


print(int(balance["wei"]))  # 2000000000000000000
print(balance["eth"])       # 2.0
print(balance["block"])     # 18000000

Notes

  • Prefer wei for accounting. wei is an exact decimal string; the eth double is a convenience that can lose precision on large balances. Parse wei with BigInt / Python int.
  • Native balance only. ERC-20 holdings are not included — see Get ERC-20 token balances. For NFTs see Get NFT holdings, and for transaction history see Get wallet history.
  • Block selection. pending reflects not-yet-mined state and may change; latest is the safe default for confirmed balances. The returned block field tells you exactly which height was resolved.
  • Rate limits are enforced per second per tier — there is no daily cap. On 429, back off Retry-After seconds (always 1) and retry; it is normal backpressure. See Rate Limits and Tiers.
  • Authentication can also be supplied via the X-API-Key header or a legacy ?api-key= query parameter — see Authentication.