class BitsoTradeService extends BitsoTradeServiceRaw implements TradeService {

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

    super(exchange);
  }

  @Override
  public OpenOrders getOpenOrders() throws IOException, BitsoException {
    return getOpenOrders(createOpenOrdersParams());
  }

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

  @Override
  public String placeMarketOrder(MarketOrder marketOrder) throws IOException, BitsoException {

    throw new NotAvailableFromExchangeException();
  }

  @Override
  public String placeLimitOrder(LimitOrder limitOrder) throws IOException, BitsoException {

    BitsoOrder bitsoOrder;
    if (limitOrder.getType() == BID) {
      bitsoOrder = buyBitoOrder(limitOrder.getOriginalAmount(), limitOrder.getLimitPrice());
    } else {
      bitsoOrder = sellBitsoOrder(limitOrder.getOriginalAmount(), limitOrder.getLimitPrice());
    }
    if (bitsoOrder.getErrorMessage() != null) {
      throw new ExchangeException(bitsoOrder.getErrorMessage());
    }

    return bitsoOrder.getId();
  }

  @Override
  public boolean cancelOrder(String orderId) throws IOException, BitsoException {

    return cancelBitsoOrder(orderId);
  }

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

  /**
   * Required parameter types: {@link TradeHistoryParamPaging#getPageLength()}
   *
   * <p>Warning: using a limit here can be misleading. The underlying call retrieves trades,
   * withdrawals, and deposits. So the example here will limit the result to 17 of those types and
   * from those 17 only trades are returned. It is recommended to use the raw service demonstrated
   * below if you want to use this feature.
   */
  @Override
  public UserTrades getTradeHistory(TradeHistoryParams params) throws IOException {

    return BitsoAdapters.adaptTradeHistory(
        getBitsoUserTransactions(Long.valueOf(((TradeHistoryParamPaging) params).getPageLength())));
  }

  @Override
  public TradeHistoryParams createTradeHistoryParams() {

    return new DefaultTradeHistoryParamPaging(1000);
  }

  @Override
  public OpenOrdersParams createOpenOrdersParams() {
    return null;
  }
}

    BitsoOrder[] openOrders = getBitsoOpenOrders();

    List<LimitOrder> limitOrders = new ArrayList<>();
    for (BitsoOrder bitsoOrder : openOrders) {
      OrderType orderType = bitsoOrder.getType() == 0 ? OrderType.BID : OrderType.ASK;
      String id = bitsoOrder.getId();
      BigDecimal price = bitsoOrder.getPrice();
      limitOrders.add(
          new LimitOrder(
              orderType,
              bitsoOrder.getAmount(),
              new CurrencyPair(Currency.BTC, Currency.MXN),
              id,
              bitsoOrder.getTime(),
              price));
    }
    return new OpenOrders(limitOrders);
  
<methods>public void <init>(org.knowm.xchange.Exchange) ,public org.knowm.xchange.bitso.dto.trade.BitsoOrder buyBitoOrder(java.math.BigDecimal, java.math.BigDecimal) throws java.io.IOException,public boolean cancelBitsoOrder(java.lang.String) throws java.io.IOException,public org.knowm.xchange.bitso.dto.trade.BitsoOrder[] getBitsoOpenOrders() throws java.io.IOException,public org.knowm.xchange.bitso.dto.trade.BitsoUserTransaction[] getBitsoUserTransactions(java.lang.Long) throws java.io.IOException,public org.knowm.xchange.bitso.dto.trade.BitsoUserTransaction[] getBitsoUserTransactions(java.lang.Long, java.lang.Long, java.lang.String) throws java.io.IOException,public org.knowm.xchange.bitso.dto.trade.BitsoOrder sellBitsoOrder(java.math.BigDecimal, java.math.BigDecimal) throws java.io.IOException<variables>private final non-sealed org.knowm.xchange.bitso.BitsoAuthenticated bitsoAuthenticated,private final non-sealed org.knowm.xchange.bitso.service.BitsoDigest signatureCreator