curl --request GET \
--url https://test.deribit.com/api/v2/private/get_subaccounts \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 4947,
"method": "private/get_subaccounts",
"params": {
"with_portfolio": true
}
}
'{
"jsonrpc": "2.0",
"id": 4947,
"result": [
{
"email": "user_AAA@email.com",
"id": 2,
"is_password": true,
"margin_model": "segregated_sm",
"login_enabled": true,
"portfolio": {
"eth": {
"additional_reserve": 0,
"spot_reserve": 0,
"available_funds": 5,
"available_withdrawal_funds": 5,
"balance": 5,
"currency": "eth",
"equity": 5,
"initial_margin": 0,
"maintenance_margin": 0,
"margin_balance": 5
},
"btc": {
"additional_reserve": 0,
"spot_reserve": 0,
"available_funds": 5.000413075,
"available_withdrawal_funds": 5.000413075,
"balance": 5.000593987,
"currency": "btc",
"equity": 5.000571846,
"initial_margin": 0.000158771,
"maintenance_margin": 0.000115715,
"margin_balance": 5.000571846
}
},
"receive_notifications": false,
"system_name": "user_1",
"security_keys_enabled": false,
"security_keys_assignments": [],
"type": "main",
"username": "user_1"
},
{
"email": "user_AAA@gmail.com",
"id": 7,
"is_password": true,
"margin_model": "cross_pm",
"login_enabled": false,
"portfolio": {
"eth": {
"additional_reserve": 0,
"spot_reserve": 0,
"available_funds": 0,
"available_withdrawal_funds": 0,
"balance": 0,
"currency": "eth",
"equity": 0,
"initial_margin": 0,
"maintenance_margin": 0,
"margin_balance": 0
},
"btc": {
"additional_reserve": 0,
"spot_reserve": 0,
"available_funds": 0,
"available_withdrawal_funds": 0,
"balance": 0,
"currency": "btc",
"equity": 0,
"initial_margin": 0,
"maintenance_margin": 0,
"margin_balance": 0
}
},
"receive_notifications": false,
"system_name": "user_1_1",
"security_keys_enabled": false,
"security_keys_assignments": [],
"type": "subaccount",
"username": "user_1_1"
}
]
}Get information about subaccounts. When called from subaccount, the response will include limited details for the main account and details for the subaccount initiating the request. The portfolio information will be included in the response only if the with_portfolio parameter is set to true.
Scope: account:read
curl --request GET \
--url https://test.deribit.com/api/v2/private/get_subaccounts \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 4947,
"method": "private/get_subaccounts",
"params": {
"with_portfolio": true
}
}
'{
"jsonrpc": "2.0",
"id": 4947,
"result": [
{
"email": "user_AAA@email.com",
"id": 2,
"is_password": true,
"margin_model": "segregated_sm",
"login_enabled": true,
"portfolio": {
"eth": {
"additional_reserve": 0,
"spot_reserve": 0,
"available_funds": 5,
"available_withdrawal_funds": 5,
"balance": 5,
"currency": "eth",
"equity": 5,
"initial_margin": 0,
"maintenance_margin": 0,
"margin_balance": 5
},
"btc": {
"additional_reserve": 0,
"spot_reserve": 0,
"available_funds": 5.000413075,
"available_withdrawal_funds": 5.000413075,
"balance": 5.000593987,
"currency": "btc",
"equity": 5.000571846,
"initial_margin": 0.000158771,
"maintenance_margin": 0.000115715,
"margin_balance": 5.000571846
}
},
"receive_notifications": false,
"system_name": "user_1",
"security_keys_enabled": false,
"security_keys_assignments": [],
"type": "main",
"username": "user_1"
},
{
"email": "user_AAA@gmail.com",
"id": 7,
"is_password": true,
"margin_model": "cross_pm",
"login_enabled": false,
"portfolio": {
"eth": {
"additional_reserve": 0,
"spot_reserve": 0,
"available_funds": 0,
"available_withdrawal_funds": 0,
"balance": 0,
"currency": "eth",
"equity": 0,
"initial_margin": 0,
"maintenance_margin": 0,
"margin_balance": 0
},
"btc": {
"additional_reserve": 0,
"spot_reserve": 0,
"available_funds": 0,
"available_withdrawal_funds": 0,
"balance": 0,
"currency": "btc",
"equity": 0,
"initial_margin": 0,
"maintenance_margin": 0,
"margin_balance": 0
}
},
"receive_notifications": false,
"system_name": "user_1_1",
"security_keys_enabled": false,
"security_keys_assignments": [],
"type": "subaccount",
"username": "user_1_1"
}
]
}Portfolio flag: true for portfolio information, false for subaccount information only. false by default
true
Was this page helpful?