com.xeiam.xchange.bitstamp.service.polling.BitstampMarketDataService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xchange-bitstamp Show documentation
Show all versions of xchange-bitstamp Show documentation
XChange implementation for the Bitstamp Exchange
package com.xeiam.xchange.bitstamp.service.polling;
import java.io.IOException;
import com.xeiam.xchange.Exchange;
import com.xeiam.xchange.bitstamp.BitstampAdapters;
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 Matija Mazi
*/
public class BitstampMarketDataService extends BitstampMarketDataServiceRaw implements PollingMarketDataService {
/**
* Constructor
*
* @param exchange
*/
public BitstampMarketDataService(Exchange exchange) {
super(exchange);
}
@Override
public Ticker getTicker(CurrencyPair currencyPair, Object... args) throws IOException {
return BitstampAdapters.adaptTicker(getBitstampTicker(), currencyPair);
}
@Override
public OrderBook getOrderBook(CurrencyPair currencyPair, Object... args) throws IOException {
return BitstampAdapters.adaptOrderBook(getBitstampOrderBook(), currencyPair, 1000);
}
@Override
public Trades getTrades(CurrencyPair currencyPair, Object... args) throws IOException {
return BitstampAdapters.adaptTrades(getBitstampTransactions(args), currencyPair);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy