Class ExchangeRate

java.lang.Object
com.hedera.hashgraph.sdk.ExchangeRate

public final class ExchangeRate extends Object
Denotes a conversion between Hbars and cents (USD).
  • Field Details

    • hbars

      public final int hbars
      Denotes Hbar equivalent to cents (USD)
    • cents

      public final int cents
      Denotes cents (USD) equivalent to Hbar
    • expirationTime

      public final Instant expirationTime
      Expiration time of this exchange rate
    • exchangeRateInCents

      public final double exchangeRateInCents
      Calculated exchange rate
  • Constructor Details

    • ExchangeRate

      ExchangeRate(int hbars, int cents, Instant expirationTime)
  • Method Details

    • fromProtobuf

      static ExchangeRate fromProtobuf(ExchangeRate pb)
      Create an Exchange Rate from a protobuf.
      Parameters:
      pb - the protobuf
      Returns:
      the new exchange rate
    • toString

      public String toString()
      Overrides:
      toString in class Object