class VaultoroTradeServiceRaw extends VaultoroBaseService {

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

    super(exchange);
  }

  public VaultoroCancelOrderResponse cancelVaultoroOrder(String orderId) throws IOException {

    try {
      VaultoroCancelOrderResponse response =
          vaultoro.cancel(orderId, exchange.getNonceFactory(), apiKey, signatureCreator);
      return response;
    } catch (VaultoroException e) {
      throw new ExchangeException(e);
    }
  }

  public Map<String, List<VaultoroOpenOrder>> getVaultoroOrders() throws IOException {<FILL_FUNCTION_BODY>}

  public VaultoroNewOrderResponse placeLimitOrder(
      CurrencyPair currencyPair, OrderType orderType, BigDecimal amount, BigDecimal price)
      throws IOException {

    return placeOrder("limit", currencyPair, orderType, amount, price);
  }

  public VaultoroNewOrderResponse placeMarketOrder(
      CurrencyPair currencyPair, OrderType orderType, BigDecimal amount) throws IOException {

    return placeOrder("market", currencyPair, orderType, amount, null);
  }

  private VaultoroNewOrderResponse placeOrder(
      String type,
      CurrencyPair currencyPair,
      OrderType orderType,
      BigDecimal amount,
      BigDecimal price)
      throws IOException {

    String baseSymbol = currencyPair.base.getCurrencyCode().toLowerCase();

    if (orderType == OrderType.BID) {

      if (price == null) {

        VaultoroMarketDataService ds = new VaultoroMarketDataService(exchange);
        OrderBook orderBook = ds.getOrderBook(currencyPair);
        List<LimitOrder> asks = orderBook.getAsks();

        if (!asks.isEmpty()) {
          LimitOrder lowestAsk = orderBook.getAsks().get(0);
          price = lowestAsk.getLimitPrice();
        } else {
          price = ds.getLast(currencyPair);
        }
      } else {
        amount = price.multiply(amount, new MathContext(8, RoundingMode.HALF_DOWN));
      }
      try {
        return vaultoro.buy(
            baseSymbol, type, exchange.getNonceFactory(), apiKey, amount, price, signatureCreator);
      } catch (VaultoroException e) {
        throw new ExchangeException(e);
      }
    } else {
      try {
        return vaultoro.sell(
            baseSymbol, type, exchange.getNonceFactory(), apiKey, amount, price, signatureCreator);
      } catch (VaultoroException e) {
        throw new ExchangeException(e);
      }
    }
  }
}


    try {
      VaultoroOrdersResponse response =
          vaultoro.getOrders(exchange.getNonceFactory(), apiKey, signatureCreator);
      return response.getData().get(0);
    } catch (VaultoroException e) {
      throw new ExchangeException(e);
    }
  
<methods>public void <init>(org.knowm.xchange.Exchange) <variables>protected final non-sealed java.lang.String apiKey,protected final non-sealed ParamsDigest signatureCreator,protected final non-sealed org.knowm.xchange.vaultoro.VaultoroAuthenticated vaultoro