Light Mode
Add SubAccount API
POST
/api/v1/sub/api-key:::info[Description]
This endpoint can be used to create APIs for sub-accounts.
:::
Request
Body Params application/json
subName
string
required
Sub-account name, create sub account name of API Key.
passphrase
string
required
Password(Must contain 7-32 characters. Cannot contain any spaces.)
remark
string
required
Remarks(1~24 characters)
permission
string
optional
Permissions(Only General、Spot、Futures、Margin、InnerTransfer(Flex Transfer) permissions can be set, such as "General, Trade". The default is "General")
Default:
General
Example:
General, Trade
ipWhitelist
string
optional
IP whitelist(You may add up to 20 IPs. Use a halfwidth comma to each IP)
expire
enum<string>
optional
API expiration time; Never expire(default)-1,30Day30,90Day90,180Day180,360Day360
Allowed values:
-13090180360
Default:
-1
Example:
30
Example
{
"subName": "testapi6",
"passphrase": "11223344",
"remark": "TheRemark",
"permission": "General,Spot,Futures"
}
Request samples
Responses
OK(200)
HTTP Code: 200
Content Type : JSONapplication/json
Data Schema
code
string
required
data
object
required
subName
string
required
Sub-account name
remark
string
required
Remarks
apiKey
string
required
API Key
apiSecret
string
required
API Secret Key
apiVersion
integer
required
API Version
passphrase
string
required
Password
permission
string
required
ipWhitelist
string
optional
IP whitelist
createdAt
integer <int64>
required
Time of the event
Example
{
"code": "200000",
"data": {
"subName": "testapi6",
"remark": "TheRemark",
"apiKey": "670621e3a25958000159c82f",
"apiSecret": "46fd8974******896f005b2340",
"apiVersion": 3,
"passphrase": "11223344",
"permission": "General,Futures",
"createdAt": 1728455139000
}
}
Last modified: 10 days ago