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

# Get account balances

> Returns all token balances for an account across all networks.



## OpenAPI

````yaml /openapi.yaml get /accounts/{accountId}/balances
openapi: 3.1.0
info:
  title: Den API
  version: 2.0.0
  description: >
    API for managing wallets with Den. This API provides programmatic access to
    all platform capabilities

    including wallet accounts, members, groups, policies, and transactions.


    ## Authentication

    All API requests require authentication via Bearer token in the
    Authorization header.


    ## Idempotency

    All mutation requests (POST, PUT, DELETE) require an X-Idempotency-Key
    header for safe retries.


    ## Two Transaction Types

    - **Account Transactions**: Value movement and contract interactions
    (governed by policies)

    - **Organization Operations**: Governance/admin changes (governed by admin
    threshold)
servers:
  - url: https://api.onchainden.com/api/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Members
    description: Manage organization members
  - name: Groups
    description: Manage member groups
  - name: Policies
    description: Manage transaction policies
  - name: Accounts
    description: Manage wallet accounts
  - name: Transactions
    description: Create and execute account transactions
  - name: Admins
    description: Manage admin configuration
  - name: AuditLogs
    description: View audit log entries
paths:
  /accounts/{accountId}/balances:
    get:
      tags:
        - Accounts
      summary: Get account balances
      description: Returns all token balances for an account across all networks.
      operationId: getAccountBalances
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Account balances
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    type: object
                    required:
                      - accountId
                      - balances
                      - updatedAt
                    properties:
                      accountId:
                        type: string
                        example: acc_123
                      balances:
                        type: array
                        items:
                          $ref: '#/components/schemas/Balance'
                      updatedAt:
                        type: string
                        format: date-time
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      x-codeSamples:
        - lang: javascript
          label: SDK
          source: |
            const client = new DenClient({ apiKey: 'ck_live_...' });
            const balances = await client.getAccountBalances('acc_123');
            console.log(`${balances.balances.length} tokens`);
components:
  schemas:
    Balance:
      type: object
      required:
        - networkId
        - symbol
        - name
        - amount
        - decimals
      properties:
        networkId:
          $ref: '#/components/schemas/NetworkId'
        symbol:
          type: string
          description: Token symbol
          example: ETH
        name:
          type: string
          description: Token name
          example: Ether
        amount:
          type: string
          description: Human-readable amount
          example: '1.5'
        decimals:
          type: integer
          description: Token decimals
        contractAddress:
          type: string
          description: Contract address (only for ERC20 tokens, not native tokens)
          pattern: ^0x[a-fA-F0-9]{40}$
          example: 0xdef...abc
    NetworkId:
      type: integer
      example: 1
      description: Network chain ID
    Error:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorObject'
    ErrorObject:
      type: object
      required:
        - code
        - message
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
          description: Human-readable error message
        details:
          $ref: '#/components/schemas/ErrorDetails'
    ErrorCode:
      type: string
      enum:
        - validationError
        - invalidSignature
        - unauthorized
        - forbidden
        - notFound
        - conflict
        - thresholdNotMet
        - proposalExpired
        - idempotencyConflict
        - upgradeRequired
        - rateLimited
        - internalError
      description: Machine-readable error codes
    ErrorDetails:
      type: object
      additionalProperties: true
      description: Additional error details (structure varies by error type)
      properties:
        field:
          type: string
          description: Field that caused the error (for validation errors)
        message:
          type: string
          description: Detailed message about the error
  responses:
    Unauthorized:
      description: API key is missing or invalid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: unauthorized
              message: Invalid API key
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: notFound
              message: Resource not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        API key authentication. Include your API key in the Authorization
        header.

````