BTC $71,807
2026 Bull Run Is Building Start trading with 5% OFF all fees
Sign Up Now
BTC $71,807
Bull Run 2026 | 5% Off Fees Open your Binance account today
Sign Up

Hiero SDK adds native MirrorNodeAccountBalanceQuery for HBAR

Hedera introduces MirrorNodeAccountBalanceQuery for free HBAR balance queries across JS, Java, Go SDKs replacing AccountBalanceQuery

  • Hedera has introduced MirrorNodeAccountBalanceQuery in the JavaScript, Java, and Go Hiero SDKs as a native replacement for the deprecated AccountBalanceQuery
  • The new method fetches HBAR balances from the mirror node REST API for free, with automatic retries and support for multiple account ID formats
  • Migration requires only a two-line code change—replacing AccountBalanceQuery with MirrorNodeAccountBalanceQuery—and no new dependencies
  • Applications that do not use AccountBalanceQuery are unaffected; the consensus node endpoint is throttled to zero as of release v0.77

Hedera has released MirrorNodeAccountBalanceQuery in the JavaScript, Java, and Go Hiero SDKs, giving developers a native way to read an account’s HBAR balance from the Mirror Node REST API without leaving the SDK’s familiar query interface. The new method replaces AccountBalanceQuery, which is now deprecated and its consensus node endpoint throttled to zero on testnet and mainnet as of v0.77 of the Consensus Node software.

- Advertisement -

Mirror nodes have always exposed balance data through their REST API, and SDK clients already hold a connection to a mirror network. MirrorNodeAccountBalanceQuery extends the SDK’s native query interface to that data using the same fluent, typed pattern developers use for other SDK queries, following conventions established for MirrorNodeContractCallQuery and MirrorNodeContractEstimateQuery.

Key properties include zero cost—no query payment and no HBAR required—along with automatic retries for transient mirror node errors using exponential backoff and the client’s existing configuration. The query accepts multiple ID formats including shard.realm.num, EVM address, public key alias, or contract ID, all through the same setAccountId method, with mirror node resolution handling every format natively.

Migration is straightforward: developers update to a recent SDK release, replace AccountBalanceQuery with MirrorNodeAccountBalanceQuery, and pass contract IDs through setAccountId instead of a separate setter. For JavaScript, the change is two lines as shown in the original migration guide, and the same pattern applies in Java and Go using each SDK’s equivalent import.

Applications that read a balance immediately after submitting a transaction should add a short retry or poll, since propagation from consensus nodes to mirror nodes requires a few seconds. Developers can consult the SDK reference and Mirror Node REST API documentation for further details, while the Ledger/sdk”>@hiero-ledger/sdk package on npm provides the latest JavaScript release.

- Advertisement -

✅ Follow BITNEWSBOT on Telegram, Facebook, LinkedIn, X.com, and Google News for instant updates.

Previous Articles:

- Advertisement -
Ad
Altseason Is Loading. Don't watch from the sidelines.
SOL $90.51
DOGE $0.0963
LINK $9.02
SUI $1.00
5% off fees when you sign up
Start Trading
Ad
Pay Less on Every Trade. For Life.
$10K/mo volume Save $60/yr
$50K/mo volume Save $300/yr
$100K/mo volume Save $600/yr
5% off all trading fees when you sign up
Claim Your Discount

Latest News

“Token Spraying” Attack Hits 79 Orgs via Stolen M365 Sessions

Attackers stole 497 Microsoft 365 sign-in tokens across 79 organizations using adversary-in-the-middle relays, compromising...

OpenAI Emails Reveal 2017 Tesla-Cerebras Acquisition Talks

Retail traders speculate that Cerebras’ steep stock decline could create a buying opportunity for...

Musk warns over 200 specialist AI cloud providers could fail

Elon Musk says more than 200 specialist AI cloud providers could fail or consolidate...

22 firms now oppose OKXICE tokenized stock venue

Six more firms including Wells Fargo, Cisco, and Marvell have objected to trading their...

TeraWulf CEO counters Musk’s stranded compute claim

TeraWulf CEO Paul Prager pushed back on Elon Musk's warning of "stranded compute" in...

Must Read

This is How to Buy and Sell Bitcoin

Now more than ever, there are a variety of ways to enter and exit the crypto market. While this is good, the availability of...
Ad
Altseason Is Loading. These 4 coins are trending right now.
SOL $92.12
DOGE $0.0950
LINK $9.02
SUI $1.02
5% off spot fees when you sign up
Start Trading