Package org.knowm.xchange.coingi
Class CoingiAdapters
java.lang.Object
org.knowm.xchange.coingi.CoingiAdapters
Various adapters for converting from Coingi DTOs to XChange DTOs
-
Method Summary
Modifier and TypeMethodDescriptionstatic AccountInfo
adaptAccountInfo
(CoingiBalances coingiBalances, String userName) Adapts a CoingiBalances to an AccountInfostatic CurrencyPair
adaptCurrency
(Map<String, String> currencyPair) static String
adaptCurrency
(CurrencyPair pair) static OpenOrders
adaptOpenOrders
(CoingiOrdersList orders) static OrderBook
adaptOrderBook
(CoingiOrderBook coingiOrderBook) static Order.OrderStatus
adaptOrderStatus
(int status) static Order.OrderType
adaptOrderType
(int type) static Ticker
adaptTicker
(List<CoingiTicker> tickers, OrderBook orderBook, CurrencyPair currencyPair) static Trade
adaptTrade
(CoingiUserTransaction tx, CurrencyPair currencyPair, int timeScale) Adapts a Transaction to a Trade Objectstatic Trade
adaptTrade
(CoingiTransaction tx, CurrencyPair currencyPair, int timeScale) static UserTrades
adaptTradeHistory
(CoingiOrdersList ordersList) static Trades
adaptTrades
(List<CoingiTransaction> coingiTransactions, CurrencyPair currencyPair) static void
checkArgument
(boolean argument, String msgPattern, Object... msgArgs) static LimitOrder
createOrder
(CurrencyPair currencyPair, List<BigDecimal> priceAndAmount, Order.OrderType orderType) static List<LimitOrder>
createOrders
(CurrencyPair currencyPair, Order.OrderType orderType, List<List<BigDecimal>> orders)
-
Method Details
-
adaptAccountInfo
Adapts a CoingiBalances to an AccountInfo- Parameters:
coingiBalances
- The Coingi balanceuserName
- The user name- Returns:
- The account info
-
adaptOrderBook
-
adaptOrderType
-
adaptCurrency
-
adaptCurrency
-
createOrders
public static List<LimitOrder> createOrders(CurrencyPair currencyPair, Order.OrderType orderType, List<List<BigDecimal>> orders) -
createOrder
public static LimitOrder createOrder(CurrencyPair currencyPair, List<BigDecimal> priceAndAmount, Order.OrderType orderType) -
checkArgument
-
adaptOpenOrders
-
adaptTrade
Adapts a Transaction to a Trade Object- Parameters:
tx
- The Coingi transactioncurrencyPair
- (e.g. BTC/USD)timeScale
- polled order books provide a timestamp in seconds, stream in ms- Returns:
- The XChange Trade
-
adaptTrade
-
adaptTradeHistory
-
adaptTrades
public static Trades adaptTrades(List<CoingiTransaction> coingiTransactions, CurrencyPair currencyPair) -
adaptOrderStatus
-
adaptTicker
public static Ticker adaptTicker(List<CoingiTicker> tickers, OrderBook orderBook, CurrencyPair currencyPair)
-