Class ExchangeRatesExtensions
Extension methods for retrieving exchange rate information from the network.
Inherited Members
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public static class ExchangeRatesExtensions
Methods
| Edit this page View SourceGetExchangeRatesAsync(ConsensusClient, CancellationToken, Action<IConsensusContext>?)
Retrieves the current USD to hBar exchange rate information from the network.
Declaration
public static Task<ExchangeRates> GetExchangeRatesAsync(this ConsensusClient client, CancellationToken cancellationToken = default, Action<IConsensusContext>? configure = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ConsensusClient | client | ConsensusClient Object |
| CancellationToken | cancellationToken | Optional cancellation token. |
| Action<IConsensusContext> | configure | Optional callback method providing an opportunity to modify the execution configuration for just this method call. It is executed prior to submitting the request to the network. |
Returns
| Type | Description |
|---|---|
| Task<ExchangeRates> | An Exchange Rates object providing the current and next exchange rates. |
Remarks
NOTE: this method incurs a charge to retrieve the file from the network.