Show / Hide Table of Contents

Class ExchangeRate

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

Inheritance
Object
ExchangeRate
Implements
IEquatable<ExchangeRate>
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
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 Source

Expiration

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

Declaration
public DateTime Expiration { get; }
Property Value
Type Description
DateTime
| Improve this Doc 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
Int32
| Improve this Doc 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
Int32

Implements

System.IEquatable<T>
  • Improve this Doc
  • View Source
In This Article
Back to top .NET Client Library for Hedera Hashgraph