Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.whitebit.com/llms.txt

Use this file to discover all available pages before exploring further.

Each sub-account holds its own balance and API keys. Funds and signing scopes are isolated from the main account; transfers between them are explicit and fee-free. The four steps below set up that isolation, from creation through balance verification.

Prerequisites

  • A WhiteBIT account with completed KYC (register)
  • An API key with Trade permission and sub-account management capability (create key)
  • Funds in Main balance (sub-account transfers draw from Main balance)
  • HMAC-SHA512 signing configured (authentication guide)
  • curl and jq installed (for command-line examples)
1

Create a sub-account

Create a new sub-account with an alias and permissions.
curl -X POST https://whitebit.com/api/v4/sub-account/create \
  -H "Content-Type: application/json" \
  -H "X-TXC-APIKEY: YOUR_API_KEY" \
  -H "X-TXC-PAYLOAD: YOUR_PAYLOAD" \
  -H "X-TXC-SIGNATURE: YOUR_SIGNATURE" \
  -d '{
    "alias": "strategy-alpha",
    "email": "strategy-alpha@example.com",
    "permissions": {"spotEnabled": true, "collateralEnabled": false},
    "request": "/api/v4/sub-account/create",
    "nonce": "1709340000000"
  }'
For Go and PHP examples, see SDKs.Required fields: alias (display name), permissions (object with spotEnabled and collateralEnabled). When shareKyc is false or omitted, email is also required.Expected response:
{
  "id": "8e667b4a-0b71-4988-8af5-9474dbfaeb51",
  "alias": "strategy-alpha",
  "userId": "u-12345",
  "email": "s***@example.com",
  "status": "active",
  "color": "#FF5733",
  "kyc": {
    "shareKyc": false,
    "kycStatus": "verified"
  },
  "permissions": {
    "spotEnabled": true,
    "collateralEnabled": false
  }
}
Save the id value for subsequent steps.
2

Transfer funds to the sub-account

Move assets from the main account to the newly created sub-account.
curl -X POST https://whitebit.com/api/v4/sub-account/transfer \
  -H "Content-Type: application/json" \
  -H "X-TXC-APIKEY: YOUR_API_KEY" \
  -H "X-TXC-PAYLOAD: YOUR_PAYLOAD" \
  -H "X-TXC-SIGNATURE: YOUR_SIGNATURE" \
  -d '{
    "id": "<sub-account-id-from-step-1>",
    "direction": "main_to_sub",
    "ticker": "USDT",
    "amount": "100",
    "request": "/api/v4/sub-account/transfer",
    "nonce": "1709340000001"
  }'
Required fields: id (sub-account UUID), direction (main_to_sub or sub_to_main), ticker, amount. Transfers are instant and fee-free.Expected response:
{
  "transaction_id": "tx_..."
}
3

Create an API key for the sub-account

Generate a dedicated API key for the sub-account to enable independent trading.
curl -X POST https://whitebit.com/api/v4/sub-account/api-key/create \
  -H "Content-Type: application/json" \
  -H "X-TXC-APIKEY: YOUR_API_KEY" \
  -H "X-TXC-PAYLOAD: YOUR_PAYLOAD" \
  -H "X-TXC-SIGNATURE: YOUR_SIGNATURE" \
  -d '{
    "subAccountId": "<sub-account-id-from-step-1>",
    "type": 1,
    "title": "Trading Bot Key",
    "request": "/api/v4/sub-account/api-key/create",
    "nonce": "1709340000002"
  }'
Required fields: subAccountId (UUID), type (1 = info and trading, 2 = info, trading, deposits, withdrawals). Optional: title (custom name for the key).
Save the secretKey immediately — the API does not return the secret key again after creation.
4

Check sub-account balances

Verify that the transferred funds appear in the sub-account balance.
curl -X POST https://whitebit.com/api/v4/sub-account/balances \
  -H "Content-Type: application/json" \
  -H "X-TXC-APIKEY: YOUR_API_KEY" \
  -H "X-TXC-PAYLOAD: YOUR_PAYLOAD" \
  -H "X-TXC-SIGNATURE: YOUR_SIGNATURE" \
  -d '{
    "id": "<sub-account-id-from-step-1>",
    "request": "/api/v4/sub-account/balances",
    "nonce": "1709340000003"
  }'
Expected response:
{
  "USDT": [
    {
      "main": "100",
      "spot": "0",
      "collateral": "0"
    }
  ]
}
The response keys ticker symbols to an array of balance objects. main, spot, and collateral show available funds in each balance type for the sub-account.
The sub-account now has an isolated balance and a dedicated API key. To restrict the key to known IPs, call POST /api/v4/sub-account/api-key/ip-address/create with the whitelist.

What’s Next

Sub-Accounts Overview

Integration patterns for fund managers, brokers, and prop trading firms.

Broker Guide

Fee share model up to 50%, sub-account-per-customer onboarding, KYC URL generation, and per-customer API keys with up to 50 IP addresses.
For Go and PHP examples, see SDKs.