Skip to main content

Get Order Details

API Description

This interface retrieves detailed information of an order by specifying the order ID.

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

Precautions

  1. This interface accepts 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 Introduction > Authentication & Code Snippet > Spot > RESTful Private Interface.

Request Method

POST

Endpoint

/api/v1/private?command=returnOrderTrades

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
tradeIDLongOrder ID
currencyPairStringTrading instrument i.e., BTC_USDT
typeStringTrade direction: buy/sell
amountStringCurrent order size in quote currency
success_amountStringTraded order size in quote currency
totalStringCurrent order size in base currency
success_totalStringTraded order size in base currency
feeStringHandeling fee
dateStringTransaction time
statusIntegerStatus:1: Uncompleted, 2: Partially completed, 3: Fully completed, 4: User canceled

Request Example

The following Python code shows how to get order details.

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

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

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

Response Example

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

{'code': '200',
'data': {'tradeID': 4624385377802383167,
'currencyPair': 'BTC_USDT',
'type': 'buy',
'amount': '0.00',
'success_amount': '98.91',
'total': '0.0000',
'success_total': '0.0012',
'fee': '0.00',
'date': '2025-03-12 17:37:31',
'status': 3},
'msg': 'SUCCESS',
'success': True,
'failed': False}