public class TaurusTradeService extends TaurusTradeServiceRaw implements PollingTradeService
exchange| Constructor and Description |
|---|
TaurusTradeService(Exchange exchange) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancelOrder(String orderId)
cancels order with matching orderId
|
TradeHistoryParams |
createTradeHistoryParams()
Create
TradeHistoryParams object specific to this exchange. |
OpenOrders |
getOpenOrders()
Gets the open orders
|
UserTrades |
getTradeHistory(Object... args)
gets trade history for user's account
|
UserTrades |
getTradeHistory(TradeHistoryParams params)
Fetch the history of user trades.
|
String |
placeLimitOrder(LimitOrder limitOrder)
Place a limit order
|
String |
placeMarketOrder(MarketOrder marketOrder)
Place a market order
|
buyTaurusOrder, cancelTaurusOrder, getTaurusOpenOrders, getTaurusUserTransactions, sellTaurusOrdergetExchangeSymbols, verifyOrder, verifyOrder, verifyOrderclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitverifyOrder, verifyOrdergetExchangeSymbolspublic TaurusTradeService(Exchange exchange)
public OpenOrders getOpenOrders() throws IOException, TaurusException
PollingTradeServicegetOpenOrders in interface PollingTradeServiceIOException - - Indication that a networking error occurred while fetching JSON dataTaurusExceptionpublic String placeMarketOrder(MarketOrder marketOrder) throws IOException, TaurusException
PollingTradeServiceplaceMarketOrder in interface PollingTradeServiceIOException - - Indication that a networking error occurred while fetching JSON dataTaurusExceptionpublic String placeLimitOrder(LimitOrder limitOrder) throws IOException, TaurusException
PollingTradeServiceplaceLimitOrder in interface PollingTradeServiceIOException - - Indication that a networking error occurred while fetching JSON dataTaurusExceptionpublic boolean cancelOrder(String orderId) throws IOException, TaurusException
PollingTradeServicecancelOrder in interface PollingTradeServiceIOException - - Indication that a networking error occurred while fetching JSON dataTaurusExceptionpublic UserTrades getTradeHistory(Object... args) throws IOException, TaurusException
PollingTradeServicegetTradeHistory in interface PollingTradeServiceIOException - - Indication that a networking error occurred while fetching JSON dataTaurusExceptionpublic UserTrades getTradeHistory(TradeHistoryParams params) throws IOException
PollingTradeServicePollingTradeService.createTradeHistoryParams() and check which parameters are required or supported using instanceof operator. See subinterfaces of
TradeHistoryParams. Note that whether an interface is required or supported will vary from exchange to exchange and it's described only
through the javadoc.
There is also implementation of all the common interfaces, TradeHistoryParamsAll , that,
with all properties set non-null, should work with any exchange.
Some exchanges allow extra parameters, not covered by any common interface. To access them, you will have to use the object returned by
PollingTradeService.createTradeHistoryParams() and cast it to the exchange-specific type.getTradeHistory in interface PollingTradeServiceparams - The parameters describing the filter. Note that TradeHistoryParams is an empty interface. Exact set of interfaces that are
required or supported by this method is described by the type of object returned from PollingTradeService.createTradeHistoryParams() and the javadoc
of the method.IOException - - Indication that a networking error occurred while fetching JSON dataPollingTradeService.getTradeHistory(Object...),
PollingTradeService.createTradeHistoryParams(),
TradeHistoryParamsAllpublic TradeHistoryParams createTradeHistoryParams()
PollingTradeServiceTradeHistoryParams object specific to this exchange. Object created by this method may be used to discover supported and required
PollingTradeService.getTradeHistory(TradeHistoryParams) parameters and should be passed only to the method in the same class as the createTradeHistoryParams
that created the object.createTradeHistoryParams in interface PollingTradeServiceCopyright © 2012–2017 Xeiam, LLC. All rights reserved.