public static class BitoProClient.BitoProPairClient extends Object
| Modifier and Type | Method and Description |
|---|---|
Optional<OrderResponse> |
cancelOrder(String orderId)
Cancel an order.
|
OrderResponse |
createLimitOrder(OrderAction action,
BigDecimal price,
BigDecimal amount)
Place a limit price order.
|
OrderResponse |
createMarketOrder(OrderAction action,
BigDecimal totalAmount)
Place a market order.
|
Optional<Order> |
getOrder(String orderId)
Get order specified by pair and id.
|
PaginatedList<Order> |
getOrders(boolean active,
int page)
Get orders for specified pair in paginated form.
|
public OrderResponse createMarketOrder(OrderAction action, BigDecimal totalAmount) throws IOException
action - OrderAction for the order, either BUY or SELLtotalAmount - total amount for the orderOrderResponse with result of the order placedIOException - when connection error occured while called the Rest APIBitoProClient.createMarketOrder(String, OrderAction, BigDecimal)public OrderResponse createLimitOrder(OrderAction action, BigDecimal price, BigDecimal amount) throws IOException
action - OrderAction for the order, either BUY or SELLprice - price in terms of quote for the orderamount - amount in terms of quote for the orderOrderResponse with result of the order placedIOException - when connection error occured while called the Rest APIBitoProClient.createLimitOrder(String, OrderAction, BigDecimal,
BigDecimal)public Optional<OrderResponse> cancelOrder(String orderId) throws IOException
com.bitoex.bitopro.java.exception.BadArgumentException is thrown.orderId - id of the order to be cancelledOrderResponse with status of the order cancelled, if presentIOException - when connection error occured while called the Rest APIBitoProClient.cancelOrder(String, String)public PaginatedList<Order> getOrders(boolean active, int page) throws IOException
active - whether to get active orders or not. Default: falsepage - page number for the order list. Default: 1IOException - when connection error occured while called the Rest APIOrder,
BitoProClient.getOrders(String, boolean, int)public Optional<Order> getOrder(String orderId) throws IOException
orderId - id of the orderIOException - when connection error occured while called the Rest APIOrder,
BitoProClient.getOrder(String, String)