Skip to main content
FeeEstimateQuery lets you estimate the cost of a transaction before submitting it. Use it to gate spending against a budget, surface fee previews to users, or simulate execution under high-volume congestion. The query returns a structured breakdown of node, network, and service fees in tinycents (USD × 10⁻¹⁰). The same calculation runs on the consensus node at execution time, so the estimate reflects what you’ll be charged — modulo the live HBAR exchange rate at consensus.

Basic Usage

Freeze the transaction first, then pass it to FeeEstimateQuery. Either call the query directly or use the estimateFee() convenience method on the transaction.

Estimation Modes

Response Structure

The response contains a structured breakdown of the fee components.
The components total according to:

End-to-End: Estimate, Gate, Execute

A common pattern: estimate the fee, check against a budget, then execute only if the estimate is acceptable.

High-Volume Pricing Simulation

For entity-creation transactions opted into the high-volume lane via setHighVolume(true), the network may apply a fee multiplier under congestion. To simulate this before submitting, use setHighVolumeThrottle() on FeeEstimateQuery with STATE mode.

Developer Notes

  • Freeze before estimating. Call freezeWith(client) before FeeEstimateQuery — the transaction body must be finalized for the estimate to reflect your actual transaction.
  • Estimates are in tinycents; execution fees are in tinybars. The response uses tinycents (USD × 10⁻¹⁰). The fee charged on execution is in tinybars (HBAR × 10⁻⁸), converted at the live exchange rate at consensus time.
  • Set maxTransactionFee with headroom. Add 10–20% above the estimate — exchange rates shift between estimation and execution.
  • high_volume_multiplier scale differs from TransactionRecord. The estimate response uses a 1-based scale (1 = 1×, 4 = 4×). TransactionRecord.highVolumePricingMultiplier after execution uses a 1000-based scale (1000 = 1×, 4000 = 4×). Both represent the same multiplier.

SDK Versions

FeeEstimateQuery is available in:
  • Java: v2.71.0+
  • Go: v2.79.0+
  • JavaScript (@hiero-ledger/sdk): v2.83.0+

Fee Model

The base-fee-plus-extras model that fee estimation calculates against.

Mirror Node REST API: Network

The underlying REST endpoint backing FeeEstimateQuery.

HIP-1261: Simple Fees

The HIP defining the fee model.

HIP-1313: High-Volume Pricing

The HIP defining the high-volume lane and congestion multiplier.