public interface PollingTradeService extends BasePollingService
Interface to provide the following to Exchange
:
The implementation of this service is expected to be based on a client polling mechanism of some kind
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... arguments)
Deprecated.
in favour of
getTradeHistory(TradeHistoryParams) |
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
|
void |
verifyOrder(LimitOrder limitOrder)
Verify the order against the exchange meta data.
|
void |
verifyOrder(MarketOrder marketOrder)
Verify the order against the exchange meta data.
|
getExchangeSymbols
OpenOrders getOpenOrders() throws ExchangeException, NotAvailableFromExchangeException, NotYetImplementedForExchangeException, IOException
ExchangeException
- - Indication that the exchange reported some kind of error with the request or responseNotAvailableFromExchangeException
- - Indication that the exchange does not support the requested function or dataNotYetImplementedForExchangeException
- - Indication that the exchange supports the requested function or data, but it has not yet been
implementedIOException
- - Indication that a networking error occurred while fetching JSON dataString placeMarketOrder(MarketOrder marketOrder) throws ExchangeException, NotAvailableFromExchangeException, NotYetImplementedForExchangeException, IOException
marketOrder
- ExchangeException
- - Indication that the exchange reported some kind of error with the request or responseNotAvailableFromExchangeException
- - Indication that the exchange does not support the requested function or dataNotYetImplementedForExchangeException
- - Indication that the exchange supports the requested function or data, but it has not yet been
implementedIOException
- - Indication that a networking error occurred while fetching JSON dataString placeLimitOrder(LimitOrder limitOrder) throws ExchangeException, NotAvailableFromExchangeException, NotYetImplementedForExchangeException, IOException
limitOrder
- ExchangeException
- - Indication that the exchange reported some kind of error with the request or responseNotAvailableFromExchangeException
- - Indication that the exchange does not support the requested function or dataNotYetImplementedForExchangeException
- - Indication that the exchange supports the requested function or data, but it has not yet been
implementedIOException
- - Indication that a networking error occurred while fetching JSON databoolean cancelOrder(String orderId) throws ExchangeException, NotAvailableFromExchangeException, NotYetImplementedForExchangeException, IOException
orderId
- ExchangeException
- - Indication that the exchange reported some kind of error with the request or responseNotAvailableFromExchangeException
- - Indication that the exchange does not support the requested function or dataNotYetImplementedForExchangeException
- - Indication that the exchange supports the requested function or data, but it has not yet been
implementedIOException
- - Indication that a networking error occurred while fetching JSON data@Deprecated UserTrades getTradeHistory(Object... arguments) throws ExchangeException, NotAvailableFromExchangeException, NotYetImplementedForExchangeException, IOException
getTradeHistory(TradeHistoryParams)
arguments
- ExchangeException
- - Indication that the exchange reported some kind of error with the request or responseNotAvailableFromExchangeException
- - Indication that the exchange does not support the requested function or dataNotYetImplementedForExchangeException
- - Indication that the exchange supports the requested function or data, but it has not yet been
implementedIOException
- - Indication that a networking error occurred while fetching JSON dataUserTrades getTradeHistory(TradeHistoryParams params) throws IOException
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
createTradeHistoryParams()
and cast it to the exchange-specific type.params
- 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 createTradeHistoryParams()
and the javadoc
of the method.ExchangeException
- - Indication that the exchange reported some kind of error with the request or responseNotAvailableFromExchangeException
- - Indication that the exchange does not support the requested function or dataNotYetImplementedForExchangeException
- - Indication that the exchange supports the requested function or data, but it has not yet been
implementedIOException
- - Indication that a networking error occurred while fetching JSON datagetTradeHistory(Object...)
,
createTradeHistoryParams()
,
TradeHistoryParamsAll
TradeHistoryParams createTradeHistoryParams()
TradeHistoryParams
object specific to this exchange. Object created by this method may be used to discover supported and required
getTradeHistory(TradeHistoryParams)
parameters and should be passed only to the method in the same class as the createTradeHistoryParams
that created the object.void verifyOrder(LimitOrder limitOrder)
Exchange.remoteInit()
be called
before this methodvoid verifyOrder(MarketOrder marketOrder)
Exchange.remoteInit()
be called
before this methodCopyright © 2012–2017 Xeiam, LLC. All rights reserved.