Show / Hide Table of Contents

Class ExchangeRatesExtensions

Extension methods for retrieving exchange rate information from the network.

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

Methods

| Edit this page View Source

GetExchangeRatesAsync(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.

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