Change Sub Account Api Permission
HTTP Request
POST /sapi/v1/broker/subAccountApi/permission
Request Parameters
| Name | Type | Mandatory | Description |
|---|---|---|---|
| subAccountId | STRING | YES | |
| subAccountApiKey | STRING | YES | |
| canTrade | ENUM | YES | |
| marginTrade | ENUM | YES | |
| futuresTrade | ENUM | YES | |
| recvWindow | LONG | NO | |
| timestamp | LONG | YES |
Caution:
- This request will change the api permission for a sub account.
- You need to enable "trade" option for the api key which requests this endpoint.
- Sub account should be enable
marginbefore its api-key'smarginTradebeing enabled. - Sub account should be enable
futuresbefore its api-key'sfuturesTradebeing enabled.
Example Response
{
"subaccountId": "1",
"apikey":"vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A",
"canTrade": true,
"marginTrade": true,
"futuresTrade": true
}