Class LakeBTCAdapters


  • public class LakeBTCAdapters
    extends Object
    Author:
    kpysniak
    • Method Detail

      • adaptTrades

        public static Trades adaptTrades​(LakeBTCTradeResponse[] transactions,
                                         CurrencyPair currencyPair)
        Adapts a Transaction[] to a Trades Object
        Parameters:
        transactions - The LakeBtc transactions
        currencyPair - (e.g. BTC/USD)
        Returns:
        The XChange Trades
      • adaptTrade

        public static Trade adaptTrade​(LakeBTCTradeResponse tx,
                                       CurrencyPair currencyPair,
                                       int timeScale)
        Adapts a Transaction to a Trade Object
        Parameters:
        tx - The LakeBtc transaction
        currencyPair - (e.g. BTC/USD)
        timeScale - polled order books provide a timestamp in seconds, stream in ms
        Returns:
        The XChange Trade
      • adaptTradeHistory

        public static UserTrades adaptTradeHistory​(LakeBTCTradeResponse[] transactions)
        Adapt the user's trades
        Parameters:
        transactions -
        Returns:
      • adaptAccountInfo

        public static AccountInfo adaptAccountInfo​(LakeBTCAccount lakeBTCAccount)
        Adapts a LakeBTCAccount to an AccountInfo
        Parameters:
        lakeBTCAccount -
        Returns:
        Wallet
      • adaptCurrencyPair

        public static String adaptCurrencyPair​(CurrencyPair currencyPair)
        Adapts a currency pair to the keys returned by the tickers map.
        Parameters:
        currencyPair - The currency pair to convert to LakeBTCs ticker keys
        Returns:
        A string suitable for looking up ticker information.