Get Sub-Account List
API Description
This interface allows the Master Account to query the list of all created sub-accounts. It provides essential details such as the sub-account's UID and current status (frozen status and trading permissions).
Note: Get Sub-Account List is only available via RESTful API.
Precautions
- Master Account Only: This endpoint can only be called using the API Key of a Master Account. Sub-accounts do not have permission to view this list.
Authentication
This is a Private interface. It requires authentication using the Master Account's API Key and Secret Key. For details on signature generation, please refer to Introduction > Authentication & Code Snippet > Spot > RESTful Private Interface.
Request Method
POST
Endpoint
/api/v1/private?command=subAccount_list
Frequency Limit
The frequency limit for this interface is 3 requests/s per user ID. For detailed information on Global rate limits and API Rate Limiting Policy, please refer to the "Frequency Limit" section here.
Request Parameters
This interface does not require request parameters.
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| data | Array | The list of sub-account information. |
| -spotUid | Long | The internal User ID (UID) of the sub-account. |
| -userCode | String | The unique user code of the sub-account. |
| -nickName | String | The custom alias or login name (e.g., email/phone) of the sub-account. |
| -frozenFlag | Integer | Account Freeze Status. 1: Frozen 0: Unfrozen (Normal) |
| -spotTradeFlag | Integer | Spot Trading Permission Status. 1: Enabled 0: Disabled |
| -contractTradeFlag | Integer | Future Trading Permission Status. 1: Enabled 0: Disabled |
Request Example
The following Python code shows how to get the sub-account list.
Note: For a complete code example, please refer to Introduction > Authentication & Code Snippet > Spot > RESTful Private Interface.
api_url = "/api/v1/private?command=subAccount_list"
method = "POST"
params = {}
SpotRestfulPrivate(host, api_url, method, api_key, params, secret_key)# function SpotRestfulPrivate() is defined in section (Introduction > Authentication & Code Snippet > Spot > RESTful Private Interface)
Response Example
The following is an example response returned by the above request:
{
"code": "200",
"data": [
{
"spotUid": 123******,
"userCode": "8638662******",
"nickName": "************",
"frozenFlag": 0,
"spotTradeFlag": 1,
"contractTradeFlag":1
}
],
"msg": "SUCCESS",
"success": true,
"failed": false
}