Class ExchangeRate
Exchange rate information as known by the Hedera network. Values returned in receipts.
Implements
Inherited Members
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 SourceExpiration
The date and time at which this exchange rate value is set to expire.
Declaration
public ConsensusTimeStamp Expiration { get; }
Property Value
| Type | Description |
|---|---|
| ConsensusTimeStamp |
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 |
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 |