class LykkeTradeService extends LykkeTradeServiceRaw implements TradeService {

  public LykkeTradeService(Exchange exchange) {
    super(exchange);
  }

  @Override
  public OpenOrders getOpenOrders() throws IOException {
    // default: 100
    return new OpenOrders(
        LykkeAdapter.adaptOpenOrders(exchange.getExchangeInstruments(), getLastOrders()));
  }

  @Override
  public OpenOrders getOpenOrders(OpenOrdersParams params) throws IOException {
    return new OpenOrders(
        LykkeAdapter.adaptOpenOrders(exchange.getExchangeInstruments(), getLastOrders()));
  }

  @Override
  public String placeMarketOrder(MarketOrder marketOrder) throws IOException {
    throw new NotYetImplementedForExchangeException();
  }

  @Override
  public String placeLimitOrder(LimitOrder limitOrder) throws IOException {
    return placeLimitOrder(LykkeAdapter.adaptLykkeOrder(limitOrder));
  }

  @Override
  public String placeStopOrder(StopOrder stopOrder) throws IOException {
    throw new NotYetImplementedForExchangeException();
  }

  @Override
  public boolean cancelOrder(String orderId) throws IOException {
    return cancelLykkeOrder(orderId);
  }

  @Override
  public boolean cancelOrder(CancelOrderParams orderParams) throws IOException {<FILL_FUNCTION_BODY>}

  @Override
  public UserTrades getTradeHistory(TradeHistoryParams params) throws IOException {
    if (params instanceof TradeHistoryParamsAll) {
      return new UserTrades(
          LykkeAdapter.adaptUserTrades(
              exchange.getExchangeInstruments(),
              getMathedOrders(((TradeHistoryParamsAll) params).getPageLength())),
          Trades.TradeSortType.SortByTimestamp);
    }
    throw new NotYetImplementedForExchangeException(
        "This method accepts only instance of TradeHistoryParamsAll.");
  }

  @Override
  public TradeHistoryParams createTradeHistoryParams() {
    return new TradeHistoryParamsAll();
  }

  @Override
  public OpenOrdersParams createOpenOrdersParams() {
    return new DefaultOpenOrdersParamCurrencyPair();
  }
}

    if (orderParams instanceof CancelOrderByIdParams) {
      return cancelOrder(((CancelOrderByIdParams) orderParams).getOrderId());
    } else if (orderParams instanceof CancelOrderByCurrencyPair) {
      return cancelAllLykkeOrders(
          LykkeAdapter.adaptToAssetPair(
              ((CancelOrderByCurrencyPair) orderParams).getCurrencyPair()));
    }
    throw new NotYetImplementedForExchangeException(
        "This method accepts only instance of CancelOrderByIdParams.");
  
<methods>public void <init>(org.knowm.xchange.Exchange) ,public boolean cancelAllLykkeOrders(java.lang.String) throws java.io.IOException,public boolean cancelLykkeOrder(java.lang.String) throws java.io.IOException,public List<org.knowm.xchange.lykke.dto.trade.LykkeOrder> getLastOrders() throws java.io.IOException,public List<org.knowm.xchange.lykke.dto.trade.LykkeTradeHistory> getLykkeTradeHistory(org.knowm.xchange.service.trade.params.TradeHistoryParamsAll) throws java.io.IOException,public List<org.knowm.xchange.lykke.dto.trade.LykkeOrder> getMathedOrders(int) throws java.io.IOException,public org.knowm.xchange.lykke.dto.trade.LykkeTradeHistory getTradeHistoryById(java.lang.String) throws java.io.IOException,public java.lang.String placeLimitOrder(org.knowm.xchange.lykke.dto.trade.LykkeLimitOrder) throws java.io.IOException<variables>private Logger logger