Class ExchangeRateDataExtensions
Extension methods for querying exchange rate data from the mirror node.
Inherited Members
Namespace: Hiero.Mirror
Assembly: Hiero.dll
Syntax
public static class ExchangeRateDataExtensions
Methods
| Edit this page View SourceGetExchangeRateAsync(MirrorRestClient, ConsensusTimeStamp?)
Retrieves the current and next exchange rate from the mirror node.
Declaration
public static Task<ExchangeRateData?> GetExchangeRateAsync(this MirrorRestClient client, ConsensusTimeStamp? consensus = null)
Parameters
| Type | Name | Description |
|---|---|---|
| MirrorRestClient | client | Mirror Rest Client to use for the request. |
| ConsensusTimeStamp? | consensus | Optional consensus timestamp to retrieve the exchange rate at or before the given time. If not specified, returns the current rate. |
Returns
| Type | Description |
|---|---|
| Task<ExchangeRateData> | Exchange rate information for the current and next rate utilized by the network for determining transaction and gas fees. |