> For AI agents: the complete documentation index is available at [llms.txt](https://docs.snaptrade.com/llms.txt), and the full documentation text is available at [llms-full.txt](https://docs.snaptrade.com/llms-full.txt). Markdown versions of documentation pages are available by appending .md to the URL path.

# List account balances

GET https://api.snaptrade.com/accounts/{accountId}/balances

Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances).

Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access:
  - If you do, this endpoint returns real-time data.
  - If you don't, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.

If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.


Reference: https://docs.snaptrade.com/reference/Account%20Information/AccountInformation_getUserAccountBalance

## Code Examples

### TypeScript

```typescript

import {
  Snaptrade,
  SnaptradeAuth,
} from "snaptrade-typescript-sdk";

const snaptrade = new Snaptrade({
  auth: SnaptradeAuth.commercialApiKey({
    consumerKey: "CONSUMER_KEY",
    clientId: "CLIENT_ID",
  }),
});

const response =
  await snaptrade.accountInformation.getUserAccountBalance(
    {
      accountId:
        "917c8734-8470-4a3e-a18f-57c3f2ee6631",
      userId: "USER_ID",
      userSecret: "USER_SECRET",
    },
  );
console.log(response.data);

```

### Python

```python

from pprint import pprint
from snaptrade_client import SnapTrade, SnapTradeAuth

snaptrade = SnapTrade(
    auth=SnapTradeAuth.commercial_api_key(
        consumer_key="CONSUMER_KEY",
        client_id="CLIENT_ID",
    )
)

response = snaptrade.account_information.get_user_account_balance(
    account_id="917c8734-8470-4a3e-a18f-57c3f2ee6631",
    user_id="USER_ID",
    user_secret="USER_SECRET"
)
pprint(response.body)

```

## OpenAPI Specification

```yaml

openapi: 3.0.0
info:
  description: Connect brokerage accounts to your app for live positions and trading
  version: 1.0.0
  title: SnapTrade
  termsOfService: N/A
  contact:
    email: api@snaptrade.com
  x-konfig-ignore:
    potential-incorrect-type: true
  x-readme:
    explorer-enabled: false
paths:
  /accounts/{accountId}/balances:
    get:
      tags:
        - Account Information
      summary: List account balances
      operationId: AccountInformation_getUserAccountBalance
      description: >
        Returns a list of balances for the account. Each element of the list has
        a distinct currency. Some brokerages like Questrade [allows holding
        multiple currencies in the same
        account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances).


        Check your API key on the [Customer Dashboard billing
        page](https://dashboard.snaptrade.com/settings/billing) to see if you
        have real-time data access:
          - If you do, this endpoint returns real-time data.
          - If you don't, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.

        If the connection has become disabled, it can no longer access the
        latest data from the brokerage, but will continue to return the last
        available cached state. Please see [this
        guide](/docs/fix-broken-connections) on how to fix a disabled
        connection.
      parameters:
        - in: path
          name: accountId
          required: true
          schema:
            description: >-
              Unique identifier for the connected brokerage account. This is the
              UUID used to reference the account in SnapTrade.
            type: string
            format: uuid
            example: 917c8734-8470-4a3e-a18f-57c3f2ee6631
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  description: >-
                    Holds balance information for a single currency in an
                    account.
                  type: object
                  properties:
                    currency:
                      description: >-
                        The currency of the balance. This applies to both `cash`
                        and `buying_power`.
                      allOf:
                        - description: Describes a currency object.
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              description: >-
                                Unique identifier for the currency. This is the
                                UUID used to reference the currency in
                                SnapTrade.
                              example: 87b24961-b51e-4db8-9226-f198f6518a89
                            code:
                              type: string
                              description: The ISO-4217 currency code for the currency.
                              example: USD
                            name:
                              type: string
                              description: A human-friendly name of the currency.
                              example: US Dollar
                    cash:
                      type: number
                      description: >-
                        The amount of available cash in the account denominated
                        in the currency of the `currency` field. This value can
                        be negative in a margin account with a margin balance.
                        Money market funds will be included in this field, and
                        also returned in positions endpoints with
                        `cash_equivalent` = true
                      example: 300.71
                      nullable: true
                    buying_power:
                      type: number
                      description: >-
                        Buying power only applies to margin accounts. For
                        non-margin accounts, buying power should be the same as
                        cash. Please note that this field is not always
                        available for all brokerages.
                      example: 410.71
                      nullable: true
        '503':
          description: >-
            Service Unavailable - the brokerage connection is busy syncing (sync
            lock held) or the brokerage API is temporarily unavailable, and no
            cached fallback was available. Safe to retry.
          content:
            application/json:
              schema:
                description: >-
                  Example for a response that failed because of an upstream
                  brokerage API failure
                type: object
                properties:
                  detail:
                    example: >-
                      Unable to sync with brokerage account. Invalid response
                      from Brokerage API.
                  status_code:
                    example: 503
                  code:
                    example: 3002
        default:
          description: Unexpected error
      security:
        - PartnerSignature: []
          PartnerClientId: []
          PartnerTimestamp: []
          userId: []
          userSecret: []
        - PersonalSignature: []
          PersonalClientId: []
          PersonalTimestamp: []

```