跳到主要内容

创建子账户API key

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

描述

独立经纪商母账户创建子账户ApiKey ,仅限主账户请求

HTTP请求

  • POST /api/v2/broker/manage/create-subaccount-apikey
请求示例
curl -X POST "https://api.bitget.com/api/v2/broker/manage/create-subaccount-apikey" \
-H "ACCESS-KEY:your apiKey" \
-H "ACCESS-SIGN:*" \
-H "ACCESS-PASSPHRASE:*" \
-H "ACCESS-TIMESTAMP:1659076670000" \
-H "locale:zh-CN" \
-H "Content-Type: application/json" \
-d '{"subUid": "12345678","passphrase": "12345678","label": " old remark ","ipList":["127.0.0.1"],"permType": "readonly","permList":["spot_trade"]}'

请求参数

参数名参数类型是否必须描述
subUidString子账户uid
passphraseStringPassphrase 是调用 API 接口的必要参数,如果遗失请重新创建API key
labelString备注
ipListList<String>IP数组,最多传入30个
permTypereadonly时为非必填
permTypeString权限类型:
read_and_write 读写权限
readonly 只读权限
permListList<String>选择只读权限类型时传入钱包提币无效,提币没有只读权限
权限数组,权限枚举:
contract_order 合约订单
contract_position 合约持仓
spot_trade 现货交易
margin_trade 现货杠杆交易
copytrading_trade 跟单交易
wallet_transfer 钱包划转(permType需要为read_and_write类型)
返回示例
{
"code": "00000",
"msg": "success",
"requestTime": 1695785738672,
"data": {
"subUid": "************",
"apiKey": "bg_****************",
"secretKey": "xxxxxx",
"label": " old remark ",
"ipList":["127.0.0.1"],
"permType": "readonly",
"permList":["spot_trade"]
}
}

返回参数

返回字段参数类型字段说明
subUidString子账户uid
labelStringapikey备注
apikeyStringapikey
secretKeyString私钥
permTypeString权限类型:
read_and_write 读写权限
readonly 只读权限
permListList<String>权限数组,权限枚举:
contract_order 合约订单
contract_position 合约持仓
spot_trade 现货交易
margin_trade 现货杠杆交易
copytrading_trade 跟单交易
wallet_transfer 钱包划转
ipListList<String>IP数组