> 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.

# Get account detail

> **Deprecated** Refrain from usage of this operation

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

**Deprecated.** Use the [get account details](/reference/Account%20Information/AccountInformation_getAccountDetails) endpoint instead, which supports all account types, including investment, deposit, and line of credit accounts.

Returns account detail known to SnapTrade for the specified account.

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_getUserAccountDetails

## 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.getUserAccountDetails(
    {
      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_details(
    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}:
    get:
      tags:
        - Account Information
      summary: Get account detail
      deprecated: true
      description: >
        **Deprecated.** Use the [get account
        details](/reference/Account%20Information/AccountInformation_getAccountDetails)
        endpoint instead, which supports all account types, including
        investment, deposit, and line of credit accounts.


        Returns account detail known to SnapTrade for the specified account.


        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.
      operationId: AccountInformation_getUserAccountDetails
      parameters:
        - in: path
          required: true
          name: accountId
          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: A single account at a brokerage.
                type: object
                required:
                  - id
                  - brokerage_authorization
                  - name
                  - number
                  - institution_name
                  - created_date
                  - sync_status
                  - balance
                  - is_paper
                properties:
                  id:
                    description: >-
                      Unique identifier for the connected brokerage account.
                      This is the UUID used to reference the account in
                      SnapTrade. This ID should not change for as long as the
                      connection stays active. If the connection is deleted and
                      re-added, a new account ID will be generated.
                    allOf:
                      - 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
                  brokerage_authorization:
                    description: >-
                      Unique identifier for the connection
                      (brokerage_authorization_id). This is the UUID used to
                      reference the connection in SnapTrade.
                    type: string
                    format: uuid
                    example: 87b24961-b51e-4db8-9226-f198f6518a89
                  name:
                    type: string
                    description: >-
                      A display name for the account. Either assigned by the
                      user or by the brokerage itself. For certain brokerages,
                      SnapTrade appends the brokerage name to the account name
                      for clarity.
                    example: Robinhood Individual
                    nullable: true
                  number:
                    type: string
                    example: Q6542138443
                    description: >-
                      The account number assigned by the brokerage. For some
                      brokerages, this field may be masked for security reasons.
                  institution_account_id:
                    type: string
                    example: '54953432'
                    nullable: true
                    description: >-
                      A stable and unique account identifier provided by the
                      institution. Will be set to null if not provided. When
                      present, can be used to check if a user has connected the
                      same brokerage account across multiple connections.
                  institution_name:
                    type: string
                    description: The name of the brokerage that holds the account.
                    example: Robinhood
                  created_date:
                    description: >-
                      Timestamp in [ISO
                      8601](https://en.wikipedia.org/wiki/ISO_8601) format
                      indicating when the account was created in SnapTrade. This
                      is _not_ the account opening date at the brokerage.
                    type: string
                    format: date-time
                    example: '2024-07-23T22:50:22.761Z'
                  funding_date:
                    description: >-
                      Timestamp in [ISO
                      8601](https://en.wikipedia.org/wiki/ISO_8601) format
                      indicating when the account was funded. Only populated for
                      brokerages that expose this data (Tastytrade, eToro,
                      moomoo, Public, and Unlok); `null` for all other
                      brokerages.
                    type: string
                    format: date-time
                    nullable: true
                    example: '2024-07-25T12:00:00.000Z'
                  opening_date:
                    description: >-
                      Timestamp in [ISO
                      8601](https://en.wikipedia.org/wiki/ISO_8601) format
                      indicating when the account was opened at the brokerage.
                      Only populated for brokerages that expose this data
                      (Tastytrade, eToro, moomoo, Public, and Unlok); `null` for
                      all other brokerages.
                    type: string
                    format: date-time
                    nullable: true
                    example: '2024-07-20T09:30:00.000Z'
                  sync_status:
                    description: >-
                      Contains status update for the account sync process
                      between SnapTrade and the brokerage.
                    properties:
                      transactions:
                        description: >
                          Status of account transaction sync. SnapTrade syncs
                          transactions from the brokerage under the following
                          conditions:

                          1. Initial connection - SnapTrade syncs all
                          transactions from the brokerage account as far back as
                          the brokerage allows. Check [our integrations
                          doc](https://support.snaptrade.com/brokerages-table?v=6fab8012ade6441fa0c6d9af9c55ce3a)
                          for details on how far back we sync for each
                          brokerage.

                          2. Daily sync - Once a day SnapTrade syncs new
                          transactions from the brokerage.

                          3. Manual sync - You can trigger an incremental sync
                          of transactions with the [transactions
                          sync](/reference/Experimental%20endpoints/Connections_syncBrokerageAuthorizationTransactions)
                          endpoint.
                        properties:
                          initial_sync_completed:
                            description: >-
                              Indicates if the initial sync of transactions has
                              been completed. For accounts with a large number
                              of transactions, the initial sync may take a while
                              to complete.
                            type: boolean
                            example: true
                          last_successful_sync:
                            description: >-
                              All transactions up to this date have been
                              successfully synced. Please note that this is not
                              the date of the last transaction, nor the last
                              time SnapTrade attempted to sync transactions.
                            nullable: true
                            allOf:
                              - description: Date in YYYY-MM-DD format or null
                                type: string
                                example: '2022-01-24T00:00:00.000Z'
                                format: date
                                nullable: true
                          first_transaction_date:
                            description: >-
                              The date of the first transaction in the account
                              known to SnapTrade. It's possible that the account
                              has transactions before this date, but they are
                              not known to SnapTrade.
                            nullable: true
                            allOf:
                              - description: Date in YYYY-MM-DD format or null
                                type: string
                                example: '2022-01-24T00:00:00.000Z'
                                format: date
                                nullable: true
                      holdings:
                        description: >
                          Status of account holdings sync. SnapTrade syncs
                          holdings from the brokerage under the following
                          conditions:

                          1. Initial connection - SnapTrade syncs all holdings
                          (positions, balances, recent orders, and transactions)
                          immediately after the connection is established.

                          2. Daily sync - Once a day SnapTrade refreshes all
                          holdings from the brokerage.

                          3. Manual sync - You can trigger a refresh of holdings
                          with the [manual
                          refresh](/reference/Connections/Connections_refreshBrokerageAuthorization)
                          endpoint.
                        properties:
                          initial_sync_completed:
                            description: >-
                              Indicates if the initial sync of holdings has been
                              completed. For accounts with a large number of
                              positions/orders/transactions, the initial sync
                              may take a while to complete.
                            type: boolean
                            example: true
                          last_successful_sync:
                            description: >-
                              The last time holdings were successfully synced by
                              SnapTrade.
                            nullable: true
                            allOf:
                              - description: >-
                                  Date in ISO 8601 format or null (YYYY-MM-DD
                                  HH:MM:SS.mmmmmmTZ)
                                type: string
                                example: '2024-06-28T18:42:46.561Z'
                                format: date-time
                                nullable: true
                          holdings_unavailable:
                            description: >
                              Indicates that the brokerage does not expose this
                              account's holdings to SnapTrade, so the

                              empty positions and balances reported for it do
                              not mean the account is empty. This is set

                              for accounts served by a separate brokerage system
                              that we cannot read, such as Vanguard

                              employer-sponsored retirement plans. When this is
                              `true`, prefer the account's total value

                              over the sum of its positions and cash, and note
                              that `initial_sync_completed` and

                              `last_successful_sync` may still reflect an
                              earlier sync.
                            type: boolean
                            example: true
                  balance:
                    description: Contains balance related information for the account.
                    properties:
                      total:
                        description: >-
                          Total market value of this account (includes cash,
                          equity, fixed income, etc). This value is directly
                          obtained from the brokerage and should reflect the
                          most accurate value of the account.
                        nullable: true
                        properties:
                          amount:
                            type: number
                            description: >-
                              Total value denominated in the currency of the
                              `currency` field.
                            example: 15363.23
                          currency:
                            type: string
                            description: The ISO-4217 currency code for the amount.
                            example: USD
                  status:
                    type: string
                    description: >-
                      The current status of the account. Can be either "open",
                      "closed", "archived" or null if the status is unknown or
                      not provided by the brokerage.
                    enum:
                      - open
                      - closed
                      - archived
                      - unavailable
                    nullable: true
                    example: open
                  raw_type:
                    type: string
                    description: The account type as provided by the brokerage
                    example: Margin
                    nullable: true
                  account_category:
                    type: string
                    description: >
                      The category of the account, normalized across
                      institutions.

                      Returns `null` if the category could not be determined.
                      Use this field to filter out non-investment accounts if
                      your integration only supports trading / holdings flows.
                      See [Filtering Accounts by
                      Category](https://docs.snaptrade.com/docs/filtering-accounts-by-category)
                      for more information.

                      - `INVESTMENT`: A brokerage / investment account
                      (equities, options, crypto, etc.).

                      - `DEPOSIT`: A bank deposit account (checking, savings).

                      - `LOC`: A line of credit account.
                    enum:
                      - INVESTMENT
                      - DEPOSIT
                      - LOC
                    nullable: true
                    example: INVESTMENT
                  meta:
                    type: object
                    deprecated: true
                    description: >-
                      Additional information about the account, such as account
                      type, status, etc. This information is specific to the
                      brokerage and there's no standard format for this data.
                      This field is deprecated and subject to removal in a
                      future version.
                    example:
                      type: Margin
                      status: ACTIVE
                      institution_name: Robinhood
                  portfolio_group:
                    description: >-
                      Portfolio Group ID. Portfolio Groups have been deprecated.
                      Please contact support if you have a use case for it.
                    deprecated: true
                    type: string
                    format: uuid
                    nullable: true
                    example: 2bcd7cc3-e922-4976-bce1-9858296801c3
                  cash_restrictions:
                    deprecated: true
                    description: This field is deprecated.
                    type: array
                    items:
                      type: string
                    example: []
                  is_paper:
                    type: boolean
                    description: >-
                      Indicates whether the account is a paper (simulated)
                      trading account.
                    example: false
        '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
        default:
          description: Unexpected error
      security:
        - PartnerSignature: []
          PartnerClientId: []
          PartnerTimestamp: []
          userId: []
          userSecret: []
        - PersonalSignature: []
          PersonalClientId: []
          PersonalTimestamp: []

```