Class CryptopiaAdapters


  • public final class CryptopiaAdapters
    extends Object
    Various adapters for converting from Cryptopia DTOs to XChange DTOs
    • Method Detail

      • convertTimestamp

        public static Date convertTimestamp​(String timestamp)
      • adaptOrderBook

        public static OrderBook adaptOrderBook​(CryptopiaOrderBook cryptopiaOrderBook,
                                               CurrencyPair currencyPair)
        Adapts a CryptopiaOrderBook to an OrderBook Object
        Parameters:
        cryptopiaOrderBook - The exchange specific order book
        currencyPair - (e.g. BTC/USD)
        Returns:
        The XChange OrderBook
      • adaptTicker

        public static Ticker adaptTicker​(CryptopiaTicker cryptopiaTicker,
                                         CurrencyPair currencyPair)
        Adapts a CryptopiaTicker to a Ticker Object
        Parameters:
        cryptopiaTicker - The exchange specific ticker
        currencyPair - (e.g. BTC/USD)
        Returns:
        The XChange ticker