All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.knowm.xchange.taurus.TaurusExchange Maven / Gradle / Ivy

The newest version!
package org.knowm.xchange.taurus;

import org.knowm.xchange.BaseExchange;
import org.knowm.xchange.Exchange;
import org.knowm.xchange.ExchangeSpecification;
import org.knowm.xchange.taurus.service.TaurusAccountService;
import org.knowm.xchange.taurus.service.TaurusMarketDataService;
import org.knowm.xchange.taurus.service.TaurusTradeService;
import org.knowm.xchange.utils.nonce.CurrentTimeNonceFactory;
import si.mazi.rescu.SynchronizedValueFactory;

/** @author Matija Mazi */
public class TaurusExchange extends BaseExchange implements Exchange {

  private SynchronizedValueFactory nonceFactory = new CurrentTimeNonceFactory();

  @Override
  protected void initServices() {
    this.marketDataService = new TaurusMarketDataService(this);
    this.tradeService = new TaurusTradeService(this);
    this.accountService = new TaurusAccountService(this);
  }

  @Override
  public ExchangeSpecification getDefaultExchangeSpecification() {
    ExchangeSpecification exchangeSpecification =
        new ExchangeSpecification(this.getClass().getCanonicalName());
    exchangeSpecification.setSslUri("https://api.taurusexchange.com");
    exchangeSpecification.setHost("www.taurusexchange.com");
    exchangeSpecification.setPort(80);
    exchangeSpecification.setExchangeName("Taurus");
    exchangeSpecification.setExchangeDescription("Taurus Exchange");
    return exchangeSpecification;
  }

  @Override
  public SynchronizedValueFactory getNonceFactory() {
    return nonceFactory;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy