@@ -0,0 +1,3084 @@
+package org.knowm.xchange.latoken.dto.trade;%0A%0Aimport java.math.BigDecimal;%0Aimport java.util.Date;%0Aimport java.util.List;%0A%0Aimport org.junit.Assume;%0Aimport org.junit.Before;%0Aimport org.junit.BeforeClass;%0Aimport org.junit.Test;%0Aimport org.knowm.xchange.Exchange;%0Aimport org.knowm.xchange.ExchangeFactory;%0Aimport org.knowm.xchange.currency.CurrencyPair;%0Aimport org.knowm.xchange.dto.Order.OrderType;%0Aimport org.knowm.xchange.dto.trade.LimitOrder;%0Aimport org.knowm.xchange.dto.trade.OpenOrders;%0Aimport org.knowm.xchange.latoken.LatokenExchange;%0Aimport org.knowm.xchange.latoken.service.LatokenTradeService;%0Aimport org.knowm.xchange.service.trade.params.orders.DefaultOpenOrdersParamCurrencyPair;%0Aimport org.knowm.xchange.service.trade.params.orders.OpenOrdersParams;%0Aimport org.knowm.xchange.utils.StreamUtils;%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Apublic class TradeServiceIntegration %7B%0A%0A  static Logger LOG = LoggerFactory.getLogger(TradeServiceIntegration.class);%0A%0A  static Exchange exchange;%0A  static LatokenTradeService tradeService;%0A%0A  @BeforeClass%0A  public static void beforeClass() %7B%0A    exchange = ExchangeFactory.INSTANCE.createExchange(%0A    %09%09LatokenExchange.class.getName(),%0A    %09%09%22api-v1-XXX%22, %0A    %09%09%22api-v1-secret-YYY%22);%0A    tradeService = (LatokenTradeService) exchange.getTradeService();%0A  %7D%0A%0A  @Before%0A  public void before() %7B%0A    Assume.assumeNotNull(exchange.getExchangeSpecification().getApiKey());%0A  %7D%0A%0A  @Test%0A  public void openOrders() throws Exception %7B%0A%0A    DefaultOpenOrdersParamCurrencyPair params = (DefaultOpenOrdersParamCurrencyPair) tradeService.createOpenOrdersParams();%0A    params.setCurrencyPair(CurrencyPair.ETH_BTC);%0A    List%3CLimitOrder%3E orders = tradeService.getOpenOrders(params).getOpenOrders();%0A    orders.forEach(order -%3E System.out.println(order));%0A  %7D%0A  %0A  @Test%0A  public void newOrder() throws Exception %7B%0A%0A    CurrencyPair pair = CurrencyPair.ETH_BTC;%0A    OrderType type = OrderType.BID;%0A    BigDecimal amount = BigDecimal.valueOf(0.01);%0A    BigDecimal limitPrice = BigDecimal.valueOf(0.018881);%0A    LimitOrder newOrder = new LimitOrder.Builder(type, pair)%0A    %09%09.originalAmount(amount)%0A    %09%09.limitPrice(limitPrice)%0A    %09%09.timestamp(new Date(System.currentTimeMillis()))%0A    %09%09.build();%0A    %0A    // Test order%0A    LatokenTestOrder testOrder = tradeService.placeLatokenTestOrder(pair, %22%22, LatokenOrderSide.buy, limitPrice, amount);%0A    System.out.println(testOrder);%0A    %0A    // Place order %0A    String newOrderId = tradeService.placeLimitOrder(newOrder);%0A    System.out.println(newOrderId);%0A    %0A    // Check open orders %0A    DefaultOpenOrdersParamCurrencyPair params = (DefaultOpenOrdersParamCurrencyPair) tradeService.createOpenOrdersParams();%0A    params.setCurrencyPair(CurrencyPair.ETH_BTC);%0A    List%3CLimitOrder%3E openOrders = tradeService.getOpenOrders(params).getOpenOrders();%0A    System.out.println(openOrders);%0A    %0A    // Cancel %0A    tradeService.cancelLatokenOrder(newOrderId);%0A    %0A    // Check open orders%0A    openOrders = tradeService.getOpenOrders().getOpenOrders();%0A    System.out.println(openOrders);%0A  %7D%0A%7D%0A

Add trade service integration test