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

org.knowm.xchange.oer.OERExchange Maven / Gradle / Ivy

package org.knowm.xchange.oer;

import org.knowm.xchange.BaseExchange;
import org.knowm.xchange.Exchange;
import org.knowm.xchange.ExchangeSpecification;
import org.knowm.xchange.oer.service.OERMarketDataService;
import si.mazi.rescu.SynchronizedValueFactory;

public class OERExchange extends BaseExchange implements Exchange {

  @Override
  protected void initServices() {
    this.marketDataService = new OERMarketDataService(this);
  }

  @Override
  public ExchangeSpecification getDefaultExchangeSpecification() {

    ExchangeSpecification exchangeSpecification = new ExchangeSpecification(this.getClass());
    exchangeSpecification.setPlainTextUri("http://openexchangerates.org");
    exchangeSpecification.setHost("openexchangerates.org");
    exchangeSpecification.setPort(80);
    exchangeSpecification.setExchangeName("Open Exchange Rates");
    exchangeSpecification.setExchangeDescription(
        "Open Exchange Rates is an exchange rate provider for a wide range of currencies.");

    return exchangeSpecification;
  }

  @Override
  public SynchronizedValueFactory getNonceFactory() {
    // No private API implemented. Not needed for this exchange at the moment.
    return null;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy