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

ImmunityBio founder touts sepsis trials, NantX after Binance theft

Patrick Soon-Shiong renewed his “NantX coming soon” teaser after a $6.3 billion Binance theft,...

Crypto.com Shuts Hong Kong App, Eyes Institutional Exchange

crypto.com will shut down its consumer app in Hong Kong on Feb. 1, 2027,...

Kim Yo Jong denies North Korea behind Binance hack, hints US

Kim Yo Jong denied North Korea's involvement in the $6.3 billion Binance hack and...

Strive buys 124 BTC, fourth among public companies

Strive acquired 124 Bitcoin for roughly $10 million between Oct. 24 and Oct. 30,...

Claude finds 9.8 zero-click Linux root bug

Claude discovered a zero-click Linux vulnerability (CVE-2026-98432) rated 9.8 out of 10, described as...

Must Read

7 Best Cryptocurrency Lending Platforms in 2025 (Ranked & Reviewed)

QUICK LINKSOur MethodologyHow to Choose the Best Crypto Lending Platform: Key Factors to ConsiderIn-Depth Reviews of the 7 Best Crypto Lending Platforms1. Nexo -...
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