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
| Name | Type | Mandatory | Description |
|---|---|---|---|
| STRING | YES | Sub-account email | |
| subAccountApiKey | STRING | YES | Sub-account API Key |
| canTrade | BOOLEAN | NO | Spot & Margin trading permission |
| canMarginLoanRepay | BOOLEAN | NO | Margin borrow/repay permission |
| canFuturesTrade | BOOLEAN | NO | Futures trading permission |
| canUniversalTransfer | BOOLEAN | NO | Universal transfer permission |
| canVanillaOptions | BOOLEAN | NO | Vanilla options permission |
| canFixApiTrading | BOOLEAN | NO | FIX 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 |
| canFixApiReading | BOOLEAN | NO | FIX 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 |
| recvWindow | LONG | NO | |
| timestamp | LONG | YES |
- 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
| Name | Type | Description |
|---|---|---|
| apiName | STRING | API Key name |
| apikey | STRING | API Key value |
| canTrade | BOOLEAN | Spot & Margin trading permission |
| canMarginLoanRepay | BOOLEAN | Margin borrow/repay permission |
| canFuturesTrade | BOOLEAN | Futures trading permission |
| canUniversalTransfer | BOOLEAN | Universal transfer permission |
| canVanillaOptions | BOOLEAN | Vanilla options permission |
| canFixApiTrading | BOOLEAN | FIX API Trading permission |
| canFixApiReading | BOOLEAN | FIX API Reading permission |
| timestamp | LONG | Update timestamp (ms) |