Package org.knowm.xchange.ripple
Class RippleAdapters
java.lang.Object
org.knowm.xchange.ripple.RippleAdapters
Various adapters for converting from Ripple DTOs to XChange DTOs
-
Method Summary
Modifier and TypeMethodDescriptionstatic AccountInfo
adaptAccountInfo
(RippleAccountBalances account, String username) Adapts a Ripple Account to an XChange Wallet object.static OpenOrders
adaptOpenOrders
(RippleAccountOrders rippleOrders, int scale) Adapts a Ripple Account Orders object to an XChange OpenOrders object Counterparties set in additional data since there is no other way of the application receiving this information.static OrderBook
adaptOrderBook
(RippleOrderBook rippleOrderBook, RippleMarketDataParams params, CurrencyPair currencyPair) Adapts a Ripple OrderBook to an XChange OrderBook object.static UserTrade
adaptTrade
(IRippleTradeTransaction trade, TradeHistoryParams params, ITransferFeeSource transferFeeSource, int scale) static UserTrades
adaptTrades
(Collection<IRippleTradeTransaction> tradesForAccount, TradeHistoryParams params, RippleAccountService accountService, int roundingScale) static List<LimitOrder>
createOrders
(CurrencyPair currencyPair, Order.OrderType orderType, List<RippleOrder> orders, String baseCounterparty, String counterCounterparty)
-
Method Details
-
adaptAccountInfo
Adapts a Ripple Account to an XChange Wallet object. -
adaptOrderBook
public static OrderBook adaptOrderBook(RippleOrderBook rippleOrderBook, RippleMarketDataParams params, CurrencyPair currencyPair) Adapts a Ripple OrderBook to an XChange OrderBook object. Counterparties are not mapped since the application calling this should know and keep track of the counterparties it is using in the polling thread. -
createOrders
public static List<LimitOrder> createOrders(CurrencyPair currencyPair, Order.OrderType orderType, List<RippleOrder> orders, String baseCounterparty, String counterCounterparty) -
adaptOpenOrders
Adapts a Ripple Account Orders object to an XChange OpenOrders object Counterparties set in additional data since there is no other way of the application receiving this information. -
adaptTrade
public static UserTrade adaptTrade(IRippleTradeTransaction trade, TradeHistoryParams params, ITransferFeeSource transferFeeSource, int scale) throws IOException - Throws:
IOException
-
adaptTrades
public static UserTrades adaptTrades(Collection<IRippleTradeTransaction> tradesForAccount, TradeHistoryParams params, RippleAccountService accountService, int roundingScale) throws IOException - Throws:
IOException
-