Documentation Index
Fetch the complete documentation index at: https://hedera-0c6e0218-feat-hip-1261-docs.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
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 toFeeEstimateQuery. Either call the query directly or use the estimateFee() convenience method on the transaction.
Estimation Modes
| Mode | Behavior |
|---|---|
INTRINSIC (default) | Estimates based on the transaction’s inherent properties (size, signatures, keys). Fast and stateless. |
STATE | Estimates using the mirror node’s latest known state (e.g., checks if accounts exist, includes state-dependent extras). Required for high-volume pricing simulation. |
Response Structure
The response contains a structured breakdown of the fee components.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 viasetHighVolume(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)beforeFeeEstimateQuery— 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
maxTransactionFeewith headroom. Add 10–20% above the estimate — exchange rates shift between estimation and execution. high_volume_multiplierscale differs fromTransactionRecord. The estimate response uses a 1-based scale (1 = 1×, 4 = 4×).TransactionRecord.highVolumePricingMultiplierafter 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+
Related
Fees and Pricing
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.