class BittrexTradeServiceRaw extends BittrexBaseService {

  /**
   * Constructor
   *
   * @param exchange
   */
  public BittrexTradeServiceRaw(
      BittrexExchange exchange,
      BittrexAuthenticated bittrex,
      ResilienceRegistries resilienceRegistries) {
    super(exchange, bittrex, resilienceRegistries);
  }

  public String placeBittrexLimitOrder(LimitOrder limitOrder) throws IOException {
    return placeBittrexLimitOrder(limitOrder, TimeInForce.GOOD_TIL_CANCELLED);
  }

  public String placeBittrexLimitOrder(LimitOrder limitOrder, TimeInForce type) throws IOException {
    BittrexNewOrder bittrexNewOrder =
        new BittrexNewOrder(
            BittrexUtils.toPairString(limitOrder.getCurrencyPair()),
            OrderType.BID.equals(limitOrder.getType())
                ? BittrexConstants.BUY
                : BittrexConstants.SELL,
            BittrexConstants.LIMIT,
            limitOrder.getRemainingAmount().toPlainString(),
            null,
            limitOrder.getLimitPrice().toPlainString(),
            type.toString(),
            null,
            null);
    return bittrexAuthenticated
        .placeOrder(
            apiKey, System.currentTimeMillis(), contentCreator, signatureCreator, bittrexNewOrder)
        .getId();
  }

  public String placeBittrexMarketOrder(MarketOrder marketOrder) throws IOException {
    return placeBittrexMarketOrder(marketOrder, TimeInForce.IMMEDIATE_OR_CANCEL);
  }

  public String placeBittrexMarketOrder(MarketOrder marketOrder, TimeInForce type)
      throws IOException {<FILL_FUNCTION_BODY>}

  public BittrexOrder cancelBittrexLimitOrder(String orderId) throws IOException {
    return bittrexAuthenticated.cancelOrder(
        apiKey, System.currentTimeMillis(), contentCreator, signatureCreator, orderId);
  }

  public List<BittrexOrder> getBittrexOpenOrders(OpenOrdersParams params) throws IOException {
    return bittrexAuthenticated.getOpenOrders(
        apiKey, System.currentTimeMillis(), contentCreator, signatureCreator);
  }

  public SequencedOpenOrders getBittrexSequencedOpenOrders(OpenOrdersParams params)
      throws IOException {
    BittrexOrders openOrders =
        bittrexAuthenticated.getOpenOrders(
            apiKey, System.currentTimeMillis(), contentCreator, signatureCreator);
    return new SequencedOpenOrders(
        openOrders.getSequence(), BittrexAdapters.adaptOpenOrders(openOrders));
  }

  public List<BittrexOrder> getBittrexUserTradeHistory(
      CurrencyPair currencyPair, Date start, Date end) throws IOException {
    return decorateApiCall(
            () ->
                bittrexAuthenticated.getClosedOrders(
                    apiKey,
                    System.currentTimeMillis(),
                    contentCreator,
                    signatureCreator,
                    BittrexUtils.toPairString(currencyPair),
                    200,
                    start,
                    end))
        .withRetry(retry("getClosedOrders"))
        .withRateLimiter(rateLimiter(GET_CLOSED_ORDERS_RATE_LIMITER))
        .call();
  }

  public List<BittrexOrder> getBittrexUserTradeHistory(CurrencyPair currencyPair)
      throws IOException {
    return getBittrexUserTradeHistory(currencyPair, null, null);
  }

  public List<BittrexOrder> getBittrexUserTradeHistory() throws IOException {
    return getBittrexUserTradeHistory(null);
  }

  public BittrexOrder getBittrexOrder(String orderId) throws IOException {
    return bittrexAuthenticated.getOrder(
        apiKey, System.currentTimeMillis(), contentCreator, signatureCreator, orderId);
  }

  public BatchResponse[] executeOrdersBatch(BatchOrder[] batchOrders) throws IOException {
    return bittrexAuthenticated.executeOrdersBatch(
        apiKey, System.currentTimeMillis(), contentCreator, signatureCreator, batchOrders);
  }

  @AllArgsConstructor
  @Getter
  public static class SequencedOpenOrders {
    private final String sequence;
    private final List<LimitOrder> openOrders;
  }
}

    BittrexNewOrder bittrexNewOrder =
        new BittrexNewOrder(
            BittrexUtils.toPairString(marketOrder.getCurrencyPair()),
            OrderType.BID.equals(marketOrder.getType())
                ? BittrexConstants.BUY
                : BittrexConstants.SELL,
            BittrexConstants.MARKET,
            marketOrder.getRemainingAmount().toPlainString(),
            null,
            null,
            type.toString(),
            null,
            null);
    return bittrexAuthenticated
        .placeOrder(
            apiKey, System.currentTimeMillis(), contentCreator, signatureCreator, bittrexNewOrder)
        .getId();
  
<methods>public void <init>(org.knowm.xchange.bittrex.BittrexExchange, org.knowm.xchange.bittrex.BittrexAuthenticated, org.knowm.xchange.client.ResilienceRegistries) <variables>protected final non-sealed java.lang.String apiKey,protected final non-sealed org.knowm.xchange.bittrex.BittrexAuthenticated bittrexAuthenticated,protected final non-sealed ParamsDigest contentCreator,protected final non-sealed org.knowm.xchange.bittrex.service.BittrexDigest signatureCreator