public class OrderAPIAdapter extends AuthRetrofitAPIImpl<OrderAPIRetrofit> implements OrderAPI
apiKey, apiKeyVersion, baseUrl, passPhrase, secret| 构造器和说明 |
|---|
OrderAPIAdapter(String baseUrl,
String apiKey,
String secret,
String passPhrase,
Integer apiKeyVersion) |
| 限定符和类型 | 方法和说明 |
|---|---|
HFOrderAlterResponse |
alterHFOrder(HFOrderAlterRequest alterRequest)
This interface can modify the price and quantity of the order according to orderId or clientOid.
|
OrderCancelResponse |
cancelAllOrders(String symbol,
String tradeType)
With best effort, cancel all open orders.
|
HFOrderCancelResponse |
cancelHFOrder(String orderId,
String symbol)
This endpoint can be used to cancel a high-frequency order by orderId.
|
HFOrderCancelByClientOidResponse |
cancelHFOrderByClientOid(String clientOid,
String symbol)
This endpoint sends out a request to cancel a high-frequency order using clientOid.
|
String |
cancelHFOrdersBySymbol(String symbol)
This endpoint allows cancellation of all orders related to a specific trading pair with a status of open (including all orders pertaining to high-frequency trading accounts and non-high-frequency trading accounts).
|
HFOrderCancelSizeResponse |
cancelHFOrderSize(String orderId,
String symbol,
String cancelSize)
This interface can cancel the specified quantity of the order according to the orderId.
|
OrderCancelResponse |
cancelOrder(String orderId)
Cancel an order
Cancel a previously placed order.
|
OrderCancelResponse |
cancelOrderByClientOid(String clientOid)
Cancel Single Order by clientOid
Request via this interface to cancel an order via the clientOid.
|
HFOrderCreateResponse |
createHFOrder(HFOrderCreateRequest createRequest)
Place hf order
https://docs.kucoin.com/spot-hf/#place-hf-order
|
List<HFOrderMultiCreateResponse> |
createMultipleHFOrders(HFOrderMultiCreateRequest multiCreateRequest)
This endpoint supports sequential batch order placement from a single endpoint.
|
MultiOrderCreateResponse |
createMultipleOrders(MultiOrderCreateRequest multiOrderCreateRequest)
Place Bulk Orders
Request via this endpoint to place 5 orders at the same time.
|
OrderCreateResponse |
createOrder(OrderCreateApiRequest opsRequest)
Place a new order
You can place two types of orders: limit and market.
|
OrderCreateResponse |
createOrderTest(OrderCreateApiRequest opsRequest)
Place a new test order
|
HFOrderDeadCancelResponse |
deadCancelHFOrder(int timeout,
String symbols)
HF auto cancel setting
https://docs.kucoin.com/spot-hf/#hf-auto-cancel-setting
|
List<HFOrderResponse> |
getActiveHFOrders(String symbol)
This endpoint obtains a list of all active HF orders.
|
HFOrderActiveSymbolQueryResponse |
getActiveHFOrderSymbols()
This interface can query all trading pairs that the user has active orders
https://docs.kucoin.com/spot-hf/#obtain-list-of-symbol-with-active-hf-orders
|
HFDoneOrderQueryResponse |
getDoneHFOrders(String symbol,
String side,
String type,
Long startAt,
Long endAt,
Long lastId,
Integer limit)
This endpoint obtains a list of filled HF orders and returns paginated data.
|
HFOrderResponse |
getHFOrder(String orderId,
String symbol)
This endpoint can be used to obtain information for a single HF order using the order id.
|
HFOrderResponse |
getHFOrderByClientOid(String clientOid,
String symbol)
The endpoint can be used to obtain information about a single order using clientOid.
|
OrderResponse |
getOrder(String orderId)
Get a single order by order id.
|
ActiveOrderResponse |
getOrderByClientOid(String clientOid)
Request via this interface to check the information of a single active order via clientOid.
|
UserFeeResponse |
getUserBaseFee(String currencyType)
This interface is for the basic fee rate of users
|
List<UserFeeResponse> |
getUserTradeFees(String symbols)
Actual fee rate of the trading pair
This interface is for the actual fee rate of the trading pair.
|
Pagination<OrderResponse> |
listOrders(String symbol,
String side,
String type,
String tradeType,
String status,
Long start,
Long end,
int pageSize,
int currentPage)
List your current orders.
|
HFOrderDeadCancelQueryResponse |
queryHFOrderDeadCancel()
Through this interface, you can query the settings of automatic order cancellation
https://docs.kucoin.com/spot-hf/#hf-auto-cancel-order-setting-query
|
List<OrderResponse> |
queryLimitOrderList()
Request via this endpoint to get 1000 orders in the last 24 hours.
|
Pagination<OrderResponse> |
queryLimitOrderPageList(int pageSize,
int currentPage)
Request via this endpoint to get 1000 orders in the last 24 hours.
|
ServerStatusResponse |
queryServerStatus() |
HFOrderSyncCancelResponse |
syncCancelHFOrder(String orderId,
String symbol)
Sync cancel high-frequency orders by orderId
https://docs.kucoin.com/spot-hf/#sync-cancel-orders-by-orderid
|
HFOrderSyncCancelResponse |
syncCancelHFOrderByClientOid(String clientOid,
String symbol)
Sync cancel high-frequency orders by clientOid
https://docs.kucoin.com/spot-hf/#sync-cancel-orders-by-clientoid
|
HFOrderSyncCreateResponse |
syncCreateHFOrder(HFOrderCreateRequest createRequest)
Sync place hf order
https://docs.kucoin.com/spot-hf/#sync-place-hf-order
|
List<HFOrderSyncMultiCreateResponse> |
syncCreateMultipleHFOrders(HFOrderMultiCreateRequest multiCreateRequest)
Sync place multiple hf orders
https://docs.kucoin.com/spot-hf/#sync-place-multiple-hf-orders
|
getAPIImplexecuteSync, getApiKey, getBaseUrl, getErrorResponse, getPassPhrase, getSecret, setApiKey, setBaseUrl, setPassPhrase, setSecretpublic OrderCreateResponse createOrder(OrderCreateApiRequest opsRequest) throws IOException
OrderAPIYou can place two types of orders: limit and market. Orders can only be placed if your account has sufficient funds. Once an order is placed, your account funds will be put on hold for the duration of the order. How much and which funds are put on hold depends on the order type and parameters specified.
The maximum matching orders for a single trading pair in one account is 50 (stop limit order included).
createOrder 在接口中 OrderAPIIOExceptionpublic OrderCreateResponse createOrderTest(OrderCreateApiRequest opsRequest) throws IOException
OrderAPIcreateOrderTest 在接口中 OrderAPIIOExceptionpublic MultiOrderCreateResponse createMultipleOrders(MultiOrderCreateRequest multiOrderCreateRequest) throws IOException
OrderAPIRequest via this endpoint to place 5 orders at the same time. The order type must be a limit order of the same symbol. The interface currently only supports spot trading
createMultipleOrders 在接口中 OrderAPIIOExceptionpublic OrderCancelResponse cancelOrder(String orderId) throws IOException
OrderAPICancel a previously placed order.
cancelOrder 在接口中 OrderAPIIOExceptionpublic OrderCancelResponse cancelOrderByClientOid(String clientOid) throws IOException
OrderAPIRequest via this interface to cancel an order via the clientOid.
cancelOrderByClientOid 在接口中 OrderAPIIOExceptionpublic OrderCancelResponse cancelAllOrders(String symbol, String tradeType) throws IOException
OrderAPIcancelAllOrders 在接口中 OrderAPItradeType - TRADE, MARGIN_TRADEIOExceptionpublic OrderResponse getOrder(String orderId) throws IOException
OrderAPIgetOrder 在接口中 OrderAPIIOExceptionpublic ActiveOrderResponse getOrderByClientOid(String clientOid) throws IOException
OrderAPIRequest via this interface to check the information of a single active order via clientOid. The system will prompt that the order does not exists if the order does not exist or has been settled.
getOrderByClientOid 在接口中 OrderAPIclientOid - Unique order id created by users to identify their ordersIOExceptionpublic Pagination<OrderResponse> listOrders(String symbol, String side, String type, String tradeType, String status, Long start, Long end, int pageSize, int currentPage) throws IOException
OrderAPIlistOrders 在接口中 OrderAPIsymbol - [optional] Only list orders for a specific symbol.side - [optional] buy or selltype - [optional] limit, market, limit_stop or market_stoptradeType - TRADE, MARGIN_TRADEstatus - [optional] active or done, done as default, Only list orders for a specific status .start - [optional] Start time. unix timestamp calculated in milliseconds, the creation time queried shall posterior to the start time.end - [optional] End time. unix timestamp calculated in milliseconds, the creation time queried shall prior to the end time.IOExceptionpublic List<UserFeeResponse> getUserTradeFees(String symbols) throws IOException
OrderAPIThis interface is for the actual fee rate of the trading pair. You can inquire about fee rates of 10 trading pairs each time at most. The fee rate of your sub-account is the same as that of the master account.
getUserTradeFees 在接口中 OrderAPIIOExceptionpublic UserFeeResponse getUserBaseFee(String currencyType) throws IOException
OrderAPIgetUserBaseFee 在接口中 OrderAPIcurrencyType - [Optional] Currency type: 0-crypto currency, 1-fiat currency. default is 0-crypto currencyIOExceptionpublic Pagination<OrderResponse> queryLimitOrderPageList(int pageSize, int currentPage) throws IOException
OrderAPIqueryLimitOrderPageList 在接口中 OrderAPIIOExceptionpublic List<OrderResponse> queryLimitOrderList() throws IOException
OrderAPIqueryLimitOrderList 在接口中 OrderAPIIOExceptionpublic HFOrderCreateResponse createHFOrder(HFOrderCreateRequest createRequest) throws IOException
OrderAPIcreateHFOrder 在接口中 OrderAPIIOExceptionpublic HFOrderSyncCreateResponse syncCreateHFOrder(HFOrderCreateRequest createRequest) throws IOException
OrderAPIsyncCreateHFOrder 在接口中 OrderAPIIOExceptionpublic List<HFOrderMultiCreateResponse> createMultipleHFOrders(HFOrderMultiCreateRequest multiCreateRequest) throws IOException
OrderAPIcreateMultipleHFOrders 在接口中 OrderAPIIOExceptionpublic List<HFOrderSyncMultiCreateResponse> syncCreateMultipleHFOrders(HFOrderMultiCreateRequest multiCreateRequest) throws IOException
OrderAPIsyncCreateMultipleHFOrders 在接口中 OrderAPIIOExceptionpublic HFOrderAlterResponse alterHFOrder(HFOrderAlterRequest alterRequest) throws IOException
OrderAPIalterHFOrder 在接口中 OrderAPIIOExceptionpublic HFOrderCancelResponse cancelHFOrder(String orderId, String symbol) throws IOException
OrderAPIcancelHFOrder 在接口中 OrderAPIIOExceptionpublic HFOrderSyncCancelResponse syncCancelHFOrder(String orderId, String symbol) throws IOException
OrderAPIsyncCancelHFOrder 在接口中 OrderAPIIOExceptionpublic HFOrderCancelByClientOidResponse cancelHFOrderByClientOid(String clientOid, String symbol) throws IOException
OrderAPIcancelHFOrderByClientOid 在接口中 OrderAPIIOExceptionpublic HFOrderSyncCancelResponse syncCancelHFOrderByClientOid(String clientOid, String symbol) throws IOException
OrderAPIsyncCancelHFOrderByClientOid 在接口中 OrderAPIIOExceptionpublic HFOrderCancelSizeResponse cancelHFOrderSize(String orderId, String symbol, String cancelSize) throws IOException
OrderAPIcancelHFOrderSize 在接口中 OrderAPIIOExceptionpublic String cancelHFOrdersBySymbol(String symbol) throws IOException
OrderAPIcancelHFOrdersBySymbol 在接口中 OrderAPIIOExceptionpublic List<HFOrderResponse> getActiveHFOrders(String symbol) throws IOException
OrderAPIgetActiveHFOrders 在接口中 OrderAPIIOExceptionpublic HFOrderActiveSymbolQueryResponse getActiveHFOrderSymbols() throws IOException
OrderAPIgetActiveHFOrderSymbols 在接口中 OrderAPIIOExceptionpublic HFDoneOrderQueryResponse getDoneHFOrders(String symbol, String side, String type, Long startAt, Long endAt, Long lastId, Integer limit) throws IOException
OrderAPIgetDoneHFOrders 在接口中 OrderAPIsymbol - Only returns order information for the specified trading pairside - [optional] buy (Buy) orsell (Sell)type - [optional] Order type: limit (limit order), market(market order)startAt - [optional] Start time (ms),last update(filled) time of the limit orderendAt - [optional] End time (ms),last update(filled) time of limit orderlastId - [optional] The id of the last data item from the previous batch,defaults to obtaining the latest datalimit - [optional] Default20,maximum100IOExceptionpublic HFOrderResponse getHFOrder(String orderId, String symbol) throws IOException
OrderAPIgetHFOrder 在接口中 OrderAPIIOExceptionpublic HFOrderResponse getHFOrderByClientOid(String clientOid, String symbol) throws IOException
OrderAPIgetHFOrderByClientOid 在接口中 OrderAPIIOExceptionpublic HFOrderDeadCancelResponse deadCancelHFOrder(int timeout, String symbols) throws IOException
OrderAPIdeadCancelHFOrder 在接口中 OrderAPItimeout - Auto cancel order trigger setting time,
the unit is second. range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400.
For example, timeout=5 means that the order will be automatically canceled if no user request is received for more than 5 seconds.
When this parameter is changed, the previous setting will be overwritten.symbols - List of trading pairs. When this parameter is not empty, separate it with commas and support up to 50 trading pairs.
Empty means all trading pairs. When this parameter is changed, the previous setting will be overwritten.IOExceptionpublic HFOrderDeadCancelQueryResponse queryHFOrderDeadCancel() throws IOException
OrderAPIqueryHFOrderDeadCancel 在接口中 OrderAPIIOExceptionpublic ServerStatusResponse queryServerStatus() throws IOException
queryServerStatus 在接口中 OrderAPIIOExceptionCopyright © 2023. All rights reserved.