Class CryptopiaAdapters

java.lang.Object
org.knowm.xchange.cryptopia.CryptopiaAdapters

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

    • 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
    • adaptTrades

      public static Trades adaptTrades​(List<CryptopiaMarketHistory> cryptopiaMarketHistory)
    • adaptToExchangeMetaData

      public static ExchangeMetaData adaptToExchangeMetaData​(List<CryptopiaCurrency> cryptopiaCurrencies, List<CryptopiaTradePair> tradePairs)