Search in sources :

Example 1 with LatokenUserTrade

use of org.knowm.xchange.latoken.dto.trade.LatokenUserTrade in project XChange by knowm.

the class LatokenAdapters method adaptUserTrades.

public static UserTrades adaptUserTrades(Exchange exchange, LatokenUserTrades latokenUserTrades) {
    CurrencyPair pair = adaptCurrencyPair(exchange, latokenUserTrades.getSymbol());
    List<UserTrade> trades = latokenUserTrades.getTrades().stream().map(latokenUserTrade -> adaptUserTrade(latokenUserTrade, pair)).collect(Collectors.toList());
    return new UserTrades(trades, Trades.TradeSortType.SortByTimestamp);
}
Also used : LatokenOrderbook(org.knowm.xchange.latoken.dto.marketdata.LatokenOrderbook) OrderType(org.knowm.xchange.dto.Order.OrderType) LatokenBalance(org.knowm.xchange.latoken.dto.account.LatokenBalance) LatokenUserTrade(org.knowm.xchange.latoken.dto.trade.LatokenUserTrade) Exchange(org.knowm.xchange.Exchange) OrderBook(org.knowm.xchange.dto.marketdata.OrderBook) Balance(org.knowm.xchange.dto.account.Balance) TradeSortType(org.knowm.xchange.dto.marketdata.Trades.TradeSortType) BigDecimal(java.math.BigDecimal) CurrencyPairMetaData(org.knowm.xchange.dto.meta.CurrencyPairMetaData) LatokenCurrency(org.knowm.xchange.latoken.dto.exchangeinfo.LatokenCurrency) LatokenTrades(org.knowm.xchange.latoken.dto.marketdata.LatokenTrades) LatokenPair(org.knowm.xchange.latoken.dto.exchangeinfo.LatokenPair) OpenOrders(org.knowm.xchange.dto.trade.OpenOrders) RoundingMode(java.math.RoundingMode) LimitOrder(org.knowm.xchange.dto.trade.LimitOrder) OrderStatus(org.knowm.xchange.dto.Order.OrderStatus) Ticker(org.knowm.xchange.dto.marketdata.Ticker) LatokenOrder(org.knowm.xchange.latoken.dto.trade.LatokenOrder) LatokenOrderSide(org.knowm.xchange.latoken.dto.trade.LatokenOrderSide) UserTrades(org.knowm.xchange.dto.trade.UserTrades) UserTrade(org.knowm.xchange.dto.trade.UserTrade) LatokenOrderStatus(org.knowm.xchange.latoken.dto.trade.LatokenOrderStatus) LatokenTicker(org.knowm.xchange.latoken.dto.marketdata.LatokenTicker) Collectors(java.util.stream.Collectors) Trades(org.knowm.xchange.dto.marketdata.Trades) ExchangeException(org.knowm.xchange.exceptions.ExchangeException) LatokenTrade(org.knowm.xchange.latoken.dto.marketdata.LatokenTrade) List(java.util.List) Currency(org.knowm.xchange.currency.Currency) Optional(java.util.Optional) Trade(org.knowm.xchange.dto.marketdata.Trade) CurrencyPair(org.knowm.xchange.currency.CurrencyPair) LatokenUserTrades(org.knowm.xchange.latoken.dto.trade.LatokenUserTrades) UserTrades(org.knowm.xchange.dto.trade.UserTrades) LatokenUserTrades(org.knowm.xchange.latoken.dto.trade.LatokenUserTrades) LatokenUserTrade(org.knowm.xchange.latoken.dto.trade.LatokenUserTrade) UserTrade(org.knowm.xchange.dto.trade.UserTrade) CurrencyPair(org.knowm.xchange.currency.CurrencyPair)

Aggregations

BigDecimal (java.math.BigDecimal)1 RoundingMode (java.math.RoundingMode)1 List (java.util.List)1 Optional (java.util.Optional)1 Collectors (java.util.stream.Collectors)1 Exchange (org.knowm.xchange.Exchange)1 Currency (org.knowm.xchange.currency.Currency)1 CurrencyPair (org.knowm.xchange.currency.CurrencyPair)1 OrderStatus (org.knowm.xchange.dto.Order.OrderStatus)1 OrderType (org.knowm.xchange.dto.Order.OrderType)1 Balance (org.knowm.xchange.dto.account.Balance)1 OrderBook (org.knowm.xchange.dto.marketdata.OrderBook)1 Ticker (org.knowm.xchange.dto.marketdata.Ticker)1 Trade (org.knowm.xchange.dto.marketdata.Trade)1 Trades (org.knowm.xchange.dto.marketdata.Trades)1 TradeSortType (org.knowm.xchange.dto.marketdata.Trades.TradeSortType)1 CurrencyPairMetaData (org.knowm.xchange.dto.meta.CurrencyPairMetaData)1 LimitOrder (org.knowm.xchange.dto.trade.LimitOrder)1 OpenOrders (org.knowm.xchange.dto.trade.OpenOrders)1 UserTrade (org.knowm.xchange.dto.trade.UserTrade)1