> For AI agents: the documentation index is available at [llms.txt](https://docs.snaptrade.com/llms.txt), and the comprehensive documentation index is available at [llms-full.txt](https://docs.snaptrade.com/llms-full.txt). Download the [complete public OpenAPI specification](https://docs.snaptrade.com/openapi.yaml). Complete public OpenAPI specification with all documented operations, schemas, servers, and authentication requirements. Use it for SDK generation and API tooling; beta operations are marked x-beta. Markdown versions of documentation pages are available by appending .md to the URL path.

> **Agent notice:** This is a beta endpoint. This endpoint’s request and response schemas and behavior may change without advance notice. When recommending or describing this endpoint, identify it as beta and include this compatibility warning.

# List account balances (V2)

> **Beta endpoint** This endpoint’s request and response schemas and behavior may change without advance notice.

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

Returns the account's balances in a single snapshot: total net value, cash per currency, buying power, and margin details for margin accounts. Every field is always present and is `null` when the institution doesn't report it.

**Beta:** this endpoint is only available for partners it has been enabled for. Please contact the SnapTrade team to enable it. The response schema may change.

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 institution. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.

`data_freshness.as_of` is the time the returned data was fetched from the institution.

If the connection has become disabled, it can no longer access the latest data from the institution, 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_getAccountBalancesV2

## 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.getAccountBalancesV2(
    {
      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_account_balances_v2(
    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.


    ## Rate limiting


    Two limits apply to requests signed with your `clientId`. The stricter one

    wins, and exceeding either returns `429 Too Many Requests`.


    - **Customer-level** — 250 requests/minute by default, scoped to your
      `clientId` and applied across all endpoints. Reported in
      `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`.
    - **Account-level** — 10 requests/minute per account, scoped to
      (`clientId`, `accountId`). All covered operations for one account draw on
      the same bucket — reading balances and reading positions share it — and
      enforcement does not depend on the HTTP method, so updating an account
      consumes the same bucket as reading it. Only enforced for Personal users,
      and only for integrations it has been rolled out to — it is not yet in
      force for every Personal integration. It also does not apply on every
      operation that documents a 429 below. Where it applies it is reported in
      `X-RateLimit-Account-Limit`, `X-RateLimit-Account-Remaining` and
      `X-RateLimit-Account-Reset`. Do not read the absence of those headers as
      proof the limit is off — some configurations omit the rate limit headers
      while still enforcing the limit, so header absence tells you nothing
      about your allowance.

    On a 429, `X-RateLimit-Remaining: 0` means you hit the customer-level limit

    and `X-RateLimit-Account-Remaining: 0` means the account-level one. Wait for

    the corresponding `*-Reset` value (seconds) before retrying, or fall back to

    exponential backoff with jitter.


    Not every 429 is explained by those headers. A separate

    per-authenticated-user limit, reported in no `X-RateLimit-*` header, covers

    OAuth-authenticated requests and signed requests in configurations where the

    customer-level limit is not in effect — on the operations that use the

    default throttles. A few operations override those and are governed by the

    customer-level limit alone. The two do not stack: a signed request

    governed by the customer-level limit above is not additionally subject to
    the

    per-user one. If a 429 arrives with no header at zero — or with no

    `X-RateLimit-*` headers at all — honour `Retry-After` and back off. Treat
    the

    remaining counts as a hint, not a guarantee that the next request will

    succeed.


    Because the customer-level limit applies everywhere, any signed request can

    return 429.


    **OAuth-authenticated requests are an exception.** They are not subject to

    the customer-level limit and do not receive `X-RateLimit-Limit`,

    `X-RateLimit-Remaining` or `X-RateLimit-Reset` — do not wait on those
    headers

    or design around a customer-level allowance on this path. The account-level

    limit still applies to them on the account-data endpoints above, reported in

    the `X-RateLimit-Account-*` headers. On operations using the default

    throttles the per-user limit above applies to them as well, so an OAuth

    request can be rejected while the account headers still show capacity; on

    the few operations that override those throttles, OAuth callers have no

    per-user ceiling at all. Drive retries from `Retry-After` and exponential

    backoff with jitter rather than from the headers.


    See https://docs.snaptrade.com/docs/ratelimiting.
  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/v2:
    get:
      tags:
        - Account Information
      summary: List account balances (V2)
      operationId: AccountInformation_getAccountBalancesV2
      description: >
        Returns the account's balances in a single snapshot: total net value,
        cash per currency, buying power, and margin details for margin accounts.
        Every field is always present and is `null` when the institution doesn't
        report it.


        **Beta:** this endpoint is only available for partners it has been
        enabled for. Please contact the SnapTrade team to enable it. The
        response schema may change.


        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 institution. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.

        `data_freshness.as_of` is the time the returned data was fetched from
        the institution.


        If the connection has become disabled, it can no longer access the
        latest data from the institution, 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:
                description: >-
                  Balances for a single account, fetched together as one
                  snapshot.
                type: object
                required:
                  - account_id
                  - cash_or_margin
                  - net_value
                  - cash
                  - buying_power
                  - margin
                  - data_freshness
                properties:
                  account_id:
                    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
                  cash_or_margin:
                    type: string
                    description: >
                      Whether the account is a cash or margin account,
                      normalized across institutions. Same values as
                      `cash_or_margin` on the [get account
                      details](/reference/Account%20Information/AccountInformation_getAccountDetails)
                      endpoint.

                      - `cash`: the account can't borrow on margin.

                      - `margin`: the account can borrow on margin.

                      - `unknown`: SnapTrade doesn't have enough information to
                      tell, or the distinction doesn't apply (for example crypto
                      accounts).
                    enum:
                      - cash
                      - margin
                      - unknown
                    example: margin
                  net_value:
                    allOf:
                      - type: object
                        nullable: true
                        description: >-
                          A monetary amount. Null when the institution doesn't
                          report it.
                        required:
                          - amount
                          - currency
                        properties:
                          amount:
                            type: string
                            format: decimal
                            example: '520692.19'
                          currency:
                            type: string
                            description: ISO-4217 currency code.
                            example: CAD
                    description: >-
                      Total value of the account as reported by the institution,
                      in the account's currency.
                  cash:
                    type: array
                    description: >-
                      Cash held in the account, one entry per currency, as
                      reported by the institution. Some institutions allow
                      holding multiple currencies in the same account. May
                      include proceeds from trades that haven't settled yet. Can
                      be negative, for example on a margin account that is
                      borrowing in a currency.
                    items:
                      type: object
                      required:
                        - currency
                        - amount
                      properties:
                        currency:
                          type: string
                          description: ISO-4217 currency code.
                          example: USD
                        amount:
                          type: string
                          format: decimal
                          description: Rounded to 2 decimal places.
                          example: '72658.27'
                  buying_power:
                    type: array
                    nullable: true
                    description: >
                      How much the account can spend on new purchases, one entry
                      per currency. Amounts are in different currencies and
                      shouldn't be added together. Null when it can't be
                      determined.

                      - **Cash accounts:** one entry per currency held, each
                      covering purchases in that currency and never more than
                      the cash in that currency. Each entry is the settled cash
                      available to spend in that currency where the institution
                      reports it; otherwise it's the institution's buying power
                      or cash, which may include proceeds from trades that
                      haven't settled. Check `basis`.

                      - **Margin accounts:** a single entry for the whole
                      account, covering purchases in any currency. It's usually
                      in the account's main currency (the currency of
                      `net_value`). It's the institution's buying power,
                      typically its overnight figure (day-trading buying power
                      isn't included). How it's calculated varies by
                      institution, it can be negative, and it may not cover
                      options or other non-marginable securities.
                    items:
                      type: object
                      required:
                        - currency
                        - amount
                        - basis
                      properties:
                        currency:
                          type: string
                          description: ISO-4217 currency code.
                          example: CAD
                        amount:
                          type: string
                          format: decimal
                          description: >-
                            Buying power in this currency, rounded to 2 decimal
                            places. Can be negative, for example on a margin
                            account that has exceeded its margin requirement.
                          example: '1208463.36'
                        basis:
                          type: string
                          description: >
                            What the amount may include.

                            - `settled`: settled cash only. Excludes proceeds
                            from sales that haven't settled and cash already
                            committed to purchases that haven't settled, so
                            spending it won't cause a good-faith violation.

                            - `cash`: may include proceeds from trades that
                            haven't settled.

                            - `margin`: may include money borrowed on margin.


                            To avoid good-faith violations on cash accounts,
                            only treat the amount as safe to spend when `basis`
                            is `settled`.
                          enum:
                            - settled
                            - cash
                            - margin
                          example: margin
                  margin:
                    type: object
                    nullable: true
                    description: >-
                      Margin details. Null when `cash_or_margin` is `cash`;
                      present for `margin` and `unknown` accounts.
                    required:
                      - loan_balances
                    properties:
                      loan_balances:
                        type: array
                        nullable: true
                        description: >
                          The margin debit the institution is charging interest
                          on, one entry per currency owed, as positive amounts.
                          Debits in different currencies are listed separately
                          and are never netted against cash in another currency,
                          because institutions charge interest on each
                          currency's debit.


                          An empty list means the account isn't borrowing.
                          Debits under 0.01 are left out as rounding leftovers.
                          Null when the institution doesn't report it.
                        items:
                          type: object
                          required:
                            - currency
                            - amount
                          properties:
                            currency:
                              type: string
                              description: ISO-4217 currency code.
                              example: USD
                            amount:
                              type: string
                              format: decimal
                              description: Rounded to 2 decimal places.
                              example: '72658.27'
                  data_freshness:
                    type: object
                    description: Metadata describing freshness of the returned balances.
                    required:
                      - as_of
                    properties:
                      as_of:
                        type: string
                        format: date-time
                        description: >-
                          The time the returned data was fetched from the
                          institution.
                        example: '2026-10-15T11:03:35.000Z'
                example:
                  account_id: 378eb9a5-448b-4fbc-ab61-29d2bcf0ec09
                  cash_or_margin: margin
                  net_value:
                    amount: '520692.19'
                    currency: CAD
                  cash:
                    - currency: CAD
                      amount: '121610.45'
                    - currency: USD
                      amount: '-72658.27'
                  buying_power:
                    - currency: CAD
                      amount: '1208463.36'
                      basis: margin
                  margin:
                    loan_balances:
                      - currency: USD
                        amount: '72658.27'
                  data_freshness:
                    as_of: '2026-10-15T11:03:35.000Z'
        '401':
          description: Unauthorized, invalid credentials for this resource
          content:
            application/json:
              schema:
                description: Example for failed request response
                type: object
                properties:
                  default_detail:
                    example: Unable to verify signature sent
                  default_code:
                    example: 1076
        '403':
          description: Feature not enabled
          content:
            application/json:
              schema:
                description: Example for failed request response
                type: object
                properties:
                  detail:
                    example: >-
                      Feature is not enabled for this customer or this
                      connection
                  default_code:
                    example: 1141
        '404':
          description: The requested resource does not exist.
          content:
            application/json:
              schema:
                description: Example for failed request response
                type: object
                properties:
                  default_detail:
                    example: The requested resource does not exist.
                  default_code:
                    example: 1011
        '429':
          description: >
            Rate limit exceeded. Check `X-RateLimit-Remaining` (customer-level)
            and

            `X-RateLimit-Account-Remaining` (account-level) to see which limit
            you

            hit, then wait for the matching `*-Reset` value before retrying.


            Not every header listed below appears on every operation. The

            `X-RateLimit-Account-*` headers are sent only where the per-account
            limit

            is enforced, and OAuth-authenticated requests never receive the

            customer-level `X-RateLimit-Limit`, `X-RateLimit-Remaining` or

            `X-RateLimit-Reset`.


            A separate per-authenticated-user limit, reported in no
            `X-RateLimit-*`

            header, covers OAuth-authenticated requests and signed requests not

            governed by the customer-level limit; it does not stack on top of
            that

            limit. So a 429 can arrive with every reported counter above zero —
            or

            with no `X-RateLimit-*` headers at all. Honour `Retry-After` in that

            case.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
                example: 7
            X-RateLimit-Limit:
              description: Customer-level request allowance for the current window.
              schema:
                type: integer
                example: 250
            X-RateLimit-Remaining:
              description: >-
                Customer-level requests left in the current window. 0 on a 429
                means this is the limit you hit.
              schema:
                type: integer
                example: 249
            X-RateLimit-Reset:
              description: Seconds until the customer-level window resets.
              schema:
                type: integer
                example: 60
            X-RateLimit-Account-Limit:
              description: >-
                Per-account request allowance for the current window. Only sent
                on account-data endpoints where the account-level limit applies.
              schema:
                type: integer
                example: 10
            X-RateLimit-Account-Remaining:
              description: >-
                Per-account requests left in the current window. 0 on a 429
                means this is the limit you hit.
              schema:
                type: integer
                example: 9
            X-RateLimit-Account-Reset:
              description: Seconds until the per-account window resets.
              schema:
                type: integer
                example: 60
          content:
            application/json:
              schema:
                description: Example for a rate-limited request response
                type: object
                properties:
                  detail:
                    example: Connection refreshed too recently. Please try again later.
                  status_code:
                    example: 429
                  code:
                    example: throttled
        '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
      security:
        - PartnerSignature: []
          PartnerClientId: []
          PartnerTimestamp: []
          userId: []
          userSecret: []
        - PersonalSignature: []
          PersonalClientId: []
          PersonalTimestamp: []

```