class KrakenFuturesTradeService extends KrakenFuturesTradeServiceRaw
    implements TradeService {

  /**
   * Constructor
   *
   * @param exchange
   */
  public KrakenFuturesTradeService(Exchange exchange) {

    super(exchange);
  }

  @Override
  public OpenOrders getOpenOrders() throws IOException {
    return getOpenOrders(null);
  }

  @Override
  public OpenOrders getOpenOrders(OpenOrdersParams params) throws IOException {
    return KrakenFuturesAdapters.adaptOpenOrders(getKrakenFuturesOpenOrders());
  }

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

  @Override
  public Class[] getRequiredCancelOrderParamClasses() {
    return new Class[] {CancelOrderByIdParams.class};
  }

  @Override
  public OpenPositions getOpenPositions() throws IOException {
    return KrakenFuturesAdapters.adaptOpenPositions(getKrakenFuturesOpenPositions());
  }

  @Override
  public String placeMarketOrder(MarketOrder marketOrder) throws IOException {
    return placeKrakenFuturesMarketOrder(marketOrder).getOrderId();
  }

  @Override
  public String placeStopOrder(StopOrder stopOrder) throws IOException {
    return placeKrakenFuturesStopOrder(stopOrder).getOrderId();
  }

  @Override
  public String changeOrder(LimitOrder limitOrder) throws IOException {
    return changeKrakenFuturesOrder(limitOrder);
  }

  @Override
  public Collection<String> cancelAllOrders(CancelAllOrders orderParams) throws IOException {<FILL_FUNCTION_BODY>}

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

  @Override
  public Collection<Order> getOrder(String... orderIds) throws IOException {
    return getKrakenFuturesOrdersStatuses(orderIds).getOrders().stream()
        .map(KrakenFuturesAdapters::adaptKrakenFuturesOrder)
        .collect(Collectors.toList());
  }

  @Override
  public boolean cancelOrder(String orderId) throws IOException {
    return cancelKrakenFuturesOrder(orderId).isSuccess();
  }

  @Override
  public boolean cancelOrder(CancelOrderParams orderParams) throws IOException {
    if (orderParams instanceof CancelOrderByIdParams) {
      return cancelOrder(((CancelOrderByIdParams) orderParams).getOrderId());
    } else {
      throw new NotSupportedException(
          "CancelOrderParams need to be instance of CancelOrderByIdParams.");
    }
  }

  @Override
  public UserTrades getTradeHistory(TradeHistoryParams params) throws IOException {
    return KrakenFuturesAdapters.adaptFills(getKrakenFuturesFills());
  }
}

    if (orderParams instanceof CancelOrderByInstrument) {
      return cancelAllOrdersByInstrument(((CancelOrderByInstrument) orderParams).getInstrument())
          .getCancelStatus()
          .getOrderIds()
          .stream()
          .map(KrakenFuturesCancelAllOrders.KrakenFuturesOrderId::getOrderId)
          .collect(Collectors.toList());
    } else {
      throw new NotSupportedException(
          "OrderParams need to implement CancelOrderByInstrument interface.");
    }
  
<methods>public void <init>(org.knowm.xchange.Exchange) ,public org.knowm.xchange.krakenfutures.dto.trade.KrakenFuturesCancelAllOrdersAfter cancelAllOrdersAfter(long) throws java.io.IOException,public org.knowm.xchange.krakenfutures.dto.trade.KrakenFuturesCancelAllOrders cancelAllOrdersByInstrument(org.knowm.xchange.instrument.Instrument) throws java.io.IOException,public org.knowm.xchange.krakenfutures.dto.trade.KrakenFuturesCancel cancelKrakenFuturesOrder(java.lang.String) throws java.io.IOException,public java.lang.String changeKrakenFuturesOrder(org.knowm.xchange.dto.trade.LimitOrder) throws java.io.IOException,public org.knowm.xchange.krakenfutures.dto.trade.KrakenFuturesFills getKrakenFuturesFills() throws java.io.IOException,public org.knowm.xchange.krakenfutures.dto.trade.KrakenFuturesFills getKrakenFuturesFills(java.util.Date) throws java.io.IOException,public org.knowm.xchange.krakenfutures.dto.trade.KrakenFuturesOpenOrders getKrakenFuturesOpenOrders() throws java.io.IOException,public transient org.knowm.xchange.krakenfutures.dto.trade.KrakenFuturesOrdersStatusesResponse getKrakenFuturesOrdersStatuses(java.lang.String[]) throws java.io.IOException,public org.knowm.xchange.krakenfutures.dto.marketData.KrakenFuturesOrder placeKrakenFuturesLimitOrder(org.knowm.xchange.dto.trade.LimitOrder) throws java.io.IOException,public org.knowm.xchange.krakenfutures.dto.marketData.KrakenFuturesOrder placeKrakenFuturesMarketOrder(org.knowm.xchange.dto.trade.MarketOrder) throws java.io.IOException,public org.knowm.xchange.krakenfutures.dto.marketData.KrakenFuturesOrder placeKrakenFuturesStopOrder(org.knowm.xchange.dto.trade.StopOrder) throws java.io.IOException,public org.knowm.xchange.krakenfutures.dto.trade.BatchOrderResult sendKrakenFuturesBatchOrder(List<org.knowm.xchange.krakenfutures.dto.trade.OrderCommand>) throws java.io.IOException<variables>