Show / Hide Table of Contents

Class ExchangeRate

Exchange rate information as known by the Hedera network. Values returned in receipts.

Inheritance
object
ExchangeRate
Implements
IEquatable<ExchangeRate>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public sealed record ExchangeRate : IEquatable<ExchangeRate>
Remarks
The rate is expressed as parts of a numerator 
and denominator expressing the ratio of hbars
to cents. For example to get the value of 
$cent/hbar one would compute that as 

<pre><code class="lang-csharp">USDCentEquivalent/HBarEquivalent</code></pre>

. to get hbar/$cent one would compute that as

<pre><code class="lang-csharp">HbarEquivalent/USDCentEquivalent</code></pre>

This representation allows for fractions that might
otherwise be lost by floating point representations.

Properties

| Edit this page View Source

Expiration

The date and time at which this exchange rate value is set to expire.

Declaration
public ConsensusTimeStamp Expiration { get; }
Property Value
Type Description
ConsensusTimeStamp
| Edit this page View Source

HBarEquivalent

The HBar portion of the exchange rate, can be used in the numerator to get hbars per cent or in the denominator to get cents per hbar.

Declaration
public int HBarEquivalent { get; }
Property Value
Type Description
int
| Edit this page View Source

USDCentEquivalent

The USD cent portion of the exchange rate, can be used in the numerator to get cents per hbar or in the denominator to get hbars per cent.

Declaration
public int USDCentEquivalent { get; }
Property Value
Type Description
int

Implements

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