curl --request POST \
--url https://test.deribit.com/api/v2/private/change_subaccount_name \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 3964,
"method": "private/change_subaccount_name",
"params": {
"sid": 7,
"name": "new_user_1_1"
}
}'{
"jsonrpc": "2.0",
"id": 3964,
"result": "ok"
}Account Management
private/change_subaccount_name
Changes the display name (alias) of a subaccount, or of the authenticated main account itself (pass the main account’s own id as sid). The alias is returned as username in account responses; the system-generated name (system_name), login credentials and account functionality are not affected.
Access & Restrictions:
- Requires scope
account:read_writeandmainaccount, i.e. a main account token. sidmust be the main account itself or one of its own subaccounts. Any other account is rejected with13009(unauthorized); a removed subaccount returns13009withdata.reason=already_removed.- Vault subaccounts are rejected with
14049(vault_subaccount_not_allowed). - Also rejected for accounts without subaccount management (
13009), retail brokers (14021) and locked accounts (11098).
Name rules (applied after trimming leading and trailing whitespace):
- 5 to 80 characters.
- Only Latin-1 (ISO 8859-1) characters; control characters and the soft hyphen are rejected.
- Must be unique among the main account and its active subaccounts. This includes the target’s current name, so re-submitting it fails with
already_taken. - Must not match the reserved auto-generated pattern
<main_username>_<number>(or<main_username>_vault_<number>). - Setting the name to the account’s own
system_nameclears a previously set alias.
Errors: an invalid name returns 12002 (wrong_subaccount_name) with data = already_taken, wrong_format (invalid characters or reserved pattern), or {"msg": "too_short" | "too_long", "size": <limit>}. 12002 may also be returned without data.
📖 Related Article: Managing Subaccounts
Scope: account:read_write and mainaccount
curl --request POST \
--url https://test.deribit.com/api/v2/private/change_subaccount_name \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 3964,
"method": "private/change_subaccount_name",
"params": {
"sid": 7,
"name": "new_user_1_1"
}
}'{
"jsonrpc": "2.0",
"id": 3964,
"result": "ok"
}Query Parameters
Was this page helpful?