class CoinbaseProTradeService extends CoinbaseProTradeServiceRaw implements TradeService {

  public CoinbaseProTradeService(
      CoinbaseProExchange exchange, ResilienceRegistries resilienceRegistries) {
    super(exchange, resilienceRegistries);
  }

  @Override
  public OpenOrders getOpenOrders() throws IOException {
    return CoinbaseProAdapters.adaptOpenOrders(getCoinbaseProOpenOrders());
  }

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

  @Override
  public OpenOrders getOpenOrders(OpenOrdersParams params) throws IOException {<FILL_FUNCTION_BODY>}

  @Override
  public String placeMarketOrder(MarketOrder marketOrder) throws IOException {
    return placeCoinbaseProOrder(CoinbaseProAdapters.adaptCoinbaseProPlaceMarketOrder(marketOrder))
        .getId();
  }

  @Override
  public String placeLimitOrder(LimitOrder limitOrder) throws IOException, FundsExceededException {
    return placeCoinbaseProOrder(CoinbaseProAdapters.adaptCoinbaseProPlaceLimitOrder(limitOrder))
        .getId();
  }

  @Override
  public String placeStopOrder(StopOrder stopOrder) throws IOException, FundsExceededException {
    return placeCoinbaseProOrder(CoinbaseProAdapters.adaptCoinbaseProStopOrder(stopOrder)).getId();
  }

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

  @Override
  public boolean cancelOrder(CancelOrderParams orderParams) throws IOException {
    if (orderParams instanceof CancelOrderByIdParams) {
      return cancelOrder(((CancelOrderByIdParams) orderParams).getOrderId());
    } else {
      return false;
    }
  }

  @Override
  public UserTrades getTradeHistory(TradeHistoryParams params) throws IOException {
    return CoinbaseProAdapters.adaptTradeHistory(getCoinbaseProFills(params));
  }

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

  @Override
  public Collection<Order> getOrder(OrderQueryParams... orderQueryParams) throws IOException {
    final String[] orderIds =
        Arrays.stream(orderQueryParams).map(OrderQueryParams::getOrderId).toArray(String[]::new);

    Collection<Order> orders = new ArrayList<>(orderIds.length);

    for (String orderId : orderIds) {
      orders.add(CoinbaseProAdapters.adaptOrder(super.getOrder(orderId)));
    }

    return orders;
  }
}

    if (params instanceof OpenOrdersParamCurrencyPair) {
      OpenOrdersParamCurrencyPair pairParams = (OpenOrdersParamCurrencyPair) params;
      String productId = CoinbaseProAdapters.adaptProductID(pairParams.getCurrencyPair());
      return CoinbaseProAdapters.adaptOpenOrders(getCoinbaseProOpenOrders(productId));
    }
    return CoinbaseProAdapters.adaptOpenOrders(getCoinbaseProOpenOrders());
  
<methods>public void <init>(org.knowm.xchange.coinbasepro.CoinbaseProExchange, org.knowm.xchange.client.ResilienceRegistries) ,public boolean cancelCoinbaseProOrder(java.lang.String) throws java.io.IOException,public CoinbasePagedResponse<org.knowm.xchange.coinbasepro.dto.trade.CoinbaseProFill> getCoinbaseProFills(org.knowm.xchange.service.trade.params.TradeHistoryParams) throws java.io.IOException,public org.knowm.xchange.coinbasepro.dto.trade.CoinbaseProOrder[] getCoinbaseProOpenOrders() throws java.io.IOException,public org.knowm.xchange.coinbasepro.dto.trade.CoinbaseProOrder[] getCoinbaseProOpenOrders(java.lang.String) throws java.io.IOException,public org.knowm.xchange.coinbasepro.dto.trade.CoinbaseProOrder getOrder(java.lang.String) throws java.io.IOException,public CoinbasePagedResponse<org.knowm.xchange.coinbasepro.dto.trade.CoinbaseProOrder> getOrders(java.lang.String, java.lang.Integer, java.lang.String) throws java.io.IOException,public org.knowm.xchange.coinbasepro.dto.trade.CoinbaseProIdResponse placeCoinbaseProOrder(org.knowm.xchange.coinbasepro.dto.trade.CoinbaseProPlaceOrder) throws java.io.IOException<variables>