Skip to main content

Get Order Status

API Description​

This endpoint enables users to query the status of an order by providing the corresponding order ID. It returns information like instrument, direction, size, execution status, and timestamp.

Note: Order status data is only available via RESTful API.

Precautions​

  1. This interface supports only one order ID per request. Specifying multiple order IDs is not supported.
  2. This interface only supports querying order IDs that are not older than 7 days.

Authentication​

This is a private interface and requires authentication. For details on using the RESTful API, refer to Common > Authentication & Code Snippet > Spot > RESTful Private Interface.

Request Method​

POST

Endpoint​

/api/v1/private?command=returnOrderStatus

Frequency Limit​

The frequency limit for this interface is 30 requests/2s per user ID. In addition to this per-interface limit, a global rate limit is also enforced.

For detailed information on Global rate limits and API Rate Limiting Policy, please refer to the "Frequency Limit" section at click here

Request Parameters​

ParameterMandatoryTypeDescription
orderNumberTrueStringOrder Id

Response Parameters​

ParameterTypeDescription
currencyPairStringTrading instrument i.e., BTC_USDT
typeStringTrade direction: buy/sell
totalStringCurrent order size in base currency
startingAmountStringCurrent order amount in quote currency
statusIntegerStatus:1: Uncompleted, 2: Partially completed,3: Fully completed,4: User canceled
dateStringTransaction time

Request Example​

The following Python code shows how to get order status.

Note: For a complete code example, please refer to Common > Authentication & Code Snippet > Spot > RESTful Private Interface.

api_url = "/api/v1/private?command=returnOrderStatus"
method = "post"
params = {
"orderNumber": "4624544807079846405"
}
SpotRestfulPrivate(host, api_url, method, api_key, params, secret_key) # function SpotRestfulPrivate() is defined in section (Common > Authentication & Code Snippet > Spot > RESTful Private Interface)

Note: For a complete Java code example, please refer to Common > Authentication & Code Snippet > Spot > RESTful Private Interface.

Response Example​

The following is an example response returned by the above Python request:

{'code': '200',
'data': {'status': 4,
'currencyPair': 'BTC_USDT',
'date': '2025-04-03 18:39:58',
'total': '0.0001',
'type': 'buy',
'startingAmount': '8.20'},
'msg': 'SUCCESS',
'success': True,
'failed': False}