docs: public static CryptonitGenericOrder adaptOrder(
        String orderId, CryptonitOrderStatusResponse cryptonitOrderStatusResponse) {
  
      CryptonitOrderTransaction[] cryptonitTransactions =
          cryptonitOrderStatusResponse.getTransactions();
      CurrencyPair currencyPair = null;
      Date date = null;
      BigDecimal averagePrice = null;
      BigDecimal cumulativeAmount = null;
      BigDecimal totalFee = null;
      // Use only the first transaction, because we assume that for a single order id all transactions
      // will
      // be of the same currency pair
      if (cryptonitTransactions.length > 0) {
        currencyPair = adaptCurrencyPair(cryptonitTransactions[0]);
        date = cryptonitTransactions[0].getDatetime();
  
        averagePrice =
            Arrays.stream(cryptonitTransactions)
                .map(t -> t.getPrice())
                .reduce((x, y) -> x.add(y))
                .get()
                .divide(BigDecimal.valueOf(cryptonitTransactions.length), 2);
  
        cumulativeAmount =
            Arrays.stream(cryptonitTransactions)
                .map(t -> getBaseCurrencyAmountFromCryptonitTransaction(t))
                .reduce((x, y) -> x.add(y))
                .get();
  
        totalFee =
            Arrays.stream(cryptonitTransactions)
                .map(t -> t.getFee())
                .reduce((x, y) -> x.add(y))
                .get();
      }
  
      OrderStatus orderStatus =
          adaptOrderStatus(cryptonitOrderStatusResponse.getStatus(), cryptonitTransactions.length);
  
      CryptonitGenericOrder cryptonitGenericOrder =
          new CryptonitGenericOrder(
              null, // not discernable from response data
              null, // not discernable from the data
              currencyPair,
              orderId,
              date,
              averagePrice,
              cumulativeAmount,
              totalFee,
              orderStatus);
  
      return cryptonitGenericOrder;
    }