public class CoinbaseMarketDataService extends CoinbaseBasePollingService implements PollingMarketDataService
coinbase, signatureCreatorexchange| Constructor and Description |
|---|
CoinbaseMarketDataService(Exchange exchange)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
CoinbasePrice |
getCoinbaseBuyPrice()
Unauthenticated resource that tells you the total price in USD to buy 1 Bitcoin.
|
CoinbasePrice |
getCoinbaseBuyPrice(BigDecimal quantity)
Unauthenticated resource that tells you the total price in USD to buy some quantity of Bitcoin.
|
CoinbasePrice |
getCoinbaseBuyPrice(BigDecimal quantity,
String currency)
Unauthenticated resource that tells you the total price to buy some quantity of Bitcoin.
|
Map<String,BigDecimal> |
getCoinbaseCurrencyExchangeRates()
Unauthenticated resource that returns BTC to fiat (and vice versus) exchange rates in various currencies.
|
CoinbaseSpotPriceHistory |
getCoinbaseHistoricalSpotRates()
Unauthenticated resource that displays historical spot rates for Bitcoin in USD.
|
CoinbaseSpotPriceHistory |
getCoinbaseHistoricalSpotRates(Integer page)
Unauthenticated resource that displays historical spot rates for Bitcoin in USD.
|
CoinbasePrice |
getCoinbaseSellPrice()
Unauthenticated resource that tells you the total amount in USD you can get if you sell 1 Bitcoin.
|
CoinbasePrice |
getCoinbaseSellPrice(BigDecimal quantity)
Unauthenticated resource that tells you the total amount in USD you can get if you sell some quantity Bitcoin.
|
CoinbasePrice |
getCoinbaseSellPrice(BigDecimal quantity,
String currency)
Unauthenticated resource that tells you the total amount you can get if you sell some quantity Bitcoin.
|
CoinbaseMoney |
getCoinbaseSpotRate(String currency)
Unauthenticated resource that tells you the current price of Bitcoin.
|
OrderBook |
getOrderBook(CurrencyPair currencyPair,
Object... args)
Get an order book representing the current offered exchange rates (market depth)
|
Ticker |
getTicker(CurrencyPair currencyPair,
Object... args)
Get a ticker representing the current exchange rate
|
Trades |
getTrades(CurrencyPair currencyPair,
Object... args)
Get the trades recently performed by the exchange
|
createCoinbaseToken, createCoinbaseUser, createCoinbaseUser, getCoinbaseCurrencies, handleResponsegetExchangeSymbols, verifyOrder, verifyOrder, verifyOrderclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetExchangeSymbolspublic CoinbaseMarketDataService(Exchange exchange)
exchange - public Ticker getTicker(CurrencyPair currencyPair, Object... args) throws IOException
PollingMarketDataServiceGet a ticker representing the current exchange rate
getTicker in interface PollingMarketDataServiceargs - Optional Boolean. If true an additional call to retrieve the spot price history will be made and used to populate the 24 hour high
and low values for the Ticker.IOException - - Indication that a networking error occurred while fetching JSON datapublic OrderBook getOrderBook(CurrencyPair currencyPair, Object... args)
PollingMarketDataServiceGet an order book representing the current offered exchange rates (market depth)
getOrderBook in interface PollingMarketDataServiceargs - Optional arguments. Exchange-specificpublic Trades getTrades(CurrencyPair currencyPair, Object... args)
PollingMarketDataServiceGet the trades recently performed by the exchange
getTrades in interface PollingMarketDataServiceargs - Optional arguments. Exchange-specificpublic Map<String,BigDecimal> getCoinbaseCurrencyExchangeRates() throws IOException
IOExceptionpublic CoinbasePrice getCoinbaseBuyPrice() throws IOException
IOExceptionpublic CoinbasePrice getCoinbaseBuyPrice(BigDecimal quantity) throws IOException
quantity - The quantity of Bitcoin you would like to buy (default is 1 if null).quantity BTC.IOExceptionpublic CoinbasePrice getCoinbaseBuyPrice(BigDecimal quantity, String currency) throws IOException
quantity - The quantity of Bitcoin you would like to buy (default is 1 if null).currency - Default is USD. Right now this is the only value allowed.currency to buy the given quantity BTC.IOExceptionpublic CoinbasePrice getCoinbaseSellPrice() throws IOException
IOExceptionpublic CoinbasePrice getCoinbaseSellPrice(BigDecimal quantity) throws IOException
quantity - The quantity of Bitcoin you would like to sell (default is 1 if null).quantity BTC.IOExceptionpublic CoinbasePrice getCoinbaseSellPrice(BigDecimal quantity, String currency) throws IOException
quantity - The quantity of Bitcoin you would like to sell (default is 1 if null).currency - Default is USD. Right now this is the only value allowed.currency to sell the given quantity BTC.IOExceptionpublic CoinbaseMoney getCoinbaseSpotRate(String currency) throws IOException
currency - ISO 4217 currency code. Default is USD if null.IOExceptionpublic CoinbaseSpotPriceHistory getCoinbaseHistoricalSpotRates() throws IOException
IOExceptionpublic CoinbaseSpotPriceHistory getCoinbaseHistoricalSpotRates(Integer page) throws IOException
page - Optional parameter to request a desired page of results. Will return page 1 if the supplied page is null or less than 1.IOExceptionCopyright © 2012–2017 Xeiam, LLC. All rights reserved.