public class BTERPollingTradeService extends BTERPollingTradeServiceRaw implements PollingTradeService
apiKey, bter, signatureCreator
exchange
Constructor and Description |
---|
BTERPollingTradeService(Exchange exchange)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
cancelOrder(String orderId)
cancels order with matching orderId
|
TradeHistoryParamCurrencyPair |
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)
Required parameter:
TradeHistoryParamCurrencyPair |
String |
placeLimitOrder(LimitOrder limitOrder)
Submits a Limit Order to be executed on the BTER Exchange for the desired market defined by
CurrencyPair . |
String |
placeMarketOrder(MarketOrder marketOrder)
Place a market order
|
getBTEROpenOrders, getBTEROrderStatus, getBTERTradeHistory, placeBTERLimitOrder, placeBTERLimitOrder
getExchangeSymbols, handleResponse
verifyOrder, verifyOrder, verifyOrder
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
verifyOrder, verifyOrder
getExchangeSymbols
public BTERPollingTradeService(Exchange exchange)
exchange
- public OpenOrders getOpenOrders() throws IOException
PollingTradeService
getOpenOrders
in interface PollingTradeService
IOException
- - Indication that a networking error occurred while fetching JSON datapublic String placeMarketOrder(MarketOrder marketOrder) throws IOException
PollingTradeService
placeMarketOrder
in interface PollingTradeService
IOException
- - Indication that a networking error occurred while fetching JSON datapublic String placeLimitOrder(LimitOrder limitOrder) throws IOException
CurrencyPair
. WARNING - BTER will return true
regardless of whether or not an order actually gets created. The reason for this is that orders are simply submitted to a queue in their
back-end. One example for why an order might not get created is because there are insufficient funds. The best attempt you can make to confirm
that the order was created is to poll getOpenOrders()
. However, if the order is created and executed before it is caught in its open state
from calling getOpenOrders()
then the only way to confirm would be confirm the expected difference in funds available for your account.placeLimitOrder
in interface PollingTradeService
IOException
- - Indication that a networking error occurred while fetching JSON datapublic boolean cancelOrder(String orderId) throws IOException
PollingTradeService
cancelOrder
in interface PollingTradeService
cancelOrder
in class BTERPollingTradeServiceRaw
IOException
- - Indication that a networking error occurred while fetching JSON datapublic UserTrades getTradeHistory(Object... args) throws IOException
PollingTradeService
getTradeHistory
in interface PollingTradeService
IOException
- - Indication that a networking error occurred while fetching JSON datapublic UserTrades getTradeHistory(TradeHistoryParams params) throws ExchangeException, IOException
TradeHistoryParamCurrencyPair
getTradeHistory
in interface PollingTradeService
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 PollingTradeService.createTradeHistoryParams()
and the javadoc
of the method.ExchangeException
- - Indication that the exchange reported some kind of error with the request or responseIOException
- - Indication that a networking error occurred while fetching JSON dataPollingTradeService.getTradeHistory(Object...)
,
PollingTradeService.createTradeHistoryParams()
,
TradeHistoryParamsAll
public TradeHistoryParamCurrencyPair createTradeHistoryParams()
PollingTradeService
TradeHistoryParams
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 PollingTradeService
Copyright © 2012–2016 Xeiam, LLC. All rights reserved.