跳到主要内容

批量创建虚拟子账户和apikey

限速规则 1次/1s (UID)

描述

批量创建虚拟子账户和apikey

  • 每次请求的列表长度最大为5
  • 每个虚拟子账户最多可创建10个API Key
  • 每个账户默认最多可创建20个子账户

HTTP请求

  • POST /api/v2/user/batch-create-subaccount-and-apikey
请求示例
curl -X POST "https://api.bitget.com/api/v2/user/batch-create-subaccount-and-apikey" \
-H "ACCESS-KEY:*******" \
-H "ACCESS-SIGN:*" \
-H "ACCESS-PASSPHRASE:*" \
-H "ACCESS-TIMESTAMP:1659076670000" \
-H "locale:en-US" \
-H "Content-Type: application/json" \
-d '[{"subAccountName":"test","passphrase":"12345678","permList":["spot_trade","contract_trade"],"label":"1681808312065"}]'

请求参数

参数名参数类型是否必须描述
subAccountNameString虚拟子账户昵称 长度为8位的英文字母
passphraseString口令 长度为 8~32位的英文字母+数字
labelString子账户备注 长度20
ipListList虚拟子账户ApiKey ip 白名单, 最大30
permListList子账户apiKey 权限
spot_trade: 现货交易
margin_trade: 现货杠杆交易
contract_trade: 合约交易读写
read:读取权限
返回示例
{
"code": "00000",
"msg": "success",
"requestTime": 1682662465346,
"data": [
{
"subAccountUid": "********",
"subAccountName": "****@*****.com",
"label": "1681808312065",
"apiKey": "xx_xxx",
"secretKey": "xx_xxx",
"permList": [
"contract_trade",
"spot_trade"
],
"ipList": [
"127.0.0.1"
]
}
]
}

返回参数

返回字段参数类型字段说明
subAccountUidString虚拟子账户Uid
subAccountNameString虚拟子账户昵称 长度为8位的英文字母
labelString子账户备注 长度为20位
subAccountApiKeyString子账户apikey
secretKeyString子账户secret key
permListList子账户apiKey 权限
spot_trade: 现货交易
margin_trade: 现货杠杆交易
contract_trade: 合约交易读写
read:读取权限
ipListListip白名单