Show / Hide Table of Contents

Class ExchangeRateExtension

Extends the client functionality to include retrieving the Exchange Rate directly from the network.

Inheritance
Object
ExchangeRateExtension
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Hashgraph.Extensions
Assembly: Hashgraph.dll
Syntax
public static class ExchangeRateExtension

Fields

| Improve this Doc View Source

EXCHANGE_RATE_FILE_ADDRESS

Well known address of the exchange rate file.

Declaration
public static readonly Address EXCHANGE_RATE_FILE_ADDRESS
Field Value
Type Description
Address

Methods

| Improve this Doc View Source

GetExchangeRatesAsync(Client, Action<IContext>)

Retrieves the current USD to hBar exchange rate information from the network.

Declaration
public static async Task<ExchangeRates> GetExchangeRatesAsync(this Client client, Action<IContext> configure = null)
Parameters
Type Name Description
Client client

Client Object

Action<IContext> 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 incours a charge to retrieve the file from the network.

  • Improve this Doc
  • View Source
In This Article
Back to top .NET Client Library for Hedera Hashgraph