> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cdp.coinbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# private/get_subaccounts

> Retrieves information about all subaccounts associated with the main account. Returns details such as subaccount IDs, names, and status.

When called from a subaccount, the response includes limited details for the main account and full details for the subaccount initiating the request.

Set the `with_portfolio` parameter to `true` to include portfolio information (balances, positions, etc.) in the response. By default, only subaccount metadata is returned.

**📖 Related Article:** [Managing Subaccounts](https://docs.deribit.com/articles/managing-subaccounts-api)

[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_subaccounts)





## OpenAPI

````yaml /api-reference/coinbase-deribit-app-api/adv-starbase-openapi.json get /private/get_subaccounts
openapi: 3.1.0
info:
  description: Coinbase Retail Advanced Trade API for derivatives trading.
  title: Coinbase Retail Advanced Trade (Deribit) API
  version: 2.1.1
servers:
  - url: https://drb.coinbase.com/api/v2
security: []
tags:
  - description: Can only be used over websockets.
    name: WebSocket Only
  - description: Public methods can be used without authentication.
    name: Public
  - description: >-
      <p>Private methods require authentication. All requests must include a
      valid OAuth2 token.</p>

      <p>A token can be requested using the <a
      href="#public-auth">/public/auth</a> method.</p>

      <p>When using the websockets protocol, the token must be included as a
      parameter <code>access_token</code> in the message. When using REST (HTTP
      GET), the token may also be passed in the <code>Authorization</code>
      header.</p>
    name: Private
  - name: Authentication
  - name: Session Management
  - description: >-
      Subscription works as [notifications](#notifications), so users will
      automatically (after subscribing) receive messages from the server.
      Overview for each channel response format is described in
      [subscriptions](#subscriptions) section.
    name: Subscription Management
  - name: Account Management
  - name: Trading
  - name: Market Data
  - name: Wallet
paths:
  /private/get_subaccounts:
    get:
      tags:
        - Account Management
        - Private
      description: >+
        Retrieves information about all subaccounts associated with the main
        account. Returns details such as subaccount IDs, names, and status.


        When called from a subaccount, the response includes limited details for
        the main account and full details for the subaccount initiating the
        request.


        Set the `with_portfolio` parameter to `true` to include portfolio
        information (balances, positions, etc.) in the response. By default,
        only subaccount metadata is returned.


        **📖 Related Article:** [Managing
        Subaccounts](https://docs.deribit.com/articles/managing-subaccounts-api)


        [Try in API
        console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_subaccounts)

      parameters:
        - name: with_portfolio
          in: query
          description: >-
            Portfolio flag: `true` for portfolio information, `false` for
            subaccount information only. `false` by default
          required: false
          schema:
            type: boolean
            example: true
        - name: include_isolated
          in: query
          description: >-
            If true, includes hidden managed isolated-margin subaccounts in the
            response. Isolated subaccount entries include `isolated: true` and
            `isolated_margin_instrument`. Default - `false`
          required: false
          schema:
            type: boolean
            default: false
      requestBody:
        description: JSON-RPC request body
        content:
          application/json:
            examples:
              request:
                description: JSON-RPC Request Example
                value:
                  id: 4947
                  jsonrpc: '2.0'
                  method: private/get_subaccounts
                  params:
                    with_portfolio: true
      responses:
        '200':
          $ref: '#/components/responses/PrivateGetSubaccountsResponse'
        '401':
          $ref: '#/components/responses/ErrorMessageResponse'
      security:
        - ApiKey:
            - view
        - OAuth2:
            - wallet:accounts:read
components:
  responses:
    PrivateGetSubaccountsResponse:
      description: Success response
      content:
        application/json:
          examples:
            response:
              description: Response example
              value:
                id: 4947
                jsonrpc: '2.0'
                result:
                  - email: user_AAA@email.com
                    id: 2
                    is_password: true
                    login_enabled: true
                    margin_model: segregated_sm
                    portfolio:
                      btc:
                        additional_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
                        spot_reserve: 0
                      eth:
                        additional_reserve: 0
                        available_funds: 5
                        available_withdrawal_funds: 5
                        balance: 5
                        currency: eth
                        equity: 5
                        initial_margin: 0
                        maintenance_margin: 0
                        margin_balance: 5
                        spot_reserve: 0
                    receive_notifications: false
                    security_keys_assignments: []
                    security_keys_enabled: false
                    system_name: user_1
                    type: main
                    username: user_1
                  - email: user_AAA@gmail.com
                    id: 7
                    is_password: true
                    login_enabled: false
                    margin_model: cross_pm
                    portfolio:
                      btc:
                        additional_reserve: 0
                        available_funds: 0
                        available_withdrawal_funds: 0
                        balance: 0
                        currency: btc
                        equity: 0
                        initial_margin: 0
                        maintenance_margin: 0
                        margin_balance: 0
                        spot_reserve: 0
                      eth:
                        additional_reserve: 0
                        available_funds: 0
                        available_withdrawal_funds: 0
                        balance: 0
                        currency: eth
                        equity: 0
                        initial_margin: 0
                        maintenance_margin: 0
                        margin_balance: 0
                        spot_reserve: 0
                    receive_notifications: false
                    security_keys_assignments: []
                    security_keys_enabled: false
                    system_name: user_1_1
                    type: subaccount
                    username: user_1_1
          schema:
            $ref: '#/components/schemas/PrivateGetSubaccountsResponse'
    ErrorMessageResponse:
      description: Success response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorMessageResponse'
  schemas:
    PrivateGetSubaccountsResponse:
      type: object
      properties:
        id:
          description: The id that was sent in the request
          type: integer
        jsonrpc:
          description: The JSON-RPC version (2.0)
          type: string
          enum:
            - '2.0'
        result:
          type: array
          items:
            properties:
              email:
                description: User email
                type: string
              id:
                description: Account/Subaccount identifier
                type: integer
              is_password:
                description: '`true` when password for the subaccount has been configured'
                type: boolean
              isolated:
                description: >-
                  True when the entry represents a managed isolated-margin
                  subaccount; null for main account and regular subaccounts.
                type:
                  - boolean
                  - 'null'
              isolated_margin_instrument:
                description: >-
                  Instrument name bound to the isolated margin subaccount, or
                  null if unbound or non-isolated.
                type:
                  - string
                  - 'null'
              login_enabled:
                description: Informs whether login to the subaccount is enabled
                type: boolean
              margin_model:
                description: Margin model
                type: string
              not_confirmed_email:
                description: >-
                  New email address that has not yet been confirmed. This field
                  is only included if `with_portfolio` == `true`.
                type: string
              portfolio:
                $ref: '#/components/schemas/portfolio'
                description: Only if with_portfolio == true
              proof_id:
                description: >-
                  Hashed identifier used in the Proof Of Liability for the
                  subaccount. This identifier allows you to find your entries in
                  the Deribit Proof-Of-Reserves files. IMPORTANT: Keep it secret
                  to not disclose your entries in the Proof-Of-Reserves.
                type: string
              proof_id_signature:
                description: >-
                  Signature used as a base string for proof_id hash. IMPORTANT:
                  Keep it secret to not disclose your entries in the
                  Proof-Of-Reserves.
                type: string
              receive_notifications:
                description: >-
                  When `true` - receive all notification emails on the main
                  email
                type: boolean
              security_keys_assignments:
                description: Names of assignments with Security Keys assigned
                type: array
              security_keys_enabled:
                description: Whether the Security Keys authentication is enabled
                type: boolean
              system_name:
                description: System generated user nickname
                type: string
              type:
                type: string
                enum:
                  - main
                  - subaccount
              username:
                type: string
            required:
              - username
              - email
              - type
              - tfa_enabled
              - receive_notifications
              - is_password
              - system_name
              - id
            type: object
      required:
        - result
        - jsonrpc
    ErrorMessageResponse:
      type: object
      properties:
        error:
          type: integer
        id:
          description: The id that was sent in the request
          type: integer
        jsonrpc:
          description: The JSON-RPC version (2.0)
          type: string
          enum:
            - '2.0'
        message:
          type: string
      required:
        - message
        - error
        - jsonrpc
    portfolio:
      type: object
      properties:
        btc(example):
          $ref: '#/components/schemas/currency_portfolio'
    currency_portfolio:
      type: object
      properties:
        additional_reserve:
          $ref: '#/components/schemas/additional_reserve'
        available_funds:
          description: >-
            The account's available funds. When cross collateral is enabled,
            this aggregated value is calculated by converting the sum of each
            cross collateral currency's value to the given currency, using each
            cross collateral currency's index.
          type: number
        available_withdrawal_funds:
          description: The account's available to withdrawal funds
          type: number
        balance:
          description: The account's balance
          type: number
        currency:
          description: The selected currency
          type: string
          enum:
            - btc
            - eth
        equity:
          description: The account's current equity
          type: number
        initial_margin:
          description: >-
            The account's initial margin. When cross collateral is enabled, this
            aggregated value is calculated by converting the sum of each cross
            collateral currency's value to the given currency, using each cross
            collateral currency's index.
          type: number
        maintenance_margin:
          description: >-
            The maintenance margin. When cross collateral is enabled, this
            aggregated value is calculated by converting the sum of each cross
            collateral currency's value to the given currency, using each cross
            collateral currency's index.
          type: number
        margin_balance:
          description: >-
            The account's margin balance. When cross collateral is enabled, this
            aggregated value is calculated by converting the sum of each cross
            collateral currency's value to the given currency, using each cross
            collateral currency's index.
          type: number
        spot_reserve:
          description: The account's balance reserved in active spot orders
          type: number
      required:
        - margin_balance
        - currency
        - maintenance_margin
        - initial_margin
        - equity
        - balance
        - available_withdrawal_funds
        - available_funds
        - additional_reserve
        - spot_reserve
    additional_reserve:
      description: >-
        The account's balance reserved for open buy option orders and option
        combo orders (the premium payable if they fill). Only non-zero on the
        `cross_sm` margin model; balance reserved by spot orders is reported
        separately in `spot_reserve`.
      type: number
      example: 0.3
  securitySchemes:
    ApiKey:
      description: >-
        Call `public/auth` with `grant_type: coinbase_cdp` and a CDP JWT. Send
        the returned `access_token` as `Authorization: Bearer`.
      scheme: bearer
      type: http
    OAuth2:
      description: >-
        Call `public/auth` with `grant_type: coinbase_oauth2` and an OAuth
        access token. Send the returned `access_token` as `Authorization:
        Bearer`.
      flows:
        authorizationCode:
          authorizationUrl: https://login.coinbase.com/oauth2/auth
          scopes:
            wallet:accounts:read: View your accounts.
            wallet:accounts:update: Authorize `wallet:accounts:update` operations.
            wallet:buys:create: Place, edit, and cancel orders.
            wallet:payment-methods:read: View your payment methods.
            wallet:trades:create: Convert cryptocurrencies.
            wallet:trades:read: View your cryptocurrency conversions.
            wallet:transactions:read: View your transactions.
            wallet:transactions:transfer: Transfer funds between accounts.
            wallet:user:read: View your account information.
            wallet:user:update: Update your account information.
          tokenUrl: https://login.coinbase.com/oauth2/token
      type: oauth2

````