If you’re working with Ethereum-whether you’re building a DeFi protocol, launching an NFT marketplace, or just experimenting with smart contracts-there’s one fundamental operation you’ll use constantly: check Ethereum wallet balance.
Knowing how to retrieve the ETH balance of any address is essential not just for users, but for the backend logic of your application. In this guide, we’ll show you how to do it using the eth_getBalance
method via NOWNodes, a reliable blockchain infrastructure provider.
No setup, no syncing, no waiting—just plug into Ethereum and get started.
Why Use the eth_getBalance
Method?
The eth_getBalance
JSON-RPC method is a core building block of interacting with Ethereum nodes. It allows you to request the current balance of any wallet on the network. Since Ethereum is a public blockchain, you can check any address—yours, a smart contract, a DeFi treasury, or even a competitor’s protocol.
Here’s why this method matters:
- User Dashboards: Show ETH balances directly in your application interface
- Smart Contract Validation: Ensure a wallet has enough ETH before initiating a transaction
- Transaction Fees: Check if the user has sufficient funds to cover gas
- Analytics and Monitoring: Track wallet activity and balance changes over time
- Automation: Power bots, scripts, or services that respond to on-chain balances
Why Use NOWNodes?
Running your own Ethereum node gives you control, but it’s resource-intensive and time-consuming. Instead, NOWNodes provides real-time access to full nodes across multiple chains via HTTP APIs.
With NOWNodes, you can:
- Skip the syncing process
- Avoid managing hardware or uptime
- Focus purely on building your app or tool
- Scale quickly without infrastructure headaches
Step 1: Get Access to the Ethereum API
To start using NOWNodes:
- Go to https://nownodes.io
- Sign up for an account
- Choose a free or paid subscription, depending on your needs
- Copy your personal API key from the dashboard
Step 2: Use eth_getBalance
to Check the Wallet Balance
The request is made via a standard JSON-RPC call. Here’s the exact structure you need.
Endpoint:
POST https://eth.nownodes.io
Raw JSON request body:
jsonКопироватьРедактировать{"jsonrpc":"2.0","method":"eth_getBalance","params":["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"],"id":1}
Explanation:
method
:"eth_getBalance"
tells the node you’re requesting an address balanceparams[0]
: The Ethereum address you want to checkparams[1]
:"latest"
tells the node to use the latest block dataid
: Any number you choose (used to match the response with your request)
Step 3: Understand the Response
You’ll receive a JSON response like this:
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
The result
is the balance, returned in wei, which is the smallest unit of Ether.
To convert wei to ETH, divide by 10^18.
For example:0x8ac7230489e80000
in hexadecimal = 10000000000000000000
wei = 10 ETH
When and Why You Might Use This
Let’s break down a few real-world scenarios:
1. Building a Wallet App
You want users to see their current ETH balance on login. This method provides a real-time balance that you can fetch and display on the dashboard.
2. DeFi Platform or Swap UI
Before allowing a user to initiate a swap or transaction, you check their ETH balance to ensure they have enough funds (and gas) to proceed.
3. Gas Fee Estimators
Your service estimates how much ETH is needed to complete a transaction. Checking the current balance ensures they won’t run out of gas mid-execution.
4. Whale Watchers or On-Chain Analytics
You’re tracking wallets holding large ETH amounts or monitoring inflows/outflows from specific addresses. This method lets you programmatically scan and log balances over time.
5. Smart Automation and Bots
Balance triggers can be used for sending alerts, triggering trades, or monitoring treasury activity—your bot checks the wallet every few seconds or minutes using this simple method.
Security Reminders
- Never expose your API key in client-side code
- Use environment variables or secrets managers to protect credentials
- If your key is exposed, revoke and regenerate it immediately via your NOWNodes account dashboard
Final Thoughts
The eth_getBalance
method is one of the simplest yet most powerful tools for interacting with Ethereum. With NOWNodes, you don’t need to run your own node or worry about infrastructure—you can simply plug into the network and start building.
This method forms the foundation of wallets, dashboards, monitoring tools, and so much more.
Want to take it further? Explore Ethereum’s other JSON-RPC methods, or extend your app to support additional chains using the same API model.