Skip to main content

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​

  1. 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 Common > 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 click here.

Request Parameters​

This interface does not require request parameters.

Response Parameters​

ParameterTypeDescription
dataArrayThe list of sub-account information.
-spotUidLongThe internal User ID (UID) of the sub-account.
-userCodeStringThe unique user code of the sub-account.
-nickNameStringThe custom alias or login name (e.g., email/phone) of the sub-account.
-frozenFlagIntegerAccount Freeze Status.
1: Frozen
0: Unfrozen (Normal)
-spotTradeFlagIntegerSpot Trading Permission Status.
1: Enabled
0: Disabled
-contractTradeFlagIntegerFuture 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 Common > 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 (Common > 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
}