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

com.xeiam.xchange.yacuna.service.polling.YacunaMarketDataService Maven / Gradle / Ivy

package com.xeiam.xchange.yacuna.service.polling;

import java.io.IOException;

import com.xeiam.xchange.Exchange;
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.exceptions.ExchangeException;
import com.xeiam.xchange.exceptions.NotAvailableFromExchangeException;
import com.xeiam.xchange.exceptions.NotYetImplementedForExchangeException;
import com.xeiam.xchange.service.polling.marketdata.PollingMarketDataService;
import com.xeiam.xchange.yacuna.YacunaAdapters;
import com.xeiam.xchange.yacuna.dto.marketdata.YacunaTicker;

/**
 * Created by Yingzhe on 12/27/2014.
 */
public class YacunaMarketDataService extends YacunaMarketDataServiceRaw implements PollingMarketDataService {

  public YacunaMarketDataService(Exchange exchange) {

    super(exchange);
  }

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

    // Request data
    YacunaTicker ticker = getYacunaTicker(currencyPair);

    // Adapt to XChange DTOs
    return YacunaAdapters.adaptTicker(ticker, currencyPair);
  }

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

    throw new NotYetImplementedForExchangeException();
  }

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

    throw new NotYetImplementedForExchangeException();
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy