v1

latestOpenAPI 3.0.32026-07-2613529376.3 KB
Sub-Account API Keys

Create Sub-Account API Key

The endpoint creates a new API key for a sub-account. Each sub-account supports up to 50 API keys, independent from the main account and from other sub-accounts.

<Note> A `type: 2` key carries deposit and withdrawal permissions, but crypto deposits must also be enabled for the account. Deposits are disabled by default — to enable them, contact your assigned Account Manager or email institutional@whitebit.com. </Note> <Warning> Rate limit: 1000 requests/10 sec. </Warning> <Note> The API does not cache the response. </Note>
post/api/v4/sub-account/api-key/create

Request body

type1 | 2 required

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

subAccountIdstring required

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

titlestring

Custom title/name for the API key

Example request

{
  "type": 1,
  "subAccountId": "8e667b4a-0b71-4988-8af5-9474dbfaeb51",
  "title": "Trading Bot Key"
}

Response

API key created successfully

subAccountIdstring

Sub-account identifier

idstring

API key identifier

titlestring

API key title/name

isEnabledboolean

Whether the API key is enabled

apiKeystring

API key

apiSecretstring

API secret

typeinteger

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

lastActivityinteger

Last activity timestamp

restrictAccessboolean

Whether access is restricted

Example response

{
  "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,
  "accessEndpoints": [
    {
      "name": "/api/v4/main-account/balance",
      "title": "Get Balance"
    }
  ]
}