Class CoinbaseTradeService
- java.lang.Object
-
- org.knowm.xchange.service.BaseExchangeService
-
- org.knowm.xchange.coinbase.v2.service.CoinbaseBaseService
-
- org.knowm.xchange.coinbase.v2.service.CoinbaseTradeService
-
- All Implemented Interfaces:
BaseService,TradeService
public final class CoinbaseTradeService extends CoinbaseBaseService implements TradeService
-
-
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, signatureCreator2
-
Fields inherited from class org.knowm.xchange.service.BaseExchangeService
exchange
-
-
Constructor Summary
Constructors Constructor Description CoinbaseTradeService(Exchange exchange)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CoinbaseBuyData.CoinbaseBuybuy(String accountId, BigDecimal total, Currency currency, boolean commit)Authenticated resource that lets you purchase Bitcoin using the primary bank account that is linked to your account.booleancancelOrder(String orderId)booleancancelOrder(CancelOrderParams orderParams)OpenOrdersParamscreateOpenOrdersParams()TradeHistoryParamscreateTradeHistoryParams()OpenOrdersgetOpenOrders()********************************************************************************************************************************************************OpenOrdersgetOpenOrders(OpenOrdersParams params)StringplaceLimitOrder(LimitOrder limitOrder)StringplaceStopOrder(StopOrder stopOrder)CoinbaseSellData.CoinbaseSellquote(String accountId, BigDecimal total, Currency currency)Authenticated resource that lets you convert Bitcoin crediting your primary bank account on Coinbase.CoinbaseSellData.CoinbaseSellsell(String accountId, BigDecimal total, Currency currency, boolean commit)Authenticated resource that lets you convert Bitcoin crediting your primary bank account on Coinbase.-
Methods inherited from class org.knowm.xchange.coinbase.v2.service.CoinbaseBaseService
getCoinbaseCurrencies, getCoinbaseTime, getSignature, showCurl
-
Methods inherited from class org.knowm.xchange.service.BaseExchangeService
getClientConfig, verifyOrder, verifyOrder, verifyOrder
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.knowm.xchange.service.trade.TradeService
changeOrder, getOrder, getOrder, getTradeHistory, placeMarketOrder, verifyOrder, verifyOrder
-
-
-
-
Constructor Detail
-
CoinbaseTradeService
public CoinbaseTradeService(Exchange exchange)
-
-
Method Detail
-
getOpenOrders
public OpenOrders getOpenOrders() throws NotAvailableFromExchangeException, IOException
********************************************************************************************************************************************************- Specified by:
getOpenOrdersin interfaceTradeService- Throws:
NotAvailableFromExchangeExceptionIOException
-
getOpenOrders
public OpenOrders getOpenOrders(OpenOrdersParams params) throws ExchangeException, NotAvailableFromExchangeException, NotYetImplementedForExchangeException, IOException
- Specified by:
getOpenOrdersin interfaceTradeService- Throws:
ExchangeExceptionNotAvailableFromExchangeExceptionNotYetImplementedForExchangeExceptionIOException
-
placeLimitOrder
public String placeLimitOrder(LimitOrder limitOrder) throws NotAvailableFromExchangeException
- Specified by:
placeLimitOrderin interfaceTradeService- Throws:
NotAvailableFromExchangeException
-
placeStopOrder
public String placeStopOrder(StopOrder stopOrder) throws IOException
- Specified by:
placeStopOrderin interfaceTradeService- Throws:
IOException
-
cancelOrder
public boolean cancelOrder(String orderId) throws NotAvailableFromExchangeException
- Specified by:
cancelOrderin interfaceTradeService- Throws:
NotAvailableFromExchangeException
-
cancelOrder
public boolean cancelOrder(CancelOrderParams orderParams) throws ExchangeException, NotAvailableFromExchangeException, NotYetImplementedForExchangeException, IOException
- Specified by:
cancelOrderin interfaceTradeService- Throws:
ExchangeExceptionNotAvailableFromExchangeExceptionNotYetImplementedForExchangeExceptionIOException
-
createTradeHistoryParams
public TradeHistoryParams createTradeHistoryParams()
- Specified by:
createTradeHistoryParamsin interfaceTradeService
-
createOpenOrdersParams
public OpenOrdersParams createOpenOrdersParams()
- Specified by:
createOpenOrdersParamsin interfaceTradeService
-
buy
public CoinbaseBuyData.CoinbaseBuy buy(String accountId, BigDecimal total, Currency currency, boolean commit) throws IOException
Authenticated resource that lets you purchase Bitcoin using the primary bank account that is linked to your account. (You must link and verify your bank account through the website before this API call will work). The underlying optional parameter agree_btc_amount_varies is set to false.- Throws:
IOException- See Also:
- developers.coinbase.com/api/v2#place-buy-order
-
sell
public CoinbaseSellData.CoinbaseSell sell(String accountId, BigDecimal total, Currency currency, boolean commit) throws IOException
Authenticated resource that lets you convert Bitcoin crediting your primary bank account on Coinbase. (You must link and verify your bank account through the website before this API call will work).- Throws:
IOException- See Also:
- developers.coinbase.com/api/v2#place-sell-order
-
quote
public CoinbaseSellData.CoinbaseSell quote(String accountId, BigDecimal total, Currency currency) throws IOException
Authenticated resource that lets you convert Bitcoin crediting your primary bank account on Coinbase. (You must link and verify your bank account through the website before this API call will work).- Throws:
IOException- See Also:
- developers.coinbase.com/api/v2#place-sell-order
-
-