跳到主要内容

Create Api Key for Sub Account

HTTP Request

POST /sapi/v1/broker/subAccountApi

Weight(IP)

8

Weight(Master Account)

3000

Request Parameters

NameTypeMandatoryDescription
subAccountIdSTRINGYES
canTradeENUMYESspot trade
marginTradeENUMNOmargin trade
futuresTradeENUMNOfutures trade
recvWindowLONGNO
timestampLONGYES

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's marginTrade being enabled
  • Sub account should be enable futures before its api-key's futuresTrade 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
}