Class NetworkFeesExtensions
Extension methods for querying network fee data from the mirror node.
Inherited Members
Namespace: Hiero.Mirror
Assembly: Hiero.dll
Syntax
public static class NetworkFeesExtensions
Methods
| Edit this page View SourceGetLatestNetworkFeesAsync(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. |
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.