Skip to main content

Modify Sub-account API Key Permission (For Master Account) (USER_DATA)

API Description​

Modify the trading permissions of a sub-account API Key.

HTTP Request​

POST /sapi/v1/sub-account/subAccountApiPermission

Request Weight(UID)​

3000

Request Parameters​

NameTypeMandatoryDescription
emailSTRINGYESSub-account email
subAccountApiKeySTRINGYESSub-account API Key
canTradeBOOLEANNOSpot & Margin trading permission
canMarginLoanRepayBOOLEANNOMargin borrow/repay permission
canFuturesTradeBOOLEANNOFutures trading permission
canUniversalTransferBOOLEANNOUniversal transfer permission
canVanillaOptionsBOOLEANNOVanilla options permission
canFixApiTradingBOOLEANNOFIX API Trading permission. If omitted, the existing value is unchanged. Only supported for API Keys using an Ed25519 public key. Setting it to true for any other key type returns -9000 Unsupported operation
canFixApiReadingBOOLEANNOFIX API Reading permission. If omitted, the existing value is unchanged. Only supported for API Keys using an Ed25519 public key. Setting it to true for any other key type returns -9000 Unsupported operation
recvWindowLONGNO
timestampLONGYES
  • Portfolio Margin Retail User is not supported
  • Asset Sub Account is not supported
  • The caller must pass the KYC IP restriction check

Response Example​

{
"apiName": "myKey",
"apikey": "vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A",
"canTrade": true,
"canMarginLoanRepay": false,
"canFuturesTrade": true,
"canUniversalTransfer": false,
"canVanillaOptions": false,
"canFixApiTrading": true,
"canFixApiReading": false,
"timestamp": 1640000000000
}

Response Parameters​

NameTypeDescription
apiNameSTRINGAPI Key name
apikeySTRINGAPI Key value
canTradeBOOLEANSpot & Margin trading permission
canMarginLoanRepayBOOLEANMargin borrow/repay permission
canFuturesTradeBOOLEANFutures trading permission
canUniversalTransferBOOLEANUniversal transfer permission
canVanillaOptionsBOOLEANVanilla options permission
canFixApiTradingBOOLEANFIX API Trading permission
canFixApiReadingBOOLEANFIX API Reading permission
timestampLONGUpdate timestamp (ms)