Skip to main content

Get Batch Historical Orders

API Description

This interface supports querying batch historical orders by specifying multiple order IDs in a comma seperated string. It returns comprehensive information for each order, including basic order status, order size, order type etc.

Note: Get Batch Historical Orders data is only available via RESTful API.

Precautions

  1. This interface currently does not support filtering by specific trading instruments.
  2. This interfcae allows quering the historical orders for last three months only.
  3. For any order IDs that do not belong to the authenticated user or do not fall in the last three months will not be returned.

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

/v1/private?command=getBatchHistoryOrders

Frequency Limit

The frequency limit for this interface is 1 time/2sec 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
orderIdsTrueListList of order ID strings to query.
Example: "1234567890","1234567891"
Note: Up to 50 order IDs are supported per request.

Response Parameters

ParameterTypeDescription
dataObjectMain response data object.
-orderIdIntegerUnique order ID.
-dateStringOrder creation time
-sideStringBUY/SELL
-typeStringOrder Type:
(Limit Order-LIMIT; Market Order-MARKET; HL_LIMIT-HL_LIMIT; Planning Order-PLANNING; Stop-Loss Order-STOP_LIMIT_ORDER; Smart Market Order-SMART_MARKET_ORDER; Iceberg Order-ICEBERG)
-dealSizeStringTrade size in base currency
-dealFundsStringTrade size in quote currency
-dealAvgPriceStringTrade price
-feeStringTrade fee
-sizeStringOrder size in base currency
-priceStringOrder price specified by user (limit order price)
-statusIntegerOrder status
1:Unfillled, 2: Partiallly Filled, 3: Completelt Filled, 4: User Cnacelled, 5: Triggered 6: Trigger Failed
-symbolStringTrading instrument (e.g., BTC_USDT).
msgString"SUCCESS"
failedBooleantrue/false
successBooleantrue/false

Request Example

The following Python code shows how to get historical batch orders.

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

api_url = "/v1/private?command=getBatchHistoryOrders"
method = "post"
params ={"orderIds": "4626801005395149868,4626631680021608676,4626898861317523478,4624375482218447670" }
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. For brevity, only few orders are shown below:

{'code': '200',
'data': [{'orderId': 4626631680021608676,
'date': '2025-10-16 16:19:52',
'side': 'SELL',
'type': 'MARKET',
'dealSize': '0.0009',
'dealFunds': '99.61485',
'dealAvgPrice': '110683.17',
'fee': '0',
'size': '0.0009',
'price': '0',
'status': 3,
'symbol': 'BTC_USDT'},
{'orderId': 4626898861317523478,
'date': '2025-11-11 21:55:22',
'side': 'BUY',
'type': 'LIMIT',
'dealSize': '0.0009',
'dealFunds': '93.96',
'dealAvgPrice': '1.044E+5',
'fee': '0',
'size': '0.0009',
'price': '1.044E+5',
'status': 3,
'symbol': 'BTC_USDT'},
{'orderId': 4626801005395149868,
'date': '2025-11-06 22:07:45',
'side': 'BUY',
'type': 'MARKET',
'dealSize': '0.0009',
'dealFunds': '92.64926',
'dealAvgPrice': '102943.62',
'fee': '0',
'size': '0',
'price': '0',
'status': 3,
'symbol': 'BTC_USDT'}],
'msg': 'SUCCESS',
'success': True,
'failed': False}