Skip to main content
cURL
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"
    }
  ]
}

Query Parameters

with_portfolio
boolean

Portfolio flag: true for portfolio information, false for subaccount information only. false by default

Example:

true

Response

Success response

jsonrpc
enum<string>
required

The JSON-RPC version (2.0)

Available options:
2.0
result
object[]
required
id
integer

The id that was sent in the request