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

BitMine Chairman Touts Largest Crypto Treasury Buyback

BitMine Immersion Technologies purchased 15,112 ETH last week, its smallest weekly buy since mid-August,...

Live Nation doubles CEO pay to $60M despite monopoly verdict

Live Nation approved a contract doubling CEO Michael Rapino’s annual compensation target to over...

Metaplanet adopts net interest strategy to fuel Bitcoin

Metaplanet is adopting a net interest income strategy, keeping Bitcoin as 85%-90% of total...

Cling botnet exploits Realtek flaw via STUN C2

Threat actors are exploiting a critical Realtek SDK flaw (CVE-2021-35394) to deploy a new...

Tom Lee: 30% Q3 earnings growth, S&P 8,200+, Bitcoin $100k

Fundstrat’s Tom Lee expects the 10-year Treasury yield to fall below 5% within six...

Must Read

7 Best Crypto To Invest In This Year

Investing in cryptocurrencies has become a popular way for people to diversify their investment portfolio and make potential profits.However, with so many cryptocurrencies available...
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