Show / Hide Table of Contents

Class NetworkFeesExtensions

Extension methods for querying network fee data from the mirror node.

Inheritance
object
NetworkFeesExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Hiero.Mirror
Assembly: Hiero.dll
Syntax
public static class NetworkFeesExtensions

Methods

| Edit this page View Source

GetLatestNetworkFeesAsync(MirrorRestClient)

Retrieves the current network fee schedule via /api/v1/network/fees (no timestamp filter). The mirror node returns the most recent snapshot it has ingested.

Declaration
public static Task<NetworkFeesData?> GetLatestNetworkFeesAsync(this MirrorRestClient client)
Parameters
Type Name Description
MirrorRestClient client

Mirror Rest Client to use for the request.

Returns
Type Description
Task<NetworkFeesData>

The current Network fee data or null if not found.

| Edit this page View Source

GetNetworkFeesAsync(MirrorRestClient, ConsensusTimeStamp)

Retrieves the network fee schedule active at (or before) the given consensus timestamp via /api/v1/network/fees?timestamp=lte:{consensus}. Useful for reconstructing historical fee conditions for a specific transaction.

Declaration
public static Task<NetworkFeesData?> GetNetworkFeesAsync(this MirrorRestClient client, ConsensusTimeStamp consensus)
Parameters
Type Name Description
MirrorRestClient client

Mirror Rest Client to use for the request.

ConsensusTimeStamp consensus

Timestamp to retrieve the network fee schedule at or before.

Returns
Type Description
Task<NetworkFeesData>

The fee schedule in effect at the requested timestamp, or null if the mirror node has no snapshot from that era.

Remarks

For the current fee schedule, call GetLatestNetworkFeesAsync(MirrorRestClient) instead — it skips the timestamp filter and lets the server return the most recent snapshot.

  • Edit this page
  • View Source
In this article
Back to top .NET Client Library for Hiero Network and Hedera Hashgraph