Class LatokenTradeServiceRaw
java.lang.Object
org.knowm.xchange.service.BaseExchangeService<Exchange>
org.knowm.xchange.latoken.service.LatokenBaseService
org.knowm.xchange.latoken.service.LatokenTradeServiceRaw
- All Implemented Interfaces:
BaseService
- Direct Known Subclasses:
LatokenTradeService
public class LatokenTradeServiceRaw extends LatokenBaseService
-
Field Summary
Fields inherited from class org.knowm.xchange.latoken.service.LatokenBaseService
apiKey, latoken, LOG, signatureCreator
Fields inherited from class org.knowm.xchange.service.BaseExchangeService
exchange
-
Constructor Summary
Constructors Modifier Constructor Description protected
LatokenTradeServiceRaw(Exchange exchange)
-
Method Summary
Modifier and Type Method Description LatokenOrder
cancelLatokenOrder(String orderId)
Cancels an order given itsorderId
.LatokenCancelledOrders
cancelLatokenOrders(CurrencyPair pair)
Cancels all orders of a givenCurrencyPair
.List<LatokenOrder>
getLatokenOpenOrders(CurrencyPair pair, Integer limit)
Returns all currently open orders.LatokenOrder
getLatokenOrder(String orderId)
Returns an order given itsorderId
.List<LatokenOrder>
getLatokenOrders(CurrencyPair pair, LatokenOrderStatus status, Integer limit)
LatokenUserTrades
getLatokenUserTrades(CurrencyPair pair, Integer limit)
Returns all user-trades of a givenCurrencyPair
.LatokenNewOrder
placeLatokenNewOrder(CurrencyPair pair, String clientOrderId, LatokenOrderSide side, BigDecimal price, BigDecimal amount)
Places a newLimitOrder
.LatokenTestOrder
placeLatokenTestOrder(CurrencyPair pair, String clientOrderId, LatokenOrderSide side, BigDecimal price, BigDecimal amount)
Tests order placement.Methods inherited from class org.knowm.xchange.service.BaseExchangeService
verifyOrder, verifyOrder, verifyOrder
-
Constructor Details
-
LatokenTradeServiceRaw
-
-
Method Details
-
getLatokenOpenOrders
public List<LatokenOrder> getLatokenOpenOrders(CurrencyPair pair, Integer limit) throws LatokenException, IOExceptionReturns all currently open orders.- Parameters:
pair
-limit
- - optional (whennull
, default value of 50 is used)- Returns:
- Throws:
LatokenException
IOException
-
getLatokenOrder
Returns an order given itsorderId
.- Parameters:
orderId
-- Returns:
- Throws:
LatokenException
IOException
-
getLatokenOrders
public List<LatokenOrder> getLatokenOrders(CurrencyPair pair, LatokenOrderStatus status, Integer limit) throws LatokenException, IOExceptionReturns list of orders of a givenpair
andstatus
.
This includes both open-orders and order-history.- Parameters:
pair
-status
-limit
- - optional (whennull
, default value of 100 is used)- Returns:
- Throws:
LatokenException
IOException
-
placeLatokenNewOrder
public LatokenNewOrder placeLatokenNewOrder(CurrencyPair pair, String clientOrderId, LatokenOrderSide side, BigDecimal price, BigDecimal amount) throws IOException, LatokenExceptionPlaces a newLimitOrder
.- Parameters:
pair
-clientOrderId
-side
-price
-amount
-timeAliveMillis
- - Indicates how long the request is valid in milliseconds (example: 3000)- Returns:
- Throws:
IOException
LatokenException
-
placeLatokenTestOrder
public LatokenTestOrder placeLatokenTestOrder(CurrencyPair pair, String clientOrderId, LatokenOrderSide side, BigDecimal price, BigDecimal amount) throws IOException, LatokenExceptionTests order placement.- Parameters:
pair
-clientOrderId
-side
-price
-amount
-timeAliveMillis
-- Returns:
- Throws:
IOException
LatokenException
-
cancelLatokenOrder
Cancels an order given itsorderId
.- Parameters:
orderId
-- Returns:
- Throws:
IOException
LatokenException
-
cancelLatokenOrders
public LatokenCancelledOrders cancelLatokenOrders(CurrencyPair pair) throws LatokenException, IOExceptionCancels all orders of a givenCurrencyPair
.- Parameters:
pair
-- Returns:
- Throws:
LatokenException
IOException
-
getLatokenUserTrades
public LatokenUserTrades getLatokenUserTrades(CurrencyPair pair, Integer limit) throws LatokenException, IOExceptionReturns all user-trades of a givenCurrencyPair
.- Parameters:
pair
-limit
- - optional (whennull
, default value of 10 is used)- Returns:
- Throws:
LatokenException
IOException
-