Class Exchange


  • public final class Exchange
    extends java.lang.Object
    Record containing exchange details.
    • Constructor Summary

      Constructors 
      Constructor Description
      Exchange​(java.lang.String id, java.lang.String status, java.lang.String pair, java.lang.String side, java.math.BigDecimal price, java.math.BigDecimal amount, java.lang.String debitAccountId, java.lang.String debitTransactionId, java.lang.String creditAccountId, java.lang.String creditTransactionId, Quote quote, java.util.HashMap<java.lang.String,​java.util.HashMap<java.lang.String,​java.math.BigDecimal>> rates, java.lang.String nonce, java.lang.String createdAt, java.lang.String updatedAt)  
    • Constructor Detail

      • Exchange

        public Exchange​(java.lang.String id,
                        java.lang.String status,
                        java.lang.String pair,
                        java.lang.String side,
                        java.math.BigDecimal price,
                        java.math.BigDecimal amount,
                        java.lang.String debitAccountId,
                        java.lang.String debitTransactionId,
                        java.lang.String creditAccountId,
                        java.lang.String creditTransactionId,
                        Quote quote,
                        java.util.HashMap<java.lang.String,​java.util.HashMap<java.lang.String,​java.math.BigDecimal>> rates,
                        java.lang.String nonce,
                        java.lang.String createdAt,
                        java.lang.String updatedAt)
    • Method Detail

      • getId

        public java.lang.String getId()
        Identifier
      • getStatus

        public java.lang.String getStatus()
        Exchange status.
        See Also:
        ExchangeStatus
      • getPair

        public java.lang.String getPair()
        Exchange pair, e.g. "ETH-GBP".
      • getSide

        public java.lang.String getSide()
        Exchange side, "BUY" or "SELL".
        See Also:
        ExchangeSide
      • getPrice

        public java.math.BigDecimal getPrice()
        Exchange quote price.
      • getAmount

        public java.math.BigDecimal getAmount()
        Amount in base currency.
      • getDebitAccountId

        public java.lang.String getDebitAccountId()
        Debit Account identifier.
      • getDebitTransactionId

        public java.lang.String getDebitTransactionId()
        Debit Transaction identifier.
      • getCreditAccountId

        public java.lang.String getCreditAccountId()
        Credit Account identifier.
      • getCreditTransactionId

        public java.lang.String getCreditTransactionId()
        Credit Transaction identifier.
      • getQuote

        public Quote getQuote()
        Exchange rate quote used.
      • getRates

        public java.util.HashMap<java.lang.String,​java.util.HashMap<java.lang.String,​java.math.BigDecimal>> getRates()
        Exchange rates at the time exchange was made. This can be used to display amounts in local currency to the user.
      • getNonce

        public java.lang.String getNonce()
        Exchange nonce or null. Used to prevent double spend.
      • getCreatedAt

        public java.lang.String getCreatedAt()
        Timestamp when exchange was created, e.g. "2020-07-29T09:46:34.288Z".
      • getUpdatedAt

        public java.lang.String getUpdatedAt()
        Timestamp when exchange was updated, e.g. "2020-07-29T09:46:34.288Z".
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object