Package org.knowm.xchange.coinmate
Class CoinmateAdapters
java.lang.Object
org.knowm.xchange.coinmate.CoinmateAdapters
- Author:
- Martin Stachon
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<FundingRecord>
adaptFundingDetail
(CoinmateTransferDetail coinmateTransferDetail) static List<FundingRecord>
adaptFundingHistory
(CoinmateTransactionHistory coinmateTradeHistory, CoinmateTransferHistory additionalTransferData) static List<LimitOrder>
adaptOpenOrders
(CoinmateOpenOrders coinmateOpenOrders) static Order
adaptOrder
(CoinmateOrderHistoryEntry coinmateOrder, Function<String, CoinmateOrderHistoryEntry> orderByIdFetcher) Adapt a single order.static OrderBook
adaptOrderBook
(CoinmateOrderBook coinmateOrderBook, CurrencyPair currencyPair) static String
adaptStopOrders
(CoinmateOpenOrders coinmateOpenOrders) static Ticker
adaptTicker
(CoinmateTickerData data, CurrencyPair currencyPair) static Ticker
adaptTicker
(CoinmateTicker coinmateTicker, CurrencyPair currencyPair) Adapts a CoinmateTicker to a Ticker ObjectadaptTickers
(CoinmateTickers coinmateTickers) static Trade
adaptTrade
(CoinmateTransactionsEntry coinmateEntry) static UserTrades
adaptTradeHistory
(CoinmateTradeHistory coinmateTradeHistory) static Trades
adaptTrades
(CoinmateTransactions coinmateTransactions) static Ticker
adaptTradeStatistics
(CoinmateTradeStatistics tradeStatistics, CurrencyPair currencyPair) static UserTrades
adaptTransactionHistory
(CoinmateTransactionHistory coinmateTradeHistory) static Wallet
adaptWallet
(CoinmateBalance coinmateBalance) static List<LimitOrder>
createOrders
(List<CoinmateOrderBookEntry> coinmateOrders, Order.OrderType type, CurrencyPair currencyPair) static Order.OrderType
typeToOrderTypeOrNull
(String type)
-
Constructor Details
-
CoinmateAdapters
public CoinmateAdapters()
-
-
Method Details
-
adaptTicker
Adapts a CoinmateTicker to a Ticker Object- Parameters:
coinmateTicker
- The exchange specific tickercurrencyPair
- (e.g. BTC/USD)- Returns:
- The ticker
-
adaptTickers
-
adaptTicker
-
createOrders
public static List<LimitOrder> createOrders(List<CoinmateOrderBookEntry> coinmateOrders, Order.OrderType type, CurrencyPair currencyPair) -
adaptOrderBook
public static OrderBook adaptOrderBook(CoinmateOrderBook coinmateOrderBook, CurrencyPair currencyPair) -
adaptTrades
-
adaptTrade
-
typeToOrderTypeOrNull
-
adaptWallet
-
adaptTransactionHistory
-
adaptTradeHistory
-
adaptFundingHistory
public static List<FundingRecord> adaptFundingHistory(CoinmateTransactionHistory coinmateTradeHistory, CoinmateTransferHistory additionalTransferData) -
adaptFundingDetail
-
adaptOpenOrders
public static List<LimitOrder> adaptOpenOrders(CoinmateOpenOrders coinmateOpenOrders) throws CoinmateException - Throws:
CoinmateException
-
adaptStopOrders
public static List<Order> adaptStopOrders(CoinmateOpenOrders coinmateOpenOrders) throws CoinmateException - Throws:
CoinmateException
-
adaptSortOrder
-
adaptOrder
public static Order adaptOrder(CoinmateOrderHistoryEntry coinmateOrder, Function<String, CoinmateOrderHistoryEntry> orderByIdFetcher) throws CoinmateExceptionAdapt a single order.- Parameters:
coinmateOrder
- The raw orderorderByIdFetcher
- function to fetch order by id - needed to fetch market orders generated by stop-loss orders.- Returns:
- Throws:
CoinmateException
-
adaptTradeStatistics
public static Ticker adaptTradeStatistics(CoinmateTradeStatistics tradeStatistics, CurrencyPair currencyPair)
-