<commit_before>package com.xeiam.xchange.mexbt;

import si.mazi.rescu.SynchronizedValueFactory;

import com.xeiam.xchange.BaseExchange;
import com.xeiam.xchange.Exchange;
import com.xeiam.xchange.ExchangeSpecification;
import com.xeiam.xchange.mexbt.service.polling.MeXBTAccountService;
import com.xeiam.xchange.mexbt.service.polling.MeXBTMarketDataService;
import com.xeiam.xchange.mexbt.service.polling.MeXBTTradeService;
import com.xeiam.xchange.mexbt.service.streaming.MeXBTExchangeStreamingConfiguration;
import com.xeiam.xchange.mexbt.service.streaming.MeXBTStreamingService;
import com.xeiam.xchange.service.streaming.ExchangeStreamingConfiguration;
import com.xeiam.xchange.service.streaming.StreamingExchangeService;
import com.xeiam.xchange.utils.nonce.CurrentTime1000NonceFactory;

public class MeXBTExchange extends BaseExchange implements Exchange {

  public static final String PRIVATE_API_URI_KEY = "private-api";
  public static final String WSS_TICKER_URI_KEY = "wss.ticker";
  public static final String WSS_TRADES_AND_ORDERS_URI_KEY = "wss.trades-and-orders";

  private final SynchronizedValueFactory<Long> nonceFactory = new CurrentTime1000NonceFactory();

  @Override
  public void applySpecification(ExchangeSpecification exchangeSpecification) {
    super.applySpecification(exchangeSpecification);
    this.pollingMarketDataService = new MeXBTMarketDataService(this);
    if (exchangeSpecification.getApiKey() != null && exchangeSpecification.getUserName() != null) {
      this.pollingAccountService = new MeXBTAccountService(this);
      this.pollingTradeService = new MeXBTTradeService(this);
    }
  }

  /**
   * {@inheritDoc}
   */
  @Override
  public SynchronizedValueFactory<Long> getNonceFactory() {
    return nonceFactory;
  }
<commit_msg>[MeXBT] Change nonce factory to epoch time in milliseconds, to align with MeXBT ruby client.<commit_after>package com.xeiam.xchange.mexbt;

import si.mazi.rescu.SynchronizedValueFactory;

import com.xeiam.xchange.BaseExchange;
import com.xeiam.xchange.Exchange;
import com.xeiam.xchange.ExchangeSpecification;
import com.xeiam.xchange.mexbt.service.polling.MeXBTAccountService;
import com.xeiam.xchange.mexbt.service.polling.MeXBTMarketDataService;
import com.xeiam.xchange.mexbt.service.polling.MeXBTTradeService;
import com.xeiam.xchange.mexbt.service.streaming.MeXBTExchangeStreamingConfiguration;
import com.xeiam.xchange.mexbt.service.streaming.MeXBTStreamingService;
import com.xeiam.xchange.service.streaming.ExchangeStreamingConfiguration;
import com.xeiam.xchange.service.streaming.StreamingExchangeService;
import com.xeiam.xchange.utils.nonce.CurrentTimeNonceFactory;

public class MeXBTExchange extends BaseExchange implements Exchange {

  public static final String PRIVATE_API_URI_KEY = "private-api";
  public static final String WSS_TICKER_URI_KEY = "wss.ticker";
  public static final String WSS_TRADES_AND_ORDERS_URI_KEY = "wss.trades-and-orders";

  private final SynchronizedValueFactory<Long> nonceFactory = new CurrentTimeNonceFactory();

  @Override
  public void applySpecification(ExchangeSpecification exchangeSpecification) {
    super.applySpecification(exchangeSpecification);
    this.pollingMarketDataService = new MeXBTMarketDataService(this);
    if (exchangeSpecification.getApiKey() != null && exchangeSpecification.getUserName() != null) {
      this.pollingAccountService = new MeXBTAccountService(this);
      this.pollingTradeService = new MeXBTTradeService(this);
    }
  }

  /**
   * {@inheritDoc}
   */
  @Override
  public SynchronizedValueFactory<Long> getNonceFactory() {
    return nonceFactory;
  }

{'fraction_non_alphanumeric': 0.08772413793103448, 'fraction_numerical': 0.002206896551724138, 'mean_word_length': 6.194444444444445, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2654767', 'n_tokens_mistral': 1173, 'n_tokens_neox': 1133, 'n_words': 182}