class BithumbTradeService extends BithumbTradeServiceRaw implements TradeService {

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

  @Override
  public OpenOrders getOpenOrders() throws IOException {
    throw new NotAvailableFromExchangeException();
  }

  @Override
  public OpenOrders getOpenOrders(OpenOrdersParams params) throws IOException {

    final CurrencyPair currencyPair =
        Optional.ofNullable(params)
            .filter(p -> p instanceof OpenOrdersParamCurrencyPair)
            .map(p -> ((OpenOrdersParamCurrencyPair) p).getCurrencyPair())
            .orElse(null);

    try {
      return BithumbAdapters.adaptOrders(getBithumbOrders(currencyPair).getData());
    } catch (BithumbException e) {
      throw BithumbErrorAdapter.adapt(e);
    }
  }

  @Override
  public String placeMarketOrder(MarketOrder marketOrder) throws IOException {
    try {
      BithumbTradeResponse bithumbTradeResponse = placeBithumbMarketOrder(marketOrder);
      if (!"0000".equals(bithumbTradeResponse.getStatus()))
        throw new BithumbException(
            bithumbTradeResponse.getStatus(), bithumbTradeResponse.getMessage());
      return bithumbTradeResponse.getOrderId();
    } catch (BithumbException e) {
      throw BithumbErrorAdapter.adapt(e);
    }
  }

  @Override
  public String placeLimitOrder(LimitOrder limitOrder) throws IOException {<FILL_FUNCTION_BODY>}

  @Override
  public boolean cancelOrder(CancelOrderParams orderParams) throws IOException {
    try {
      if (!(orderParams instanceof CancelOrderByIdParams
          && orderParams instanceof CancelOrderByCurrencyPair)) {
        throw new NotYetImplementedForExchangeException(
            "Only CancelOrderByPairAndIdParams || (CancelOrderByIdParams && CancelOrderByCurrencyPair) supported");
      }

      String orderId = ((CancelOrderByIdParams) orderParams).getOrderId();
      CurrencyPair pair = ((CancelOrderByCurrencyPair) orderParams).getCurrencyPair();
      return cancelBithumbOrder(orderId, pair);
    } catch (BithumbException e) {
      throw BithumbErrorAdapter.adapt(e);
    }
  }

  @Override
  public UserTrades getTradeHistory(TradeHistoryParams params) throws IOException {

    final CurrencyPair currencyPair =
        Optional.ofNullable(params)
            .filter(p -> p instanceof TradeHistoryParamCurrencyPair)
            .map(p -> ((TradeHistoryParamCurrencyPair) p).getCurrencyPair())
            .orElse(null);
    try {
      return BithumbAdapters.adaptUserTrades(
          getBithumbUserTransactions(currencyPair).getData(), currencyPair);
    } catch (BithumbException e) {
      throw BithumbErrorAdapter.adapt(e);
    }
  }

  @Override
  public Collection<Order> getOrder(String... orderIds) throws IOException {
    throw new NotAvailableFromExchangeException();
  }

  @Override
  public Class getRequiredOrderQueryParamClass() {
    return OrderQueryParamCurrencyPair.class;
  }

  @Override
  public Collection<Order> getOrder(OrderQueryParams... orderQueryParams) throws IOException {
    /* This only works for executed orders */
    return Arrays.stream(orderQueryParams)
        .filter(oq -> oq instanceof OrderQueryParamCurrencyPair)
        .map(oq -> (OrderQueryParamCurrencyPair) oq)
        .map(
            oq -> {
              try {
                BithumbResponse<BithumbOrderDetail> r =
                    getBithumbOrderDetail(oq.getOrderId(), oq.getCurrencyPair());
                return BithumbAdapters.adaptOrderDetail(r.getData(), oq.getOrderId());

              } catch (IOException e) {
                throw new RuntimeException(e);
              } catch (BithumbException e) {
                throw BithumbErrorAdapter.adapt(e);
              }
            })
        .filter(Objects::nonNull)
        .collect(Collectors.toList());
  }

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

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

    try {
      BithumbTradeResponse bithumbTradeResponse = placeBithumbLimitOrder(limitOrder);
      if (!"0000".equals(bithumbTradeResponse.getStatus()))
        throw new BithumbException(
            bithumbTradeResponse.getStatus(), bithumbTradeResponse.getMessage());
      return bithumbTradeResponse.getOrderId();
    } catch (BithumbException e) {
      throw BithumbErrorAdapter.adapt(e);
    }
  
<methods>public boolean cancelBithumbOrder(java.lang.String, org.knowm.xchange.currency.CurrencyPair) throws java.io.IOException,public BithumbResponse<org.knowm.xchange.bithumb.dto.account.BithumbOrderDetail> getBithumbOrderDetail(java.lang.String, org.knowm.xchange.currency.CurrencyPair) throws java.io.IOException,public BithumbResponse<List<org.knowm.xchange.bithumb.dto.account.BithumbOrder>> getBithumbOrders(org.knowm.xchange.currency.CurrencyPair) throws java.io.IOException,public org.knowm.xchange.bithumb.dto.account.BithumbOrder getBithumbOrdersByOrderId(java.lang.String, java.lang.String, org.knowm.xchange.currency.CurrencyPair) throws java.io.IOException,public BithumbResponse<List<org.knowm.xchange.bithumb.dto.trade.BithumbUserTransaction>> getBithumbUserTransactions(org.knowm.xchange.currency.CurrencyPair) throws java.io.IOException,public org.knowm.xchange.bithumb.dto.trade.BithumbTradeResponse placeBithumbLimitOrder(org.knowm.xchange.dto.trade.LimitOrder) throws java.io.IOException,public org.knowm.xchange.bithumb.dto.trade.BithumbTradeResponse placeBithumbMarketOrder(org.knowm.xchange.dto.trade.MarketOrder) throws java.io.IOException<variables>