curl --request POST \
--url https://test.deribit.com/api/v2/private/toggle_subaccount_login \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 938,
"method": "private/toggle_subaccount_login",
"params": {
"sid": 7,
"state": "enable"
}
}'{
"jsonrpc": "2.0",
"id": 938,
"result": "ok"
}private/toggle_subaccount_login
Enables or disables direct login access for a subaccount. When login is disabled, the subaccount cannot be accessed directly using email and password authentication, but can still be accessed through the main account.
If login is disabled while an active session exists for the subaccount, that session will be immediately terminated (all sessions of the subaccount are dropped). Requesting the state the subaccount already has is accepted and returns ok.
Access & Restrictions:
- Must be called by the main account that owns the subaccount (
sid). 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). statemust beenableordisable; any other value returns11043(bad_argument) withdata=state.
Enabling login additionally requires:
- no email change pending for the subaccount;
- an email address different from the main account’s email;
- a password configured for the subaccount.
Known limitation: if one of these conditions is not met, the call currently returns ok but login stays disabled. Check login_enabled in private/get_subaccounts to confirm the change.
📖 Related Article: Managing Subaccounts
Scope: account:read_write
curl --request POST \
--url https://test.deribit.com/api/v2/private/toggle_subaccount_login \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 938,
"method": "private/toggle_subaccount_login",
"params": {
"sid": 7,
"state": "enable"
}
}'{
"jsonrpc": "2.0",
"id": 938,
"result": "ok"
}Query Parameters
Was this page helpful?