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
- This interface accepts only one order ID per request. Specifying multiple order IDs is not supported.
- 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
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| orderNumber | True | String | Order ID |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| tradeID | Long | Order ID |
| currencyPair | String | Trading instrument i.e., BTC_USDT |
| type | String | Trade direction: buy/sell |
| amount | String | Current order size in quote currency |
| success_amount | String | Traded order size in quote currency |
| total | String | Current order size in base currency |
| success_total | String | Traded order size in base currency |
| fee | String | Handeling fee |
| date | String | Transaction time |
| status | Integer | Status: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}