Create Api Key for Sub Account
HTTP Request
POST /sapi/v1/broker/subAccountApi
Weight(IP)
8
Weight(Master Account)
3000
Request Parameters
Name | Type | Mandatory | Description |
---|---|---|---|
subAccountId | STRING | YES | |
canTrade | ENUM | YES | spot trade |
marginTrade | ENUM | NO | margin trade |
futuresTrade | ENUM | NO | futures trade |
recvWindow | LONG | NO | |
timestamp | LONG | YES |
Caution:
- This request will generate a api key for a sub account.
- You need to enable "trade" option for the api key which requests this endpoint
- Sub account should be enable
margin
before its api-key'smarginTrade
being enabled - Sub account should be enable
futures
before its api-key'sfuturesTrade
being enabled - You can only create 1 api key for each sub account per second
Example Response
{
"subaccountId": "1",
"apiKey":"vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A",
"secretKey":"NhqPtmdSJYdKjVHjA7PZj4Mge3R5YNiP1e3UZjInClVN65XAbvqqM6A7H5fATj0",
"canTrade": true,
"marginTrade": false,
"futuresTrade": false
}