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

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

Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings).

This endpoint is deprecated. Consider using the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions). This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures.

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_getUserAccountPositions

## 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.getUserAccountPositions(
    {
      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_positions(
    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}/positions:
    get:
      deprecated: true
      tags:
        - Account Information
      summary: List account positions
      description: >
        Returns a list of stock/ETF/crypto/mutual fund positions in the
        specified account. For option positions, please use the [options
        endpoint](/reference/Options/Options_listOptionHoldings).


        This endpoint is deprecated. Consider using the newer [unified positions
        endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions).
        This will allow you to get both equity and option positions in a single
        call, as well as additional asset classes such as futures.


        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_getUserAccountPositions
      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: >-
                    Describes a single stock/ETF/crypto/mutual fund position in
                    an account.
                  type: object
                  properties:
                    symbol:
                      description: >-
                        Uniquely describes a security for the position within an
                        account. The distinction between this and the `symbol`
                        child property is that this object is specific to a
                        position within an account, while the `symbol` child
                        property is universal across all brokerage accounts. The
                        caller should rely on the `symbol` child property for
                        most use cases.
                      type: object
                      properties:
                        symbol:
                          description: >-
                            Uniquely describes a single security + exchange
                            combination across all brokerages.
                          type: object
                          properties:
                            id:
                              description: >-
                                Unique identifier for the symbol within
                                SnapTrade. This is the ID used to reference the
                                symbol in SnapTrade API calls.
                              type: string
                              format: uuid
                              example: 2bcd7cc3-e922-4976-bce1-9858296801c3
                            symbol:
                              description: >-
                                The security's trading ticker symbol. For
                                example "AAPL" for Apple Inc. We largely follow
                                the [Yahoo Finance ticker
                                format](https://help.yahoo.com/kb/SLN2310.html)(click
                                on "Yahoo Finance Market Coverage and Data
                                Delays"). For example, for securities traded on
                                the Toronto Stock Exchange, the symbol has a
                                '.TO' suffix. For securities traded on NASDAQ or
                                NYSE, the symbol does not have a suffix.
                              type: string
                              example: VAB.TO
                            raw_symbol:
                              description: >-
                                The raw symbol is `symbol` with the exchange
                                suffix removed. For example, if `symbol` is
                                "VAB.TO", then `raw_symbol` is "VAB".
                              type: string
                              example: VAB
                            description:
                              description: >-
                                A human-readable description of the security.
                                This is usually the company name or ETF name.
                              type: string
                              example: VANGUARD CDN AGGREGATE BOND INDEX ETF
                              nullable: true
                            currency:
                              description: The currency in which the security is traded.
                              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
                            exchange:
                              description: >-
                                The exchange on which the security is listed and
                                traded.
                              allOf:
                                - description: Describes a single stock or crypto exchange.
                                  type: object
                                  properties:
                                    id:
                                      description: Unique ID for the exchange in SnapTrade.
                                      type: string
                                      format: uuid
                                      example: 2bcd7cc3-e922-4976-bce1-9858296801c3
                                    code:
                                      description: >-
                                        A short name for the exchange. For
                                        standardized exchange code, please use
                                        the `mic_code` field.
                                      type: string
                                      example: TSX
                                    mic_code:
                                      description: >-
                                        The [Market Identifier
                                        Code](https://en.wikipedia.org/wiki/Market_Identifier_Code)
                                        (MIC) for the exchange.
                                      type: string
                                      example: XTSE
                                      nullable: true
                                    name:
                                      description: The full name of the exchange.
                                      type: string
                                      example: Toronto Stock Exchange
                                    timezone:
                                      description: >-
                                        The timezone for the trading hours
                                        (`start_time` and `close_time`) of the
                                        exchange.
                                      type: string
                                      example: America/New_York
                                    start_time:
                                      description: >-
                                        The time when the exchange opens for
                                        trading.
                                      type: string
                                      example: '09:30:00'
                                    close_time:
                                      description: >-
                                        The time when the exchange closes for
                                        trading.
                                      type: string
                                      example: '16:00:00'
                                    suffix:
                                      description: >-
                                        The suffix to be appended to the symbol
                                        when trading on this exchange. For
                                        example, the suffix for the Toronto
                                        Stock Exchange is `.TO`. See
                                        `UniversalSymbol->symbol` and
                                        `UniversalSymbol->raw_symbol` for more
                                        detail.
                                      type: string
                                      example: .TO
                                      nullable: true
                            type:
                              type: object
                              description: >-
                                The type of security. For example, "Common
                                Stock" or "ETF".
                              properties:
                                id:
                                  description: >-
                                    Unique identifier for the security type
                                    within SnapTrade. This is the ID used to
                                    reference the security type in SnapTrade API
                                    calls.
                                  type: string
                                  format: uuid
                                  example: 2bcd7cc3-e922-4976-bce1-9858296801c3
                                code:
                                  description: >
                                    A short code representing the security type.
                                    For example, "cs" for Common Stock. Here are
                                    some common values:
                                      - `ad` - ADR
                                      - `bnd` - Bond
                                      - `cs` - Common Stock
                                      - `cef` - Closed End Fund
                                      - `crypto` - Cryptocurrency
                                      - `et` - ETF
                                      - `oef` - Open Ended Fund
                                      - `pm` - Precious Metals
                                      - `ps` - Preferred Stock
                                      - `rt` - Right
                                      - `struct` - Structured Product
                                      - `ut` - Unit
                                      - `wi` - When Issued
                                      - `wt` - Warrant
                                  type: string
                                  example: cs
                                description:
                                  description: >-
                                    A human-readable description of the security
                                    type. For example, "Common Stock" or "ETF".
                                  type: string
                                  example: Common Stock
                                is_supported:
                                  deprecated: true
                                  description: >-
                                    This field is deprecated and should not be
                                    used. Please reach out to SnapTrade support
                                    if you have a valid use case for this.
                                  type: boolean
                                  example: true
                            figi_code:
                              description: >-
                                This identifier is unique per security per
                                trading venue. See section 1.4.1 of the [FIGI
                                Standard](https://www.openfigi.com/assets/local/figi-allocation-rules.pdf)
                                for more information. This value should be the
                                same as the `figi_code` in the `figi_instrument`
                                child property.
                              type: string
                              example: BBG000B9XRY4
                              nullable: true
                            figi_instrument:
                              nullable: true
                              allOf:
                                - description: >-
                                    Financial Instrument Global Identifier
                                    (FIGI) information for the security. See
                                    [OpenFIGI](https://www.openfigi.com/) for
                                    more information.
                                  type: object
                                  properties:
                                    figi_code:
                                      description: >-
                                        This identifier is unique per security
                                        per trading venue. See section 1.4.1 of
                                        the [FIGI
                                        Standard](https://www.openfigi.com/assets/local/figi-allocation-rules.pdf)
                                        for more information.
                                      type: string
                                      example: BBG000B9Y5X2
                                      nullable: true
                                    figi_share_class:
                                      description: >-
                                        This enables users to link multiple
                                        FIGIs for the same security in order to
                                        obtain an aggregated view across all
                                        countries and all exchanges. For
                                        example, `AAPL` has a different FIGI for
                                        each exchange/trading venue it is traded
                                        on. The `figi_share_class` is the same
                                        for all of these FIGIs. See section
                                        1.4.3 of the [FIGI
                                        Standard](https://www.openfigi.com/assets/local/figi-allocation-rules.pdf)
                                        for more information.
                                      type: string
                                      example: BBG001S5N8V8
                                      nullable: true
                            currencies:
                              deprecated: true
                              description: >-
                                This field is deprecated and should not be used.
                                Please reach out to SnapTrade support if you
                                have a valid use case for this.
                              type: array
                              items:
                                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
                          required:
                            - id
                            - symbol
                            - raw_symbol
                            - currency
                            - type
                            - currencies
                        id:
                          deprecated: true
                          description: >-
                            A unique ID for the security within SnapTrade,
                            scoped to the brokerage account that the security
                            belongs to. This is a legacy field and should not be
                            used. Do not rely on this being a stable ID as it
                            can change.
                          type: string
                          format: uuid
                          example: 2bcd7cc3-e922-4976-bce1-9858296801c3
                        description:
                          deprecated: true
                          description: >-
                            This field is deprecated and the caller should use
                            the `symbol` child property's `description` instead.
                          type: string
                          example: VANGUARD CDN AGGREGATE BOND INDEX ETF
                        local_id:
                          deprecated: true
                          description: >-
                            This field is deprecated and should not be used.
                            Please reach out to SnapTrade support if you have a
                            valid use case for this.
                          type: string
                          example: '3291231'
                          nullable: true
                        is_quotable:
                          deprecated: true
                          description: >-
                            This field is deprecated and should not be used.
                            Please reach out to SnapTrade support if you have a
                            valid use case for this.
                          type: boolean
                          example: true
                        is_tradable:
                          deprecated: true
                          description: >-
                            This field is deprecated and should not be used.
                            Please reach out to SnapTrade support if you have a
                            valid use case for this.
                          type: boolean
                          example: true
                    units:
                      description: >-
                        The number of shares of the position. This can be
                        fractional or integer units. A positive number indicates
                        a long position, while a negative number indicates a
                        short position.
                      type: number
                      example: 40
                      nullable: true
                    price:
                      type: number
                      example: 113.15
                      description: >-
                        Last known market price for the symbol. The freshness of
                        this price depends on the brokerage. Some brokerages
                        provide real-time prices, while others provide delayed
                        prices. It is recommended that you rely on your own
                        third-party market data provider for most up to date
                        prices.
                      nullable: true
                    open_pnl:
                      type: number
                      description: >-
                        The profit or loss on the position since it was opened.
                        This is calculated as the difference between the current
                        market value of the position and the total cost of the
                        position. It is recommended to calculate this value
                        using the average purchase price and the current market
                        price yourself, instead of relying on this field.
                      example: 0.44
                      nullable: true
                    average_purchase_price:
                      type: number
                      nullable: true
                      example: 108.3353
                      description: Cost basis _per share_ of this position.
                    fractional_units:
                      deprecated: true
                      description: >-
                        Deprecated, use the `units` field for both fractional
                        and integer units going forward
                      type: number
                      nullable: true
                      example: 1.44
                    currency:
                      description: >
                        The 'position currency' (`price` and
                        `average_purchase_price`). This currency can potentially
                        be different from the 'listing currency' of the
                        security. The 'listing currency' is what's quoted on the
                        listing exchange, while the 'position currency' is what
                        the brokerage uses to hold and value your position.
                      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_equivalent:
                      type: boolean
                      example: false
                      nullable: true
                      description: >-
                        If the position is a cash equivalent (usually a money
                        market fund) that is also counted in account cash
                        balance and buying power
                    tax_lots:
                      type: array
                      description: >-
                        List of tax lots for the given position (disabled by
                        default, only available on paid plans, contact support
                        if needed)
                      items:
                        description: Describes a single tax lot for a position.
                        type: object
                        properties:
                          original_purchase_date:
                            nullable: true
                            type: string
                            format: date-time
                            description: The date and time of the purchase.
                            example: '2022-01-15T10:30:00Z'
                          quantity:
                            nullable: true
                            type: string
                            description: >-
                              The number of shares in the tax lot. This can be
                              fractional or integer units.
                            example: '10'
                          purchased_price:
                            nullable: true
                            type: string
                            description: The purchase price per share for the tax lot.
                            example: '100.50'
                          cost_basis:
                            nullable: true
                            type: string
                            description: The cost basis of the entire lot.
                            example: '1005.00'
                          current_value:
                            nullable: true
                            type: string
                            description: The current market value of the entire lot.
                            example: '1200.00'
                          position_type:
                            nullable: true
                            type: string
                            description: >-
                              The type of position for the tax lot (e.g., LONG,
                              SHORT).
                            example: LONG
                          lot_id:
                            nullable: true
                            type: string
                            description: The unique id for this specific tax lot
                            example: '12345678'
        '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

```