public class CoinbaseMarketDataService extends CoinbaseBasePollingService implements PollingMarketDataService
coinbase, signatureCreator
exchange
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, handleResponse
getExchangeSymbols, verifyOrder, verifyOrder, verifyOrder
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getExchangeSymbols
public CoinbaseMarketDataService(Exchange exchange)
exchange
- public Ticker getTicker(CurrencyPair currencyPair, Object... args) throws IOException
PollingMarketDataService
Get a ticker representing the current exchange rate
getTicker
in interface PollingMarketDataService
args
- 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)
PollingMarketDataService
Get an order book representing the current offered exchange rates (market depth)
getOrderBook
in interface PollingMarketDataService
args
- Optional arguments. Exchange-specificpublic Trades getTrades(CurrencyPair currencyPair, Object... args)
PollingMarketDataService
Get the trades recently performed by the exchange
getTrades
in interface PollingMarketDataService
args
- Optional arguments. Exchange-specificpublic Map<String,BigDecimal> getCoinbaseCurrencyExchangeRates() throws IOException
IOException
public CoinbasePrice getCoinbaseBuyPrice() throws IOException
IOException
public CoinbasePrice getCoinbaseBuyPrice(BigDecimal quantity) throws IOException
quantity
- The quantity of Bitcoin you would like to buy (default is 1 if null).quantity
BTC.IOException
public 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.IOException
public CoinbasePrice getCoinbaseSellPrice() throws IOException
IOException
public CoinbasePrice getCoinbaseSellPrice(BigDecimal quantity) throws IOException
quantity
- The quantity of Bitcoin you would like to sell (default is 1 if null).quantity
BTC.IOException
public 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.IOException
public CoinbaseMoney getCoinbaseSpotRate(String currency) throws IOException
currency
- ISO 4217 currency code. Default is USD if null.IOException
public CoinbaseSpotPriceHistory getCoinbaseHistoricalSpotRates() throws IOException
IOException
public 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.IOException
Copyright © 2012–2017 Xeiam, LLC. All rights reserved.