Skip to main content

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

ParameterTypeRequiredDescription
subAccountUidStringYesSub-account uid
passphraseStringYesPasscode English letters of 832 characters + numbers
labelStringYesNote Length 20
ipListList<String>Noip whitelist
Up to 30, if not then ip whitelist is set to empty.
permTypeStringNoPermission type
read_and_write
readonly
permListList<String>Noapikey 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

ParameterTypeDescription
subAccountUidStringSub-account uid
subAccountApiKeyStringSub-account apikey
secretKeyStringSub-account private key
permListListSub-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.
labelStringSub-account apikey note
ipListListip whitelist