Create Virtual Subaccount Apikey
Frequency limit: 5 times/1s (User ID)
Description
Create the virtual sub-account apikey
HTTP request
- POST /api/v2/user/create-virtual-subaccount-apikey
Request Example
curl -X POST "https://api.bitget.com/api/v2/user/create-virtual-subaccount-apikey" \
-H "ACCESS-KEY:*******" \
-H "ACCESS-SIGN:*" \
-H "ACCESS-PASSPHRASE:*" \
-H "ACCESS-TIMESTAMP:1659076670000" \
-H "locale:en-US" \
-H "Content-Type: application/json" \ -d \'{
"subAccountUid":"342343223423",
"passphrase":"pssword1",
"label":"test1_account",
"permList":[
"spot_trade"
]
}'
Request parameters
Parameter | Type | Required | Description |
---|---|---|---|
subAccountUid | String | Yes | Sub-account uid |
passphrase | String | Yes | Passcode English letters of 8−32 characters + numbers |
label | String | Yes | Note Length 20 |
ipList | List<String> | No | ip whitelist Up to 30, if not then ip whitelist is set to empty. |
permType | String | No | Permission type read_and_write readonly |
permList | List<String> | No | apikey permissions contract_order Futures order contract_position Contract position spot_trade Spot trade margin_trade Spot margin trading copytrading_trade Copy trading wallet_transfer Wallet transfer wallet_withdraw Wallet withdraw Wallet withdrawals are invalid when the read-only permission type is selected, and there is no read-only permission for withdrawing coins. |
Response Example
{
"code": "00000",
"msg": "success",
"data": {
"subAccountUid": "58281113",
"label": "sub api",
"subAccountApiKey": "bg_djwwwls98a1s0dLK3deq2",
"secretKey": "Sjwwwls98a1s0dLK3deq2",
"permList": [
"contract_order",
"contract_position",
"spot_trade"
],
"ipList": [
"127.127.127.127"
]
}
}
Response Parameters
Parameter | Type | Description |
---|---|---|
subAccountUid | String | Sub-account uid |
subAccountApiKey | String | Sub-account apikey |
secretKey | String | Sub-account private key |
permList | List | Sub-account apikey permissions contract_order Futures order contract_position Contract position spot_trade Spot trade margin_trade Spot margin trading copytrading_trade Copy trading wallet_transfer Wallet transfer wallet_withdraw Wallet withdraw Wallet withdrawals are invalid when the read-only permission type is selected, and there is no read-only permission for withdrawing coins. |
label | String | Sub-account apikey note |
ipList | List | ip whitelist |