Class CoinbaseMarketDataService
java.lang.Object
org.knowm.xchange.service.BaseExchangeService
org.knowm.xchange.coinbase.v2.service.CoinbaseBaseService
org.knowm.xchange.coinbase.v2.service.CoinbaseMarketDataService
- All Implemented Interfaces:
BaseService,MarketDataService
-
Nested Class Summary
Nested classes/interfaces inherited from class org.knowm.xchange.coinbase.v2.service.CoinbaseBaseService
CoinbaseBaseService.HttpMethod -
Field Summary
Fields inherited from class org.knowm.xchange.coinbase.v2.service.CoinbaseBaseService
coinbase, signatureCreator2Fields inherited from class org.knowm.xchange.service.BaseExchangeService
exchange -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCoinbaseBuyPrice(Currency base, Currency counter) Unauthenticated resource that tells you the price to buy one unit.Unauthenticated resource that returns BTC to fiat (and vice versus) exchange rates in various currencies.getCoinbaseHistoricalSpotRate(Currency base, Currency counter, Date date) Unauthenticated resource that tells you the current price of one unit.getCoinbaseSellPrice(Currency base, Currency counter) Unauthenticated resource that tells you the amount you can get if you sell one unit.getCoinbaseSpotRate(Currency base, Currency counter) Unauthenticated resource that tells you the current price of one unit.getOrderBook(CurrencyPair currencyPair, Object... args) Get an order book representing the current offered exchange rates (market depth)getTicker(CurrencyPair pair, Object... args) Get a ticker representing the current exchange rategetTrades(CurrencyPair currencyPair, Object... args) Get the trades recently performed by the exchangeMethods inherited from class org.knowm.xchange.coinbase.v2.service.CoinbaseBaseService
getCoinbaseCurrencies, getCoinbaseTime, getSignature, showCurlMethods 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, getTickers, getTrades, getTrades
-
Constructor Details
-
CoinbaseMarketDataService
-
-
Method Details
-
getTicker
Description copied from interface:MarketDataServiceGet a ticker representing the current exchange rate- Specified by:
getTickerin interfaceMarketDataService- Returns:
- The Ticker, null if some sort of error occurred. Implementers should log the error.
- Throws:
IOException- - Indication that a networking error occurred while fetching JSON data
-
getOrderBook
Description copied from interface:MarketDataServiceGet an order book representing the current offered exchange rates (market depth)- Specified by:
getOrderBookin interfaceMarketDataService- Parameters:
args- Optional arguments. Exchange-specific- Returns:
- The OrderBook, null if some sort of error occurred. Implementers should log the error.
-
getTrades
Description copied from interface:MarketDataServiceGet the trades recently performed by the exchange- Specified by:
getTradesin interfaceMarketDataService- Parameters:
args- Optional arguments. Exchange-specific- Returns:
- The Trades, null if some sort of error occurred. Implementers should log the error.
-
getCoinbaseExchangeRates
Unauthenticated resource that returns BTC to fiat (and vice versus) exchange rates in various currencies.- Returns:
- Map of lower case directional currency pairs, i.e. btc_to_xxx and xxx_to_btc, to exchange rates.
- Throws:
IOException- See Also:
-
getCoinbaseBuyPrice
Unauthenticated resource that tells you the price to buy one unit.- Parameters:
pair- The currency pair.- Returns:
- The price in the desired
currencyto buy one unit. - Throws:
IOException- See Also:
-
getCoinbaseSellPrice
Unauthenticated resource that tells you the amount you can get if you sell one unit.- Parameters:
pair- The currency pair.- Returns:
- The price in the desired
currencyto sell one unit. - Throws:
IOException- See Also:
-
getCoinbaseSpotRate
Unauthenticated resource that tells you the current price of one unit. This is usually somewhere in between the buy and sell price, current to within a few minutes.- Parameters:
pair- The currency pair.- Returns:
- The price in the desired
currencyfor one unit. - Throws:
IOException- See Also:
-
getCoinbaseHistoricalSpotRate
public CoinbasePrice getCoinbaseHistoricalSpotRate(Currency base, Currency counter, Date date) throws IOException Unauthenticated resource that tells you the current price of one unit. This is usually somewhere in between the buy and sell price, current to within a few minutes.- Parameters:
date- The given date.pair- The currency pair.- Returns:
- The price in the desired
currencyont the givedatefor one unit. - Throws:
IOException- See Also:
-