curl --request POST \
--url https://whitebit.com/api/v4/sub-account/create \
--header 'Content-Type: application/json' \
--header 'X-TXC-APIKEY: <api-key>' \
--header 'X-TXC-PAYLOAD: <api-key>' \
--header 'X-TXC-SIGNATURE: <api-key>' \
--data '
{
"alias": "trading_bot",
"permissions": {
"spotEnabled": true,
"collateralEnabled": false,
"depositsEnabled": false,
"withdrawsEnabled": false
},
"email": "sub@example.com",
"shareKyc": false
}
'import requests
url = "https://whitebit.com/api/v4/sub-account/create"
payload = {
"alias": "trading_bot",
"permissions": {
"spotEnabled": True,
"collateralEnabled": False,
"depositsEnabled": False,
"withdrawsEnabled": False
},
"email": "sub@example.com",
"shareKyc": False
}
headers = {
"X-TXC-APIKEY": "<api-key>",
"X-TXC-PAYLOAD": "<api-key>",
"X-TXC-SIGNATURE": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-TXC-APIKEY': '<api-key>',
'X-TXC-PAYLOAD': '<api-key>',
'X-TXC-SIGNATURE': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
alias: 'trading_bot',
permissions: {
spotEnabled: true,
collateralEnabled: false,
depositsEnabled: false,
withdrawsEnabled: false
},
email: 'sub@example.com',
shareKyc: false
})
};
fetch('https://whitebit.com/api/v4/sub-account/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://whitebit.com/api/v4/sub-account/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'alias' => 'trading_bot',
'permissions' => [
'spotEnabled' => true,
'collateralEnabled' => false,
'depositsEnabled' => false,
'withdrawsEnabled' => false
],
'email' => 'sub@example.com',
'shareKyc' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-TXC-APIKEY: <api-key>",
"X-TXC-PAYLOAD: <api-key>",
"X-TXC-SIGNATURE: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://whitebit.com/api/v4/sub-account/create"
payload := strings.NewReader("{\n \"alias\": \"trading_bot\",\n \"permissions\": {\n \"spotEnabled\": true,\n \"collateralEnabled\": false,\n \"depositsEnabled\": false,\n \"withdrawsEnabled\": false\n },\n \"email\": \"sub@example.com\",\n \"shareKyc\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-TXC-APIKEY", "<api-key>")
req.Header.Add("X-TXC-PAYLOAD", "<api-key>")
req.Header.Add("X-TXC-SIGNATURE", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://whitebit.com/api/v4/sub-account/create")
.header("X-TXC-APIKEY", "<api-key>")
.header("X-TXC-PAYLOAD", "<api-key>")
.header("X-TXC-SIGNATURE", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"alias\": \"trading_bot\",\n \"permissions\": {\n \"spotEnabled\": true,\n \"collateralEnabled\": false,\n \"depositsEnabled\": false,\n \"withdrawsEnabled\": false\n },\n \"email\": \"sub@example.com\",\n \"shareKyc\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://whitebit.com/api/v4/sub-account/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-TXC-APIKEY"] = '<api-key>'
request["X-TXC-PAYLOAD"] = '<api-key>'
request["X-TXC-SIGNATURE"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"alias\": \"trading_bot\",\n \"permissions\": {\n \"spotEnabled\": true,\n \"collateralEnabled\": false,\n \"depositsEnabled\": false,\n \"withdrawsEnabled\": false\n },\n \"email\": \"sub@example.com\",\n \"shareKyc\": false\n}"
response = http.request(request)
puts response.read_bodyCreate Sub-Account
The endpoint creates new sub-account.
A main account holds up to 50 sub-accounts by default; the assigned account manager raises the limit on request.
WhiteBIT refuses a create request over the limit on the alias field.
The email field, not shareKyc, decides whether the sub-account is active at creation:
- When
shareKycisfalseor not provided:emailis required. WhiteBIT sends an invitation to that email, and the sub-account stays inactive until the end user opens the link and sets a password. The link expires after three days and can be re-sent on whitebit.com, not through the API. - When
shareKycistrue: leaveemailout. The sub-account is active as soon as the request succeeds and shares the main account’s verification. - A request with
emailstarts the invitation flow even whenshareKycistrue.
A refused request names the cause by field in errors: alias for a duplicate alias, and email for an invalid or temporary (disposable) email address or the main account’s own email. A 422 with “Account creation failed” and no field means the request was valid and the creation failed for an unexpected reason.
Until the end user activates a sub-account created with email, sub-account balances, transfers, transfer history and the KYC URL return 422 with “Account is not confirmed”. Create the sub-account’s API key once List of Sub-Accounts shows its status as active. Activation is a separate step from KYC: transfers from the main account to a sub-account created with shareKyc: false are refused until the end user’s KYC is approved.
On a request with email, spotEnabled and collateralEnabled are kept after activation. Set depositsEnabled and withdrawsEnabled with Edit Sub-Account once List of Sub-Accounts shows the sub-account’s status as active; Edit is refused before activation. Send the sub-account’s alias and the full permissions object: spotEnabled and collateralEnabled with the values used at creation, plus depositsEnabled and withdrawsEnabled. With shareKyc: true and no email, spotEnabled and collateralEnabled apply at creation, and depositsEnabled and withdrawsEnabled go in the same request. See FAQ.
Crypto deposits to sub-accounts are disabled by default. Enablement for the account is not
available via API. To request it, contact the assigned account manager.
Once enabled, a sub-account generates deposit addresses through the standard
deposit-address endpoint
using its own type: 2 API key, after /api/v4/main-account/address is enabled on the key with
Edit Sub-Account API Key (every URL group starts switched off on a new key).
Each sub-account also needs its own deposit permission, depositsEnabled, and withdrawal
permission, withdrawsEnabled.
Rate limit: 1000 requests/10 sec.
The API does not cache the response.
curl --request POST \
--url https://whitebit.com/api/v4/sub-account/create \
--header 'Content-Type: application/json' \
--header 'X-TXC-APIKEY: <api-key>' \
--header 'X-TXC-PAYLOAD: <api-key>' \
--header 'X-TXC-SIGNATURE: <api-key>' \
--data '
{
"alias": "trading_bot",
"permissions": {
"spotEnabled": true,
"collateralEnabled": false,
"depositsEnabled": false,
"withdrawsEnabled": false
},
"email": "sub@example.com",
"shareKyc": false
}
'import requests
url = "https://whitebit.com/api/v4/sub-account/create"
payload = {
"alias": "trading_bot",
"permissions": {
"spotEnabled": True,
"collateralEnabled": False,
"depositsEnabled": False,
"withdrawsEnabled": False
},
"email": "sub@example.com",
"shareKyc": False
}
headers = {
"X-TXC-APIKEY": "<api-key>",
"X-TXC-PAYLOAD": "<api-key>",
"X-TXC-SIGNATURE": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-TXC-APIKEY': '<api-key>',
'X-TXC-PAYLOAD': '<api-key>',
'X-TXC-SIGNATURE': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
alias: 'trading_bot',
permissions: {
spotEnabled: true,
collateralEnabled: false,
depositsEnabled: false,
withdrawsEnabled: false
},
email: 'sub@example.com',
shareKyc: false
})
};
fetch('https://whitebit.com/api/v4/sub-account/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://whitebit.com/api/v4/sub-account/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'alias' => 'trading_bot',
'permissions' => [
'spotEnabled' => true,
'collateralEnabled' => false,
'depositsEnabled' => false,
'withdrawsEnabled' => false
],
'email' => 'sub@example.com',
'shareKyc' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-TXC-APIKEY: <api-key>",
"X-TXC-PAYLOAD: <api-key>",
"X-TXC-SIGNATURE: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://whitebit.com/api/v4/sub-account/create"
payload := strings.NewReader("{\n \"alias\": \"trading_bot\",\n \"permissions\": {\n \"spotEnabled\": true,\n \"collateralEnabled\": false,\n \"depositsEnabled\": false,\n \"withdrawsEnabled\": false\n },\n \"email\": \"sub@example.com\",\n \"shareKyc\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-TXC-APIKEY", "<api-key>")
req.Header.Add("X-TXC-PAYLOAD", "<api-key>")
req.Header.Add("X-TXC-SIGNATURE", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://whitebit.com/api/v4/sub-account/create")
.header("X-TXC-APIKEY", "<api-key>")
.header("X-TXC-PAYLOAD", "<api-key>")
.header("X-TXC-SIGNATURE", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"alias\": \"trading_bot\",\n \"permissions\": {\n \"spotEnabled\": true,\n \"collateralEnabled\": false,\n \"depositsEnabled\": false,\n \"withdrawsEnabled\": false\n },\n \"email\": \"sub@example.com\",\n \"shareKyc\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://whitebit.com/api/v4/sub-account/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-TXC-APIKEY"] = '<api-key>'
request["X-TXC-PAYLOAD"] = '<api-key>'
request["X-TXC-SIGNATURE"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"alias\": \"trading_bot\",\n \"permissions\": {\n \"spotEnabled\": true,\n \"collateralEnabled\": false,\n \"depositsEnabled\": false,\n \"withdrawsEnabled\": false\n },\n \"email\": \"sub@example.com\",\n \"shareKyc\": false\n}"
response = http.request(request)
puts response.read_bodyemail field, not shareKyc, decides whether the sub-account is active at creation:- When
shareKycisfalseor not provided:emailis required. WhiteBIT sends an invitation to that email, and the sub-account stays inactive until the end user opens the link and sets a password. The link expires after three days and can be re-sent on whitebit.com, not through the API. - When
shareKycistrue: leaveemailout. The sub-account is active as soon as the request succeeds and shares the main account’s verification. - A request with
emailstarts the invitation flow even whenshareKycistrue.
Used in these guides
- Embedded Trading sub-account integration — managed sub-accounts, fee-share, and partner onboarding.
- Wallet-as-a-Service integration — sub-accounts as end-user wallets: deposits, payouts, and per-user API keys.
- Yield-as-a-Service integration — Crypto Lending run in a sub-account per end user.
Authorizations
Body
Response
Sub-account created successfully
Was this page helpful?