Class CurrencyPairDTO


  • public final class CurrencyPairDTO
    extends Object
    Currency pair for trading. The base currency represents how much of the quote currency to get one unit of the base currency. For example, if you were looking at the CAD/USD currency pair, the Canadian dollar would be the base currency, and the U.S. dollar would be the quote currency.
    • Constructor Detail

      • CurrencyPairDTO

        public CurrencyPairDTO​(String currencyPair)
        Constructor.
        Parameters:
        currencyPair - currency pair
      • CurrencyPairDTO

        public CurrencyPairDTO​(org.knowm.xchange.currency.CurrencyPair currencyPair)
        Constructor.
        Parameters:
        currencyPair - currency pair
      • CurrencyPairDTO

        public CurrencyPairDTO​(String newBaseCurrency,
                               String newQuoteCurrency)
        Constructor with CurrencyDTO.
        Parameters:
        newBaseCurrency - The base currency
        newQuoteCurrency - The quote currency
      • CurrencyPairDTO

        public CurrencyPairDTO​(CurrencyDTO newBaseCurrency,
                               CurrencyDTO newQuoteCurrency)
        Constructor with String.
        Parameters:
        newBaseCurrency - The base currency
        newQuoteCurrency - The quote currency
      • CurrencyPairDTO

        public CurrencyPairDTO​(org.knowm.xchange.instrument.Instrument instrument)
        Constructor from XChange instrument.
        Parameters:
        instrument - instrument
    • Method Detail

      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • getBaseCurrency

        public CurrencyDTO getBaseCurrency()
        The base currency is the first currency appearing in a currency pair quotation.
      • getQuoteCurrency

        public CurrencyDTO getQuoteCurrency()
        The quote currency is the second currency appearing in a currency pair quotation.