Class CexIOAdapters


  • public class CexIOAdapters
    extends Object
    Author: brox Since: 2/6/14
    • Constructor Detail

      • CexIOAdapters

        public CexIOAdapters()
    • Method Detail

      • adaptTrade

        public static Trade adaptTrade​(CexIOTrade trade,
                                       CurrencyPair currencyPair)
        Adapts a CexIOTrade to a Trade Object
        Parameters:
        trade - CexIO trade object
        currencyPair - trade currencies
        Returns:
        The XChange Trade
      • adaptTrades

        public static Trades adaptTrades​(CexIOTrade[] cexioTrades,
                                         CurrencyPair currencyPair)
        Adapts a CexIOTrade[] to a Trades Object
        Parameters:
        cexioTrades - The CexIO trade data returned by API
        currencyPair - trade currencies
        Returns:
        The trades
      • adaptTicker

        public static Ticker adaptTicker​(CexIOTicker ticker)
        Adapts a CexIOTicker to a Ticker Object
        Parameters:
        ticker - The exchange specific ticker
        Returns:
        The ticker
      • adaptTicker

        public static Ticker adaptTicker​(CexIOTicker ticker,
                                         CurrencyPair currencyPair)
        Adapts a CexIOTicker to a Ticker Object
        Parameters:
        ticker - The exchange specific ticker
        currencyPair - The currency pair (e.g. BTC/USD)
        Returns:
        The ticker
      • adaptOrderBook

        public static OrderBook adaptOrderBook​(CexIODepth depth,
                                               CurrencyPair currencyPair)
        Adapts Cex.IO Depth to OrderBook Object
        Parameters:
        depth - Cex.IO order book
        currencyPair - The currency pair (e.g. BTC/USD)
        Returns:
        The XChange OrderBook
      • adaptWallet

        public static Wallet adaptWallet​(CexIOBalanceInfo cexIOBalanceInfo)
        Adapts CexIOBalanceInfo to Wallet
        Parameters:
        cexIOBalanceInfo - CexIOBalanceInfo balance
        Returns:
        The account info
      • checkArgument

        public static void checkArgument​(boolean argument,
                                         String msgPattern,
                                         Object... msgArgs)