public class SpotApi extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
SpotApi.APIgetFeeRequest |
class |
SpotApi.APIlistAllOpenOrdersRequest |
class |
SpotApi.APIlistCandlesticksRequest |
class |
SpotApi.APIlistMyTradesRequest |
class |
SpotApi.APIlistOrderBookRequest |
class |
SpotApi.APIlistOrdersRequest |
class |
SpotApi.APIlistSpotAccountsRequest |
class |
SpotApi.APIlistSpotPriceTriggeredOrdersRequest |
class |
SpotApi.APIlistTickersRequest |
class |
SpotApi.APIlistTradesRequest |
| Modifier and Type | Method and Description |
|---|---|
Order |
amendOrder(String orderId,
String currencyPair,
OrderPatch orderPatch,
String account)
Amend an order
By default, the orders of spot and margin account are updated.
|
okhttp3.Call |
amendOrderAsync(String orderId,
String currencyPair,
OrderPatch orderPatch,
String account,
ApiCallback<Order> _callback)
Amend an order (asynchronously)
By default, the orders of spot and margin account are updated.
|
okhttp3.Call |
amendOrderCall(String orderId,
String currencyPair,
OrderPatch orderPatch,
String account,
ApiCallback _callback)
Build call for amendOrder
|
ApiResponse<Order> |
amendOrderWithHttpInfo(String orderId,
String currencyPair,
OrderPatch orderPatch,
String account)
Amend an order
By default, the orders of spot and margin account are updated.
|
List<CancelOrderResult> |
cancelBatchOrders(List<CancelOrder> cancelOrder)
Cancel a batch of orders with an ID list
Multiple currency pairs can be specified, but maximum 20 orders are allowed per request
|
okhttp3.Call |
cancelBatchOrdersAsync(List<CancelOrder> cancelOrder,
ApiCallback<List<CancelOrderResult>> _callback)
Cancel a batch of orders with an ID list (asynchronously)
Multiple currency pairs can be specified, but maximum 20 orders are allowed per request
|
okhttp3.Call |
cancelBatchOrdersCall(List<CancelOrder> cancelOrder,
ApiCallback _callback)
Build call for cancelBatchOrders
|
ApiResponse<List<CancelOrderResult>> |
cancelBatchOrdersWithHttpInfo(List<CancelOrder> cancelOrder)
Cancel a batch of orders with an ID list
Multiple currency pairs can be specified, but maximum 20 orders are allowed per request
|
Order |
cancelOrder(String orderId,
String currencyPair,
String account)
Cancel a single order
Spot and margin orders are cancelled by default.
|
okhttp3.Call |
cancelOrderAsync(String orderId,
String currencyPair,
String account,
ApiCallback<Order> _callback)
Cancel a single order (asynchronously)
Spot and margin orders are cancelled by default.
|
okhttp3.Call |
cancelOrderCall(String orderId,
String currencyPair,
String account,
ApiCallback _callback)
Build call for cancelOrder
|
List<Order> |
cancelOrders(String currencyPair,
String side,
String account)
Cancel all `open` orders in specified currency pair
If `account` is not set, all open orders, including spot, margin and cross margin ones, will be cancelled.
|
okhttp3.Call |
cancelOrdersAsync(String currencyPair,
String side,
String account,
ApiCallback<List<Order>> _callback)
Cancel all `open` orders in specified currency pair (asynchronously)
If `account` is not set, all open orders, including spot, margin and cross margin ones, will be cancelled.
|
okhttp3.Call |
cancelOrdersCall(String currencyPair,
String side,
String account,
ApiCallback _callback)
Build call for cancelOrders
|
ApiResponse<List<Order>> |
cancelOrdersWithHttpInfo(String currencyPair,
String side,
String account)
Cancel all `open` orders in specified currency pair
If `account` is not set, all open orders, including spot, margin and cross margin ones, will be cancelled.
|
ApiResponse<Order> |
cancelOrderWithHttpInfo(String orderId,
String currencyPair,
String account)
Cancel a single order
Spot and margin orders are cancelled by default.
|
SpotPriceTriggeredOrder |
cancelSpotPriceTriggeredOrder(String orderId)
cancel a price-triggered order
|
okhttp3.Call |
cancelSpotPriceTriggeredOrderAsync(String orderId,
ApiCallback<SpotPriceTriggeredOrder> _callback)
cancel a price-triggered order (asynchronously)
|
okhttp3.Call |
cancelSpotPriceTriggeredOrderCall(String orderId,
ApiCallback _callback)
Build call for cancelSpotPriceTriggeredOrder
|
List<SpotPriceTriggeredOrder> |
cancelSpotPriceTriggeredOrderList(String market,
String account)
Cancel all open orders
|
okhttp3.Call |
cancelSpotPriceTriggeredOrderListAsync(String market,
String account,
ApiCallback<List<SpotPriceTriggeredOrder>> _callback)
Cancel all open orders (asynchronously)
|
okhttp3.Call |
cancelSpotPriceTriggeredOrderListCall(String market,
String account,
ApiCallback _callback)
Build call for cancelSpotPriceTriggeredOrderList
|
ApiResponse<List<SpotPriceTriggeredOrder>> |
cancelSpotPriceTriggeredOrderListWithHttpInfo(String market,
String account)
Cancel all open orders
|
ApiResponse<SpotPriceTriggeredOrder> |
cancelSpotPriceTriggeredOrderWithHttpInfo(String orderId)
cancel a price-triggered order
|
TriggerTime |
countdownCancelAllSpot(CountdownCancelAllSpotTask countdownCancelAllSpotTask)
Countdown cancel orders
When the timeout set by the user is reached, if there is no cancel or set a new countdown, the related pending orders will be automatically cancelled.
|
okhttp3.Call |
countdownCancelAllSpotAsync(CountdownCancelAllSpotTask countdownCancelAllSpotTask,
ApiCallback<TriggerTime> _callback)
Countdown cancel orders (asynchronously)
When the timeout set by the user is reached, if there is no cancel or set a new countdown, the related pending orders will be automatically cancelled.
|
okhttp3.Call |
countdownCancelAllSpotCall(CountdownCancelAllSpotTask countdownCancelAllSpotTask,
ApiCallback _callback)
Build call for countdownCancelAllSpot
|
ApiResponse<TriggerTime> |
countdownCancelAllSpotWithHttpInfo(CountdownCancelAllSpotTask countdownCancelAllSpotTask)
Countdown cancel orders
When the timeout set by the user is reached, if there is no cancel or set a new countdown, the related pending orders will be automatically cancelled.
|
List<BatchOrder> |
createBatchOrders(List<Order> order)
Create a batch of orders
Batch orders requirements: 1.
|
okhttp3.Call |
createBatchOrdersAsync(List<Order> order,
ApiCallback<List<BatchOrder>> _callback)
Create a batch of orders (asynchronously)
Batch orders requirements: 1.
|
okhttp3.Call |
createBatchOrdersCall(List<Order> order,
ApiCallback _callback)
Build call for createBatchOrders
|
ApiResponse<List<BatchOrder>> |
createBatchOrdersWithHttpInfo(List<Order> order)
Create a batch of orders
Batch orders requirements: 1.
|
Order |
createCrossLiquidateOrder(LiquidateOrder liquidateOrder)
close position when cross-currency is disabled
Currently, only cross-margin accounts are supported to close position when cross currencies are disabled.
|
okhttp3.Call |
createCrossLiquidateOrderAsync(LiquidateOrder liquidateOrder,
ApiCallback<Order> _callback)
close position when cross-currency is disabled (asynchronously)
Currently, only cross-margin accounts are supported to close position when cross currencies are disabled.
|
okhttp3.Call |
createCrossLiquidateOrderCall(LiquidateOrder liquidateOrder,
ApiCallback _callback)
Build call for createCrossLiquidateOrder
|
ApiResponse<Order> |
createCrossLiquidateOrderWithHttpInfo(LiquidateOrder liquidateOrder)
close position when cross-currency is disabled
Currently, only cross-margin accounts are supported to close position when cross currencies are disabled.
|
Order |
createOrder(Order order)
Create an order
You can place orders with spot, margin or cross margin account through setting the `account `field.
|
okhttp3.Call |
createOrderAsync(Order order,
ApiCallback<Order> _callback)
Create an order (asynchronously)
You can place orders with spot, margin or cross margin account through setting the `account `field.
|
okhttp3.Call |
createOrderCall(Order order,
ApiCallback _callback)
Build call for createOrder
|
ApiResponse<Order> |
createOrderWithHttpInfo(Order order)
Create an order
You can place orders with spot, margin or cross margin account through setting the `account `field.
|
TriggerOrderResponse |
createSpotPriceTriggeredOrder(SpotPriceTriggeredOrder spotPriceTriggeredOrder)
Create a price-triggered order
|
okhttp3.Call |
createSpotPriceTriggeredOrderAsync(SpotPriceTriggeredOrder spotPriceTriggeredOrder,
ApiCallback<TriggerOrderResponse> _callback)
Create a price-triggered order (asynchronously)
|
okhttp3.Call |
createSpotPriceTriggeredOrderCall(SpotPriceTriggeredOrder spotPriceTriggeredOrder,
ApiCallback _callback)
Build call for createSpotPriceTriggeredOrder
|
ApiResponse<TriggerOrderResponse> |
createSpotPriceTriggeredOrderWithHttpInfo(SpotPriceTriggeredOrder spotPriceTriggeredOrder)
Create a price-triggered order
|
ApiClient |
getApiClient() |
Map<String,SpotFee> |
getBatchSpotFee(String currencyPairs)
Query a batch of user trading fee rates
|
okhttp3.Call |
getBatchSpotFeeAsync(String currencyPairs,
ApiCallback<Map<String,SpotFee>> _callback)
Query a batch of user trading fee rates (asynchronously)
|
okhttp3.Call |
getBatchSpotFeeCall(String currencyPairs,
ApiCallback _callback)
Build call for getBatchSpotFee
|
ApiResponse<Map<String,SpotFee>> |
getBatchSpotFeeWithHttpInfo(String currencyPairs)
Query a batch of user trading fee rates
|
Currency |
getCurrency(String currency)
Get details of a specific currency
|
okhttp3.Call |
getCurrencyAsync(String currency,
ApiCallback<Currency> _callback)
Get details of a specific currency (asynchronously)
|
okhttp3.Call |
getCurrencyCall(String currency,
ApiCallback _callback)
Build call for getCurrency
|
CurrencyPair |
getCurrencyPair(String currencyPair)
Get details of a specifc currency pair
|
okhttp3.Call |
getCurrencyPairAsync(String currencyPair,
ApiCallback<CurrencyPair> _callback)
Get details of a specifc currency pair (asynchronously)
|
okhttp3.Call |
getCurrencyPairCall(String currencyPair,
ApiCallback _callback)
Build call for getCurrencyPair
|
ApiResponse<CurrencyPair> |
getCurrencyPairWithHttpInfo(String currencyPair)
Get details of a specifc currency pair
|
ApiResponse<Currency> |
getCurrencyWithHttpInfo(String currency)
Get details of a specific currency
|
SpotApi.APIgetFeeRequest |
getFee()
Deprecated.
|
Order |
getOrder(String orderId,
String currencyPair,
String account)
Get a single order
Spot and margin orders are queried by default.
|
okhttp3.Call |
getOrderAsync(String orderId,
String currencyPair,
String account,
ApiCallback<Order> _callback)
Get a single order (asynchronously)
Spot and margin orders are queried by default.
|
okhttp3.Call |
getOrderCall(String orderId,
String currencyPair,
String account,
ApiCallback _callback)
Build call for getOrder
|
ApiResponse<Order> |
getOrderWithHttpInfo(String orderId,
String currencyPair,
String account)
Get a single order
Spot and margin orders are queried by default.
|
SpotPriceTriggeredOrder |
getSpotPriceTriggeredOrder(String orderId)
Get a price-triggered order
|
okhttp3.Call |
getSpotPriceTriggeredOrderAsync(String orderId,
ApiCallback<SpotPriceTriggeredOrder> _callback)
Get a price-triggered order (asynchronously)
|
okhttp3.Call |
getSpotPriceTriggeredOrderCall(String orderId,
ApiCallback _callback)
Build call for getSpotPriceTriggeredOrder
|
ApiResponse<SpotPriceTriggeredOrder> |
getSpotPriceTriggeredOrderWithHttpInfo(String orderId)
Get a price-triggered order
|
SystemTime |
getSystemTime()
Get server current time
|
okhttp3.Call |
getSystemTimeAsync(ApiCallback<SystemTime> _callback)
Get server current time (asynchronously)
|
okhttp3.Call |
getSystemTimeCall(ApiCallback _callback)
Build call for getSystemTime
|
ApiResponse<SystemTime> |
getSystemTimeWithHttpInfo()
Get server current time
|
SpotApi.APIlistAllOpenOrdersRequest |
listAllOpenOrders()
List all open orders
List open orders in all currency pairs.
|
SpotApi.APIlistCandlesticksRequest |
listCandlesticks(String currencyPair)
Market candlesticks
Maximum of 1000 points can be returned in a query.
|
List<Currency> |
listCurrencies()
List all currencies' details
Currency has two forms: 1.
|
okhttp3.Call |
listCurrenciesAsync(ApiCallback<List<Currency>> _callback)
List all currencies' details (asynchronously)
Currency has two forms: 1.
|
okhttp3.Call |
listCurrenciesCall(ApiCallback _callback)
Build call for listCurrencies
|
ApiResponse<List<Currency>> |
listCurrenciesWithHttpInfo()
List all currencies' details
Currency has two forms: 1.
|
List<CurrencyPair> |
listCurrencyPairs()
List all currency pairs supported
|
okhttp3.Call |
listCurrencyPairsAsync(ApiCallback<List<CurrencyPair>> _callback)
List all currency pairs supported (asynchronously)
|
okhttp3.Call |
listCurrencyPairsCall(ApiCallback _callback)
Build call for listCurrencyPairs
|
ApiResponse<List<CurrencyPair>> |
listCurrencyPairsWithHttpInfo()
List all currency pairs supported
|
SpotApi.APIlistMyTradesRequest |
listMyTrades()
List personal trading history
Spot and margin trades are queried by default.
|
SpotApi.APIlistOrderBookRequest |
listOrderBook(String currencyPair)
Retrieve order book
Order book will be sorted by price from high to low on bids; low to high on asks
|
SpotApi.APIlistOrdersRequest |
listOrders(String currencyPair,
String status)
List orders
Spot and margin orders are returned by default.
|
SpotApi.APIlistSpotAccountsRequest |
listSpotAccounts()
List spot accounts
|
SpotApi.APIlistSpotPriceTriggeredOrdersRequest |
listSpotPriceTriggeredOrders(String status)
Retrieve running auto order list
|
SpotApi.APIlistTickersRequest |
listTickers()
Retrieve ticker information
Return only related data if `currency_pair` is specified; otherwise return all of them
|
SpotApi.APIlistTradesRequest |
listTrades(String currencyPair)
Retrieve market trades
You can use `from` and `to` to query by time range, or use `last_id` by scrolling page.
|
void |
setApiClient(ApiClient apiClient) |
public SpotApi()
public SpotApi(ApiClient apiClient)
public ApiClient getApiClient()
public void setApiClient(ApiClient apiClient)
public okhttp3.Call listCurrenciesCall(ApiCallback _callback) throws ApiException
_callback - Callback for upload/download progressApiException - If fail to serialize the request body object| Status Code | Description | Response Headers |
| 200 | List retrieved | - |
public List<Currency> listCurrencies() throws ApiException
ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 200 | List retrieved | - |
public ApiResponse<List<Currency>> listCurrenciesWithHttpInfo() throws ApiException
ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 200 | List retrieved | - |
public okhttp3.Call listCurrenciesAsync(ApiCallback<List<Currency>> _callback) throws ApiException
_callback - The callback to be executed when the API call finishesApiException - If fail to process the API call, e.g. serializing the request body object| Status Code | Description | Response Headers |
| 200 | List retrieved | - |
public okhttp3.Call getCurrencyCall(String currency, ApiCallback _callback) throws ApiException
currency - Currency name (required)_callback - Callback for upload/download progressApiException - If fail to serialize the request body object| Status Code | Description | Response Headers |
| 200 | Successfully retrieved | - |
public Currency getCurrency(String currency) throws ApiException
currency - Currency name (required)ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 200 | Successfully retrieved | - |
public ApiResponse<Currency> getCurrencyWithHttpInfo(String currency) throws ApiException
currency - Currency name (required)ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 200 | Successfully retrieved | - |
public okhttp3.Call getCurrencyAsync(String currency, ApiCallback<Currency> _callback) throws ApiException
currency - Currency name (required)_callback - The callback to be executed when the API call finishesApiException - If fail to process the API call, e.g. serializing the request body object| Status Code | Description | Response Headers |
| 200 | Successfully retrieved | - |
public okhttp3.Call listCurrencyPairsCall(ApiCallback _callback) throws ApiException
_callback - Callback for upload/download progressApiException - If fail to serialize the request body object| Status Code | Description | Response Headers |
| 200 | All currency pairs retrieved | - |
public List<CurrencyPair> listCurrencyPairs() throws ApiException
ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 200 | All currency pairs retrieved | - |
public ApiResponse<List<CurrencyPair>> listCurrencyPairsWithHttpInfo() throws ApiException
ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 200 | All currency pairs retrieved | - |
public okhttp3.Call listCurrencyPairsAsync(ApiCallback<List<CurrencyPair>> _callback) throws ApiException
_callback - The callback to be executed when the API call finishesApiException - If fail to process the API call, e.g. serializing the request body object| Status Code | Description | Response Headers |
| 200 | All currency pairs retrieved | - |
public okhttp3.Call getCurrencyPairCall(String currencyPair, ApiCallback _callback) throws ApiException
currencyPair - Currency pair (required)_callback - Callback for upload/download progressApiException - If fail to serialize the request body object| Status Code | Description | Response Headers |
| 200 | Successfully retrieved | - |
public CurrencyPair getCurrencyPair(String currencyPair) throws ApiException
currencyPair - Currency pair (required)ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 200 | Successfully retrieved | - |
public ApiResponse<CurrencyPair> getCurrencyPairWithHttpInfo(String currencyPair) throws ApiException
currencyPair - Currency pair (required)ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 200 | Successfully retrieved | - |
public okhttp3.Call getCurrencyPairAsync(String currencyPair, ApiCallback<CurrencyPair> _callback) throws ApiException
currencyPair - Currency pair (required)_callback - The callback to be executed when the API call finishesApiException - If fail to process the API call, e.g. serializing the request body object| Status Code | Description | Response Headers |
| 200 | Successfully retrieved | - |
public SpotApi.APIlistTickersRequest listTickers()
| Status Code | Description | Response Headers |
| 200 | Successfully retrieved | - |
public SpotApi.APIlistOrderBookRequest listOrderBook(String currencyPair)
currencyPair - Currency pair (required)| Status Code | Description | Response Headers |
| 200 | Successfully retrieved | - |
public SpotApi.APIlistTradesRequest listTrades(String currencyPair)
currencyPair - Currency pair (required)| Status Code | Description | Response Headers |
| 200 | List retrieved | - |
public SpotApi.APIlistCandlesticksRequest listCandlesticks(String currencyPair)
currencyPair - Currency pair (required)| Status Code | Description | Response Headers |
| 200 | Successfully retrieved | - |
@Deprecated public SpotApi.APIgetFeeRequest getFee()
| Status Code | Description | Response Headers |
| 200 | Successfully retrieved | - |
public okhttp3.Call getBatchSpotFeeCall(String currencyPairs, ApiCallback _callback) throws ApiException
currencyPairs - A request can only query up to 50 currency pairs (required)_callback - Callback for upload/download progressApiException - If fail to serialize the request body object| Status Code | Description | Response Headers |
| 200 | Successfully retrieved | - |
public Map<String,SpotFee> getBatchSpotFee(String currencyPairs) throws ApiException
currencyPairs - A request can only query up to 50 currency pairs (required)ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 200 | Successfully retrieved | - |
public ApiResponse<Map<String,SpotFee>> getBatchSpotFeeWithHttpInfo(String currencyPairs) throws ApiException
currencyPairs - A request can only query up to 50 currency pairs (required)ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 200 | Successfully retrieved | - |
public okhttp3.Call getBatchSpotFeeAsync(String currencyPairs, ApiCallback<Map<String,SpotFee>> _callback) throws ApiException
currencyPairs - A request can only query up to 50 currency pairs (required)_callback - The callback to be executed when the API call finishesApiException - If fail to process the API call, e.g. serializing the request body object| Status Code | Description | Response Headers |
| 200 | Successfully retrieved | - |
public SpotApi.APIlistSpotAccountsRequest listSpotAccounts()
| Status Code | Description | Response Headers |
| 200 | List retrieved | - |
public okhttp3.Call createBatchOrdersCall(List<Order> order, ApiCallback _callback) throws ApiException
order - (required)_callback - Callback for upload/download progressApiException - If fail to serialize the request body object| Status Code | Description | Response Headers |
| 200 | Request is completed | - |
public List<BatchOrder> createBatchOrders(List<Order> order) throws ApiException
order - (required)ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 200 | Request is completed | - |
public ApiResponse<List<BatchOrder>> createBatchOrdersWithHttpInfo(List<Order> order) throws ApiException
order - (required)ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 200 | Request is completed | - |
public okhttp3.Call createBatchOrdersAsync(List<Order> order, ApiCallback<List<BatchOrder>> _callback) throws ApiException
order - (required)_callback - The callback to be executed when the API call finishesApiException - If fail to process the API call, e.g. serializing the request body object| Status Code | Description | Response Headers |
| 200 | Request is completed | - |
public SpotApi.APIlistAllOpenOrdersRequest listAllOpenOrders()
| Status Code | Description | Response Headers |
| 200 | List retrieved | - |
public okhttp3.Call createCrossLiquidateOrderCall(LiquidateOrder liquidateOrder, ApiCallback _callback) throws ApiException
liquidateOrder - (required)_callback - Callback for upload/download progressApiException - If fail to serialize the request body object| Status Code | Description | Response Headers |
| 201 | order created | - |
public Order createCrossLiquidateOrder(LiquidateOrder liquidateOrder) throws ApiException
liquidateOrder - (required)ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 201 | order created | - |
public ApiResponse<Order> createCrossLiquidateOrderWithHttpInfo(LiquidateOrder liquidateOrder) throws ApiException
liquidateOrder - (required)ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 201 | order created | - |
public okhttp3.Call createCrossLiquidateOrderAsync(LiquidateOrder liquidateOrder, ApiCallback<Order> _callback) throws ApiException
liquidateOrder - (required)_callback - The callback to be executed when the API call finishesApiException - If fail to process the API call, e.g. serializing the request body object| Status Code | Description | Response Headers |
| 201 | order created | - |
public SpotApi.APIlistOrdersRequest listOrders(String currencyPair, String status)
currencyPair - Retrieve results with specified currency pair. It is required for open orders, but optional for finished ones. (required)status - List orders based on status `open` - order is waiting to be filled `finished` - order has been filled or cancelled (required)| Status Code | Description | Response Headers |
| 200 | List retrieved | - |
public okhttp3.Call createOrderCall(Order order, ApiCallback _callback) throws ApiException
order - (required)_callback - Callback for upload/download progressApiException - If fail to serialize the request body object| Status Code | Description | Response Headers |
| 201 | Order created. | - |
public Order createOrder(Order order) throws ApiException
order - (required)ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 201 | Order created. | - |
public ApiResponse<Order> createOrderWithHttpInfo(Order order) throws ApiException
order - (required)ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 201 | Order created. | - |
public okhttp3.Call createOrderAsync(Order order, ApiCallback<Order> _callback) throws ApiException
order - (required)_callback - The callback to be executed when the API call finishesApiException - If fail to process the API call, e.g. serializing the request body object| Status Code | Description | Response Headers |
| 201 | Order created. | - |
public okhttp3.Call cancelOrdersCall(String currencyPair, String side, String account, ApiCallback _callback) throws ApiException
currencyPair - Currency pair (required)side - All bids or asks. Both included if not specified (optional)account - Specify account type - classic account:Default to all account types being included - portfolio margin account:`cross_margin` only (optional)_callback - Callback for upload/download progressApiException - If fail to serialize the request body object| Status Code | Description | Response Headers |
| 200 | Batch cancellation request accepted. Query order status by listing orders | - |
public List<Order> cancelOrders(String currencyPair, String side, String account) throws ApiException
currencyPair - Currency pair (required)side - All bids or asks. Both included if not specified (optional)account - Specify account type - classic account:Default to all account types being included - portfolio margin account:`cross_margin` only (optional)ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 200 | Batch cancellation request accepted. Query order status by listing orders | - |
public ApiResponse<List<Order>> cancelOrdersWithHttpInfo(String currencyPair, String side, String account) throws ApiException
currencyPair - Currency pair (required)side - All bids or asks. Both included if not specified (optional)account - Specify account type - classic account:Default to all account types being included - portfolio margin account:`cross_margin` only (optional)ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 200 | Batch cancellation request accepted. Query order status by listing orders | - |
public okhttp3.Call cancelOrdersAsync(String currencyPair, String side, String account, ApiCallback<List<Order>> _callback) throws ApiException
currencyPair - Currency pair (required)side - All bids or asks. Both included if not specified (optional)account - Specify account type - classic account:Default to all account types being included - portfolio margin account:`cross_margin` only (optional)_callback - The callback to be executed when the API call finishesApiException - If fail to process the API call, e.g. serializing the request body object| Status Code | Description | Response Headers |
| 200 | Batch cancellation request accepted. Query order status by listing orders | - |
public okhttp3.Call cancelBatchOrdersCall(List<CancelOrder> cancelOrder, ApiCallback _callback) throws ApiException
cancelOrder - (required)_callback - Callback for upload/download progressApiException - If fail to serialize the request body object| Status Code | Description | Response Headers |
| 200 | Batch cancellation completed | - |
public List<CancelOrderResult> cancelBatchOrders(List<CancelOrder> cancelOrder) throws ApiException
cancelOrder - (required)ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 200 | Batch cancellation completed | - |
public ApiResponse<List<CancelOrderResult>> cancelBatchOrdersWithHttpInfo(List<CancelOrder> cancelOrder) throws ApiException
cancelOrder - (required)ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 200 | Batch cancellation completed | - |
public okhttp3.Call cancelBatchOrdersAsync(List<CancelOrder> cancelOrder, ApiCallback<List<CancelOrderResult>> _callback) throws ApiException
cancelOrder - (required)_callback - The callback to be executed when the API call finishesApiException - If fail to process the API call, e.g. serializing the request body object| Status Code | Description | Response Headers |
| 200 | Batch cancellation completed | - |
public okhttp3.Call getOrderCall(String orderId, String currencyPair, String account, ApiCallback _callback) throws ApiException
orderId - Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 1 hour after the end of the order. After that, only order ID is accepted. (required)currencyPair - Currency pair (required)account - Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only (optional)_callback - Callback for upload/download progressApiException - If fail to serialize the request body object| Status Code | Description | Response Headers |
| 200 | Detail retrieved | - |
public Order getOrder(String orderId, String currencyPair, String account) throws ApiException
orderId - Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 1 hour after the end of the order. After that, only order ID is accepted. (required)currencyPair - Currency pair (required)account - Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only (optional)ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 200 | Detail retrieved | - |
public ApiResponse<Order> getOrderWithHttpInfo(String orderId, String currencyPair, String account) throws ApiException
orderId - Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 1 hour after the end of the order. After that, only order ID is accepted. (required)currencyPair - Currency pair (required)account - Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only (optional)ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 200 | Detail retrieved | - |
public okhttp3.Call getOrderAsync(String orderId, String currencyPair, String account, ApiCallback<Order> _callback) throws ApiException
orderId - Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 1 hour after the end of the order. After that, only order ID is accepted. (required)currencyPair - Currency pair (required)account - Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only (optional)_callback - The callback to be executed when the API call finishesApiException - If fail to process the API call, e.g. serializing the request body object| Status Code | Description | Response Headers |
| 200 | Detail retrieved | - |
public okhttp3.Call cancelOrderCall(String orderId, String currencyPair, String account, ApiCallback _callback) throws ApiException
orderId - Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 1 hour after the end of the order. After that, only order ID is accepted. (required)currencyPair - Currency pair (required)account - Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only (optional)_callback - Callback for upload/download progressApiException - If fail to serialize the request body object| Status Code | Description | Response Headers |
| 200 | Order cancelled | - |
public Order cancelOrder(String orderId, String currencyPair, String account) throws ApiException
orderId - Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 1 hour after the end of the order. After that, only order ID is accepted. (required)currencyPair - Currency pair (required)account - Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only (optional)ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 200 | Order cancelled | - |
public ApiResponse<Order> cancelOrderWithHttpInfo(String orderId, String currencyPair, String account) throws ApiException
orderId - Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 1 hour after the end of the order. After that, only order ID is accepted. (required)currencyPair - Currency pair (required)account - Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only (optional)ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 200 | Order cancelled | - |
public okhttp3.Call cancelOrderAsync(String orderId, String currencyPair, String account, ApiCallback<Order> _callback) throws ApiException
orderId - Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 1 hour after the end of the order. After that, only order ID is accepted. (required)currencyPair - Currency pair (required)account - Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only (optional)_callback - The callback to be executed when the API call finishesApiException - If fail to process the API call, e.g. serializing the request body object| Status Code | Description | Response Headers |
| 200 | Order cancelled | - |
public okhttp3.Call amendOrderCall(String orderId, String currencyPair, OrderPatch orderPatch, String account, ApiCallback _callback) throws ApiException
orderId - Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 1 hour after the end of the order. After that, only order ID is accepted. (required)currencyPair - Currency pair (required)orderPatch - (required)account - Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only (optional)_callback - Callback for upload/download progressApiException - If fail to serialize the request body object| Status Code | Description | Response Headers |
| 200 | Updated | - |
public Order amendOrder(String orderId, String currencyPair, OrderPatch orderPatch, String account) throws ApiException
orderId - Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 1 hour after the end of the order. After that, only order ID is accepted. (required)currencyPair - Currency pair (required)orderPatch - (required)account - Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only (optional)ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 200 | Updated | - |
public ApiResponse<Order> amendOrderWithHttpInfo(String orderId, String currencyPair, OrderPatch orderPatch, String account) throws ApiException
orderId - Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 1 hour after the end of the order. After that, only order ID is accepted. (required)currencyPair - Currency pair (required)orderPatch - (required)account - Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only (optional)ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 200 | Updated | - |
public okhttp3.Call amendOrderAsync(String orderId, String currencyPair, OrderPatch orderPatch, String account, ApiCallback<Order> _callback) throws ApiException
orderId - Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 1 hour after the end of the order. After that, only order ID is accepted. (required)currencyPair - Currency pair (required)orderPatch - (required)account - Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only (optional)_callback - The callback to be executed when the API call finishesApiException - If fail to process the API call, e.g. serializing the request body object| Status Code | Description | Response Headers |
| 200 | Updated | - |
public SpotApi.APIlistMyTradesRequest listMyTrades()
| Status Code | Description | Response Headers |
| 200 | List retrieved | - |
public okhttp3.Call getSystemTimeCall(ApiCallback _callback) throws ApiException
_callback - Callback for upload/download progressApiException - If fail to serialize the request body object| Status Code | Description | Response Headers |
| 200 | Successfully retrieved | - |
public SystemTime getSystemTime() throws ApiException
ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 200 | Successfully retrieved | - |
public ApiResponse<SystemTime> getSystemTimeWithHttpInfo() throws ApiException
ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 200 | Successfully retrieved | - |
public okhttp3.Call getSystemTimeAsync(ApiCallback<SystemTime> _callback) throws ApiException
_callback - The callback to be executed when the API call finishesApiException - If fail to process the API call, e.g. serializing the request body object| Status Code | Description | Response Headers |
| 200 | Successfully retrieved | - |
public okhttp3.Call countdownCancelAllSpotCall(CountdownCancelAllSpotTask countdownCancelAllSpotTask, ApiCallback _callback) throws ApiException
countdownCancelAllSpotTask - (required)_callback - Callback for upload/download progressApiException - If fail to serialize the request body object| Status Code | Description | Response Headers |
| 200 | Set countdown successfully | - |
public TriggerTime countdownCancelAllSpot(CountdownCancelAllSpotTask countdownCancelAllSpotTask) throws ApiException
countdownCancelAllSpotTask - (required)ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 200 | Set countdown successfully | - |
public ApiResponse<TriggerTime> countdownCancelAllSpotWithHttpInfo(CountdownCancelAllSpotTask countdownCancelAllSpotTask) throws ApiException
countdownCancelAllSpotTask - (required)ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 200 | Set countdown successfully | - |
public okhttp3.Call countdownCancelAllSpotAsync(CountdownCancelAllSpotTask countdownCancelAllSpotTask, ApiCallback<TriggerTime> _callback) throws ApiException
countdownCancelAllSpotTask - (required)_callback - The callback to be executed when the API call finishesApiException - If fail to process the API call, e.g. serializing the request body object| Status Code | Description | Response Headers |
| 200 | Set countdown successfully | - |
public SpotApi.APIlistSpotPriceTriggeredOrdersRequest listSpotPriceTriggeredOrders(String status)
status - Only list the orders with this status (required)| Status Code | Description | Response Headers |
| 200 | List retrieved | - |
public okhttp3.Call createSpotPriceTriggeredOrderCall(SpotPriceTriggeredOrder spotPriceTriggeredOrder, ApiCallback _callback) throws ApiException
spotPriceTriggeredOrder - (required)_callback - Callback for upload/download progressApiException - If fail to serialize the request body object| Status Code | Description | Response Headers |
| 201 | Order created | - |
public TriggerOrderResponse createSpotPriceTriggeredOrder(SpotPriceTriggeredOrder spotPriceTriggeredOrder) throws ApiException
spotPriceTriggeredOrder - (required)ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 201 | Order created | - |
public ApiResponse<TriggerOrderResponse> createSpotPriceTriggeredOrderWithHttpInfo(SpotPriceTriggeredOrder spotPriceTriggeredOrder) throws ApiException
spotPriceTriggeredOrder - (required)ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 201 | Order created | - |
public okhttp3.Call createSpotPriceTriggeredOrderAsync(SpotPriceTriggeredOrder spotPriceTriggeredOrder, ApiCallback<TriggerOrderResponse> _callback) throws ApiException
spotPriceTriggeredOrder - (required)_callback - The callback to be executed when the API call finishesApiException - If fail to process the API call, e.g. serializing the request body object| Status Code | Description | Response Headers |
| 201 | Order created | - |
public okhttp3.Call cancelSpotPriceTriggeredOrderListCall(String market, String account, ApiCallback _callback) throws ApiException
market - Currency pair (optional)account - Trading account type. Portfolio margin account must set to `cross_margin` (optional)_callback - Callback for upload/download progressApiException - If fail to serialize the request body object| Status Code | Description | Response Headers |
| 200 | Batch cancellation request accepted. Query order status by listing orders | - |
public List<SpotPriceTriggeredOrder> cancelSpotPriceTriggeredOrderList(String market, String account) throws ApiException
market - Currency pair (optional)account - Trading account type. Portfolio margin account must set to `cross_margin` (optional)ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 200 | Batch cancellation request accepted. Query order status by listing orders | - |
public ApiResponse<List<SpotPriceTriggeredOrder>> cancelSpotPriceTriggeredOrderListWithHttpInfo(String market, String account) throws ApiException
market - Currency pair (optional)account - Trading account type. Portfolio margin account must set to `cross_margin` (optional)ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 200 | Batch cancellation request accepted. Query order status by listing orders | - |
public okhttp3.Call cancelSpotPriceTriggeredOrderListAsync(String market, String account, ApiCallback<List<SpotPriceTriggeredOrder>> _callback) throws ApiException
market - Currency pair (optional)account - Trading account type. Portfolio margin account must set to `cross_margin` (optional)_callback - The callback to be executed when the API call finishesApiException - If fail to process the API call, e.g. serializing the request body object| Status Code | Description | Response Headers |
| 200 | Batch cancellation request accepted. Query order status by listing orders | - |
public okhttp3.Call getSpotPriceTriggeredOrderCall(String orderId, ApiCallback _callback) throws ApiException
orderId - Retrieve the data of the order with the specified ID (required)_callback - Callback for upload/download progressApiException - If fail to serialize the request body object| Status Code | Description | Response Headers |
| 200 | Auto order detail | - |
public SpotPriceTriggeredOrder getSpotPriceTriggeredOrder(String orderId) throws ApiException
orderId - Retrieve the data of the order with the specified ID (required)ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 200 | Auto order detail | - |
public ApiResponse<SpotPriceTriggeredOrder> getSpotPriceTriggeredOrderWithHttpInfo(String orderId) throws ApiException
orderId - Retrieve the data of the order with the specified ID (required)ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 200 | Auto order detail | - |
public okhttp3.Call getSpotPriceTriggeredOrderAsync(String orderId, ApiCallback<SpotPriceTriggeredOrder> _callback) throws ApiException
orderId - Retrieve the data of the order with the specified ID (required)_callback - The callback to be executed when the API call finishesApiException - If fail to process the API call, e.g. serializing the request body object| Status Code | Description | Response Headers |
| 200 | Auto order detail | - |
public okhttp3.Call cancelSpotPriceTriggeredOrderCall(String orderId, ApiCallback _callback) throws ApiException
orderId - Retrieve the data of the order with the specified ID (required)_callback - Callback for upload/download progressApiException - If fail to serialize the request body object| Status Code | Description | Response Headers |
| 200 | Auto order detail | - |
public SpotPriceTriggeredOrder cancelSpotPriceTriggeredOrder(String orderId) throws ApiException
orderId - Retrieve the data of the order with the specified ID (required)ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 200 | Auto order detail | - |
public ApiResponse<SpotPriceTriggeredOrder> cancelSpotPriceTriggeredOrderWithHttpInfo(String orderId) throws ApiException
orderId - Retrieve the data of the order with the specified ID (required)ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body| Status Code | Description | Response Headers |
| 200 | Auto order detail | - |
public okhttp3.Call cancelSpotPriceTriggeredOrderAsync(String orderId, ApiCallback<SpotPriceTriggeredOrder> _callback) throws ApiException
orderId - Retrieve the data of the order with the specified ID (required)_callback - The callback to be executed when the API call finishesApiException - If fail to process the API call, e.g. serializing the request body object| Status Code | Description | Response Headers |
| 200 | Auto order detail | - |
Copyright © 2023. All rights reserved.