public interface BitoProClient
BitoProClientBuilder.
All methods throw ApiException when
server returns error. All parameter related errors will be thrown with
BadArgumentException.
Pair is in terms of base and quote and combined in the form of @{code ${base}_${quote}}.| Modifier and Type | Interface and Description |
|---|---|
static class |
BitoProClient.BitoProPairClient
A pair specific BitoProClient.
|
| Modifier and Type | Method and Description |
|---|---|
Optional<OrderResponse> |
cancelOrder(String pair,
String orderId)
Cancel an order.
|
OrderResponse |
createLimitOrder(String pair,
OrderAction action,
BigDecimal price,
BigDecimal amount)
Place a limit price order.
|
OrderResponse |
createMarketOrder(String pair,
OrderAction action,
BigDecimal totalAmount)
Place a market order.
|
List<Balance> |
getAccountBalances()
Get account's balances.
|
Optional<Order> |
getOrder(String pair,
String orderId)
Get order specified by pair and id.
|
List<Order> |
getOrderHistory()
Get the completed or cancelled orders.
|
PaginatedList<Order> |
getOrders(String pair,
boolean active,
int page)
Get orders for specified pair in paginated form.
|
default BitoProClient.BitoProPairClient |
getPairClient(String pair)
Create convenient methods for specified pair.
|
List<Balance> getAccountBalances() throws IOException
IOException - when connection error occured while called the Rest APIOrderResponse createMarketOrder(String pair, OrderAction action, BigDecimal totalAmount) throws IOException
pair - the pair to place orderaction - 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 APIOrderResponse createLimitOrder(String pair, OrderAction action, BigDecimal price, BigDecimal amount) throws IOException
pair - the pair to place orderaction - 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 APIOptional<OrderResponse> cancelOrder(String pair, String orderId) throws IOException
com.bitoex.bitopro.java.exception.BadArgumentException is thrown.pair - the pair to cancel orderorderId - id of the order to be cancelledOrderResponse with status of the order cancelled, if presentIOException - when connection error occured while called the Rest APIList<Order> getOrderHistory() throws IOException
IOException - when connection error occured while called the Rest APIOrderPaginatedList<Order> getOrders(String pair, boolean active, int page) throws IOException
pair - the pair to get ordersactive - whether to get active orders or not. Default: falsepage - page number for the order list. Start from 1.IOException - when connection error occured while called the Rest APIOrderOptional<Order> getOrder(String pair, String orderId) throws IOException
pair - the pair to get orderorderId - id of the orderIOException - when connection error occured while called the Rest APIdefault BitoProClient.BitoProPairClient getPairClient(String pair)
pair - the pair to be acted onBitoProPairClient for specified pair