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

# Get User Accounts

> Retrieve all trading accounts for the currently authenticated user



## OpenAPI

````yaml https://spec.speakeasy.com/aries/aries/aries-trading-platform-api-with-code-samples get /v1/users/me/accounts
openapi: 3.0.3
info:
  title: Aries Trading Platform API
  description: >-
    Complete API documentation for the Aries trading platform including user
    management, authentication, account management, order management, market
    data, and analytics
  contact:
    name: Aries Financial
    email: dev@aries.com
  version: 1.0.0
servers:
  - url: https://api.tradearies.dev
    description: Production server
security: []
tags:
  - name: Accounts
    description: Account management endpoints for positions, orders, and balances
  - name: Analytics
    description: >-
      Analytics endpoints for market data analysis including top gainers,
      losers, volume leaders, sector analysis, analyst ratings, market breadth,
      and net inflow
  - name: Authentication
    description: User authentication endpoints
  - name: Calendars
    description: Calendar endpoints for economic events and historical data
  - name: Market Data
    description: >-
      Market data endpoints for symbol search, real-time data access, and equity
      details
  - name: Orders
    description: >-
      Order management endpoints for placing, updating, canceling, and
      previewing orders
  - name: Users
    description: User management endpoints
  - name: Health
    description: Service health endpoints
paths:
  /v1/users/me/accounts:
    get:
      tags:
        - Users
      summary: Get User Accounts
      description: Retrieve all trading accounts for the currently authenticated user
      operationId: getUserAccounts
      responses:
        '200':
          description: User accounts retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAccountsResponse'
        '401':
          description: Unauthorized - invalid authentication
        '500':
          description: Internal server error
      security:
        - BearerAuth: []
      x-codeSamples:
        - lang: python
          label: Python (SDK)
          source: |-
            from finance_dev import FinanceDev, models
            import os


            with FinanceDev(
                security=models.Security(
                    client_id=os.getenv("FINANCEDEV_CLIENT_ID", ""),
                    client_secret=os.getenv("FINANCEDEV_CLIENT_SECRET", ""),
                ),
            ) as fd_client:

                res = fd_client.accounts.get_user_accounts()

                # Handle response
                print(res)
        - lang: java
          label: Java (SDK)
          source: >-
            package hello.world;


            import java.lang.Exception;

            import org.openapis.openapi.AriesJava;

            import
            org.openapis.openapi.models.operations.GetUserAccountsResponse;


            public class Application {

                public static void main(String[] args) throws Exception {

                    AriesJava sdk = AriesJava.builder()
                            .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
                        .build();

                    GetUserAccountsResponse res = sdk.users().getAccounts()
                            .call();

                    if (res.getAccountsResponse().isPresent()) {
                        // handle response
                    }
                }
            }
components:
  schemas:
    GetAccountsResponse:
      type: object
      properties:
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/AccountItem'
    AccountItem:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: Account ID
        fdid:
          type: string
          description: FDID identifier
        apex_id:
          type: string
          description: Apex ID
        apex_account_id:
          type: string
          description: Apex account ID
        sterling_account_id:
          type: string
          description: Sterling account ID
        status:
          type: string
          description: Account status
        apex_status:
          type: string
          description: Apex account status
        is_sim:
          type: boolean
          description: Whether this is a simulation account
        primary_user_id:
          type: integer
          format: int64
          description: Primary user ID
        account_number:
          type: string
          description: Account number
        type:
          type: string
          description: Account type
        created_at:
          type: string
          format: date-time
          description: Account creation timestamp
        updated_at:
          type: string
          format: date-time
          description: Account last update timestamp
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````