Class CoinbaseProMarketDataService
java.lang.Object
org.knowm.xchange.service.BaseExchangeService<E>
org.knowm.xchange.service.BaseResilientExchangeService<CoinbaseProExchange>
org.knowm.xchange.coinbasepro.service.CoinbaseProBaseService
org.knowm.xchange.coinbasepro.service.CoinbaseProMarketDataServiceRaw
org.knowm.xchange.coinbasepro.service.CoinbaseProMarketDataService
- All Implemented Interfaces:
BaseService,MarketDataService
public class CoinbaseProMarketDataService
extends CoinbaseProMarketDataServiceRaw
implements MarketDataService
-
Field Summary
Fields inherited from class org.knowm.xchange.coinbasepro.service.CoinbaseProBaseService
apiKey, coinbasePro, digest, passphraseFields inherited from class org.knowm.xchange.service.BaseResilientExchangeService
resilienceRegistriesFields inherited from class org.knowm.xchange.service.BaseExchangeService
exchange -
Constructor Summary
ConstructorsConstructorDescriptionCoinbaseProMarketDataService(CoinbaseProExchange exchange, ResilienceRegistries resilienceRegistries) -
Method Summary
Modifier and TypeMethodDescriptiongetOrderBook(CurrencyPair currencyPair, Object... args) getTicker(CurrencyPair currencyPair, Object... args) getTickers(Params params) getTrades(CurrencyPair currencyPair, Object... args) Get trades data for a specific currency pairMethods inherited from class org.knowm.xchange.coinbasepro.service.CoinbaseProMarketDataServiceRaw
checkProductExists, getCoinbaseProCurrencies, getCoinbaseProHistoricalCandles, getCoinbaseProProductOrderBook, getCoinbaseProProducts, getCoinbaseProProductStats, getCoinbaseProProductTicker, getCoinbaseProStats, getCoinbaseProTrades, getCoinbaseProTradesExtendedMethods inherited from class org.knowm.xchange.coinbasepro.service.CoinbaseProBaseService
handleErrorMethods inherited from class org.knowm.xchange.service.BaseResilientExchangeService
decorateApiCall, rateLimiter, rateLimiter, retry, retryMethods inherited from class org.knowm.xchange.service.BaseExchangeService
verifyOrder, verifyOrder, verifyOrderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.knowm.xchange.service.marketdata.MarketDataService
getCandleStickData, getFundingRate, getFundingRates, getOrderBook, getOrderBook, getTicker, getTrades, getTrades
-
Constructor Details
-
CoinbaseProMarketDataService
public CoinbaseProMarketDataService(CoinbaseProExchange exchange, ResilienceRegistries resilienceRegistries)
-
-
Method Details
-
getTicker
public Ticker getTicker(CurrencyPair currencyPair, Object... args) throws IOException, RateLimitExceededException - Specified by:
getTickerin interfaceMarketDataService- Throws:
IOExceptionRateLimitExceededException
-
getTickers
- Specified by:
getTickersin interfaceMarketDataService- Throws:
IOExceptionRateLimitExceededException
-
getOrderBook
public OrderBook getOrderBook(CurrencyPair currencyPair, Object... args) throws IOException, RateLimitExceededException - Specified by:
getOrderBookin interfaceMarketDataService- Throws:
IOExceptionRateLimitExceededException
-
getTrades
public Trades getTrades(CurrencyPair currencyPair, Object... args) throws IOException, RateLimitExceededException Get trades data for a specific currency pairIf invoked with only the currency pair, the method will make a single api call, returning the default number (currently 100) of the most recent trades. If invoked with either optional argument the other must be specified as well.
- Specified by:
getTradesin interfaceMarketDataService- Parameters:
currencyPair- Currency pair to obtain trades for (required)args- [0] fromTradeId (Long) Return Trades with tradeIds greater than or equal to this value. Additional values may be returned. (optional)args- [1] toTradeId (Long) Return Trades with tradeIds up to but not including this value (optional)- Returns:
- A Trades object holding the requested trades
- Throws:
IOExceptionRateLimitExceededException
-