创建子账户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"]}'
请求参数
参数名 | 参数类型 | 是否必须 | 描述 |
---|---|---|---|
subUid | String | 是 | 子账户uid |
passphrase | String | 是 | Passphrase 是调用 API 接口的必要参数,如果遗失请重新创建API key |
label | String | 否 | 备注 |
ipList | List<String> | 是 | IP数组,最多传入30个 当 permType 为readonly 时为非必填 |
permType | String | 是 | 权限类型: read_and_write 读写权限 readonly 只读权限 |
permList | List<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"]
}
}
返回参数
返回字段 | 参数类型 | 字段说明 |
---|---|---|
subUid | String | 子账户uid |
label | String | apikey备注 |
apikey | String | apikey |
secretKey | String | 私钥 |
permType | String | 权限类型: read_and_write 读写权限 readonly 只读权限 |
permList | List<String> | 权限数组,权限枚举: contract_order 合约订单 contract_position 合约持仓 spot_trade 现货交易 margin_trade 现货杠杆交易 copytrading_trade 跟单交易 wallet_transfer 钱包划转 |
ipList | List<String> | IP数组 |