Class ExchangeRate
Exchange rate information as known by the hedera network. Values returned in receipts. denominator.
Implements
Inherited Members
Namespace: Hashgraph
Assembly: Hashgraph.dll
Syntax
public sealed class 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
USDCentEquivalent/HBarEquivalent
.
to get hbar/$cent one would compute that as
HbarEquivalent/USDEquivalent
This representation allows for fractions that might otherwise be lost by floating point representations.
Properties
| Improve this Doc View SourceExpiration
The date and time at which this exchange rate value is set to expire.
Declaration
public DateTime Expiration { get; }
Property Value
Type | Description |
---|---|
DateTime |
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 |
---|---|
Int32 |
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 |
---|---|
Int32 |