cURL
curl --request POST \
--url https://test.deribit.com/api/v2/private/set_email_for_subaccount \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 1667,
"method": "private/set_email_for_subaccount",
"params": {
"sid": 7,
"email": "user_1_1@email.com"
}
}'{
"jsonrpc": "2.0",
"id": 1667,
"result": "ok"
}Account Management
private/set_email_for_subaccount
Assigns an email address to a subaccount. This email is used for direct login to the subaccount and for receiving notifications.
Behavior:
- Normally the address is not applied immediately: a verification email with a confirmation link is sent to it, and it can be used for login only after it is confirmed.
- Two changes are applied immediately, without a verification email: setting the main account’s own email (the subaccount returns to the main email and its direct login is disabled), and setting the subaccount’s current confirmed email while another change is pending (the pending change is cancelled).
- Every successful change terminates all active sessions of the subaccount.
- An address that is already registered to another account does not produce an error: the call returns
okwithout revealing whether the address exists, and the address is not assigned. - An address already used by another subaccount of the same main account returns
-32602(Invalid params) withdata.subaccount_idof that subaccount.
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 with14049. - Also rejected for accounts without subaccount management (
13009), retail brokers (14021) and locked accounts (11098).
Validation & Limits:
- Maximum email length is 64 characters; a longer address returns
-32602withmax_length. 11043(bad_argument) withdata=email_wrong_format,email_blocked,empty_email_address,invalid_email_domainorsame_email(the address equals the current email and no change is pending).- Changes are rate limited per subaccount:
10028(too_many_requests) with the time to wait indata.wait(seconds).
📖 Related Article: Managing Subaccounts
Scope: account:read_write
cURL
curl --request POST \
--url https://test.deribit.com/api/v2/private/set_email_for_subaccount \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 1667,
"method": "private/set_email_for_subaccount",
"params": {
"sid": 7,
"email": "user_1_1@email.com"
}
}'{
"jsonrpc": "2.0",
"id": 1667,
"result": "ok"
}Query Parameters
Was this page helpful?