@@ -30,6 +30,7 @@ public class FeeEstimateQuery {
3030 @ Nullable
3131 private com .hedera .hashgraph .sdk .proto .Transaction transaction = null ;
3232
33+ private int highVolumeThrottle = 0 ;
3334 private int maxAttempts = 10 ;
3435 private Duration maxBackoff = Duration .ofSeconds (8L );
3536
@@ -64,7 +65,7 @@ public FeeEstimateMode getMode() {
6465 /**
6566 * Set the mode for fee estimation.
6667 * <p>
67- * Defaults to {@link FeeEstimateMode#STATE } if not set.
68+ * Defaults to {@link FeeEstimateMode#INTRINSIC } if not set.
6869 *
6970 * @param mode the fee estimate mode
7071 * @return {@code this}
@@ -75,6 +76,32 @@ public FeeEstimateQuery setMode(FeeEstimateMode mode) {
7576 return this ;
7677 }
7778
79+ /**
80+ * Extract the high-volume throttle utilization in basis points.
81+ *
82+ * @return the high-volume throttle value (0–10000)
83+ */
84+ public int getHighVolumeThrottle () {
85+ return highVolumeThrottle ;
86+ }
87+
88+ /**
89+ * Set the high-volume throttle utilization in basis points (0–10000, where 10000 = 100%).
90+ * <p>
91+ * When non-zero, the mirror node returns a high-volume pricing multiplier
92+ * in the response.
93+ *
94+ * @param highVolumeThrottle the throttle utilization in basis points
95+ * @return {@code this}
96+ */
97+ public FeeEstimateQuery setHighVolumeThrottle (int highVolumeThrottle ) {
98+ if (highVolumeThrottle < 0 || highVolumeThrottle > 10000 ) {
99+ throw new IllegalArgumentException ("highVolumeThrottle must be between 0 and 10000" );
100+ }
101+ this .highVolumeThrottle = highVolumeThrottle ;
102+ return this ;
103+ }
104+
78105 /**
79106 * Extract the transaction to estimate fees for.
80107 *
@@ -178,7 +205,7 @@ public FeeEstimateResponse execute(Client client) throws IOException, Interrupte
178205 * @throws InterruptedException if the operation is interrupted
179206 */
180207 public FeeEstimateResponse execute (Client client , Duration timeout ) throws IOException , InterruptedException {
181- var resolvedMode = mode != null ? mode : FeeEstimateMode .STATE ;
208+ var resolvedMode = mode != null ? mode : FeeEstimateMode .INTRINSIC ;
182209 var requestPayload = getRequestPayload ();
183210 var url = buildUrl (client , resolvedMode );
184211
@@ -187,7 +214,7 @@ public FeeEstimateResponse execute(Client client, Duration timeout) throws IOExc
187214 var response = HTTP_CLIENT .send (
188215 buildHttpRequest (url , timeout , requestPayload ), HttpResponse .BodyHandlers .ofString ());
189216
190- var result = handleResponse (response , resolvedMode , attempt );
217+ var result = handleResponse (response , attempt );
191218 if (result != null ) {
192219 return result ;
193220 }
@@ -203,10 +230,9 @@ public FeeEstimateResponse execute(Client client, Duration timeout) throws IOExc
203230 /**
204231 * Handle the HTTP response and return the result or null if retry is needed.
205232 */
206- private FeeEstimateResponse handleResponse (
207- HttpResponse <String > response , FeeEstimateMode resolvedMode , int attempt ) {
233+ private FeeEstimateResponse handleResponse (HttpResponse <String > response , int attempt ) {
208234 if (isSuccessfulResponse (response .statusCode ())) {
209- return FeeEstimateResponse .fromJson (response .body (), resolvedMode );
235+ return FeeEstimateResponse .fromJson (response .body ());
210236 }
211237
212238 if (!shouldRetry (response .statusCode ()) || attempt >= maxAttempts ) {
@@ -253,7 +279,7 @@ public CompletableFuture<FeeEstimateResponse> executeAsync(Client client) {
253279 * @return the fee estimate response
254280 */
255281 public CompletableFuture <FeeEstimateResponse > executeAsync (Client client , Duration timeout ) {
256- var resolvedMode = mode != null ? mode : FeeEstimateMode .STATE ;
282+ var resolvedMode = mode != null ? mode : FeeEstimateMode .INTRINSIC ;
257283 CompletableFuture <FeeEstimateResponse > returnFuture = new CompletableFuture <>();
258284 executeAsync (client , timeout , resolvedMode , returnFuture , 1 );
259285 return returnFuture ;
@@ -316,7 +342,7 @@ private void handleAsyncResponse(
316342 int attempt ,
317343 HttpResponse <String > response ) {
318344 if (isSuccessfulResponse (response .statusCode ())) {
319- returnFuture .complete (FeeEstimateResponse .fromJson (response .body (), resolvedMode ));
345+ returnFuture .complete (FeeEstimateResponse .fromJson (response .body ()));
320346 return ;
321347 }
322348
@@ -352,7 +378,11 @@ private byte[] getRequestPayload() {
352378
353379 private String buildUrl (Client client , FeeEstimateMode resolvedMode ) {
354380 // Keep mode casing consistent with JS SDK (uppercase)
355- return client .getMirrorRestBaseUrl () + "/network/fees?mode=" + resolvedMode .toString ();
381+ String url = client .getMirrorRestBaseUrl () + "/network/fees?mode=" + resolvedMode .toString ();
382+ if (highVolumeThrottle > 0 ) {
383+ url += "&high_volume_throttle=" + highVolumeThrottle ;
384+ }
385+ return url ;
356386 }
357387
358388 private HttpRequest buildHttpRequest (String url , Duration timeout , byte [] payload ) {
0 commit comments