Skip to main content
POST
/
api
/
v4
/
sub-account
/
api-key
/
create
Create Sub-Account API Key
curl --request POST \
  --url https://whitebit.com/api/v4/sub-account/api-key/create \
  --header 'Content-Type: application/json' \
  --header 'X-TXC-APIKEY: <api-key>' \
  --data '
{
  "type": 1,
  "subAccountId": "8e667b4a-0b71-4988-8af5-9474dbfaeb51",
  "title": "Trading Bot Key"
}
'
{
  "subAccountId": "8e667b4a-0b71-4988-8af5-9474dbfaeb51",
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "title": "Trading Bot Key",
  "isEnabled": true,
  "apiKey": "pub-key-abc123",
  "apiSecret": "secret-xyz789",
  "type": 1,
  "lastActivity": 1641081600,
  "restrictAccess": false,
  "accessEndpoints": [
    {
      "name": "/api/v4/main-account/balance",
      "title": "Get Balance"
    }
  ]
}

Authorizations

X-TXC-APIKEY
string
header
required

API key authentication using signed requests

Body

application/json
type
enum<integer>
required

Type of API key (1 - info and trading; 2 - info, trading, deposits, withdraws)

Available options:
1,
2
Example:

1

subAccountId
string
required

ID of the sub-account to create the API key for

Example:

"8e667b4a-0b71-4988-8af5-9474dbfaeb51"

title
string

Custom title/name for the API key

Example:

"Trading Bot Key"

Response

API key created successfully

subAccountId
string

Sub-account identifier

Example:

"8e667b4a-0b71-4988-8af5-9474dbfaeb51"

id
string

API key identifier

Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

title
string

API key title/name

Example:

"Trading Bot Key"

isEnabled
boolean

Whether the API key is enabled

Example:

true

apiKey
string

API key

Example:

"pub-key-abc123"

apiSecret
string

API secret

Example:

"secret-xyz789"

type
integer

API key type (1 - info and trading, 2 - info, trading, deposit and withdraw)

Example:

1

lastActivity
integer

Last activity timestamp

Example:

1641081600

restrictAccess
boolean

Whether access is restricted

Example:

false

accessEndpoints
object[]

List of allowed endpoints