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

com.xeiam.xchange.clevercoin.service.polling.CleverCoinMarketDataService Maven / Gradle / Ivy

The newest version!
package com.xeiam.xchange.clevercoin.service.polling;

import java.io.IOException;

import com.xeiam.xchange.Exchange;
import com.xeiam.xchange.clevercoin.CleverCoinAdapters;
import com.xeiam.xchange.currency.CurrencyPair;
import com.xeiam.xchange.dto.marketdata.OrderBook;
import com.xeiam.xchange.dto.marketdata.Ticker;
import com.xeiam.xchange.dto.marketdata.Trades;
import com.xeiam.xchange.service.polling.marketdata.PollingMarketDataService;

/**
 * @author Karsten Nilsen
 */
public class CleverCoinMarketDataService extends CleverCoinMarketDataServiceRaw implements PollingMarketDataService {

  /**
   * Constructor
   *
   * @param exchange
   */
  public CleverCoinMarketDataService(Exchange exchange) {

    super(exchange);

  }

  @Override
  public Ticker getTicker(CurrencyPair currencyPair, Object... args) throws IOException {

    return CleverCoinAdapters.adaptTicker(getCleverCoinTicker(), currencyPair);
  }

  @Override
  public OrderBook getOrderBook(CurrencyPair currencyPair, Object... args) throws IOException {

    return CleverCoinAdapters.adaptOrderBook(getCleverCoinOrderBook(), currencyPair, 1000);
  }

  @Override
  public Trades getTrades(CurrencyPair currencyPair, Object... args) throws IOException {

    return CleverCoinAdapters.adaptTrades(getCleverCoinTransactions(args), currencyPair);
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy