Skip to main content

Create Sub-Account API KEY

Info
  • This endpoint requires signature. For specific signature rules, please refer to Authentication
  • This endpoint will trigger rate limit. For specific rules, please refer to Rate Limit.
Reminder
  • This endpoint can only be accessed using the ACCESS ID of the main account
  • API Administrative Permission is required for the sub-account before it can create APIKEY
  • Each sub-account can create up to 50 API KEY

HTTP request

POST /account/subs/api

Request parameters

Parameter NameRequiredTypeNotes
sub_user_nametruestringSub-account username
ip_whitelisttrue[]stringThe IP whitelist bound to API KEY.
  • Up to 50 IPs can be bound.
trade_enabledtrueboolWhether the API KEY has trading permissions
remarkfalsestringAPI KEY note.
  • The length of the note cannot exceed 50 characters.

Return parameters

Parameter NameTypeNotes
api_idintUnique ID for API KEY.
created_atintData creation time
access_idstringaccess_id of the key pair
secret_keystringsecret_key of the key pair
ip_whitelist[]stringThe IP whitelist bound to API KEY.
trade_enabledboolWhether the API KEY has trading permissions.
withdraw_enabledboolWhether the API KEY has withdrawal permissions.
is_expiredboolWhether the API KEY has expired.
  • If the IP whitelist has been bound, the API KEY will never expire.
  • If the IP whitelist is not bound, the API KEY is valid for three months.
expires_atintExpiration time of API KEY.
  • 0 means the API KEY is permanently valid.
remarkstringAPI KEY note

Request example

{
"sub_user_name": "sub1",
"trade_enabled": true,
"ip_whitelist": [
"1.1.1.1",
"1.1.1.2"
],
"remark": "test"
}

Response example

{
"code": 0,
"data": {
"api_id": 554,
"created_at": 1642145331234,
"access_id": "xxxxxxxxxx",
"secret_key": "xxxxxx",
"ip_whitelist": [
"1.1.1.1",
"1.1.1.2"
],
"trade_enabled": true,
"withdraw_enabled": false,
"is_expired": false,
"expires_at": 0,
"remark": "spot market maker"

},
"message": "OK"
}