> 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 } from "snaptrade-typescript-sdk";

const snaptrade = new Snaptrade({
  clientId: "PARTNER_CLIENT_ID",
  consumerKey: "CONSUMER_KEY",
});

const response =
  await snaptrade.accountInformation.getUserAccountBalance(
    {
      accountId:
        "917c8734-8470-4a3e-a18f-57c3f2ee6631",
      userId: "snaptrade-user-123",
      userSecret:
        "adf2aa34-8219-40f7-a6b3-60156985cc61",
    },
  );
console.log(response.data);

```

### Python

```python

from pprint import pprint
from snaptrade_client import SnapTrade

snaptrade = SnapTrade(
    client_id="PARTNER_CLIENT_ID",
    consumer_key="CONSUMER_KEY"
)

response = snaptrade.account_information.get_user_account_balance(
    account_id="917c8734-8470-4a3e-a18f-57c3f2ee6631",
    user_id="snaptrade-user-123",
    user_secret="adf2aa34-8219-40f7-a6b3-60156985cc61"
)
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: query
          required: true
          name: userId
          schema:
            description: >-
              SnapTrade User ID. This is chosen by the API partner and can be
              any string that is a) unique to the user, and b) immutable for the
              user. It is recommended to NOT use email addresses for this
              property because they are usually not immutable.
            type: string
            example: snaptrade-user-123
        - in: query
          required: true
          name: userSecret
          schema:
            description: >-
              SnapTrade User Secret. This is a randomly generated string and
              should be stored securely. If compromised, please rotate it via
              the [rotate user secret
              endpoint](/reference/Authentication/Authentication_resetSnapTradeUserSecret).
            type: string
            example: adf2aa34-8219-40f7-a6b3-60156985cc61
        - 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

```