# Search account symbols

POST https://api.snaptrade.com/api/v1/accounts/{accountId}/symbols

Returns a list of Universal Symbol objects that match the given query. The matching takes into consideration both the ticker and the name of the symbol. Only the first 20 results are returned.

The search results are further limited to the symbols supported by the brokerage for which the account is under.


Reference: https://docs.snaptrade.com/reference/Reference%20Data/ReferenceData_symbolSearchUserAccount

## 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.referenceData.symbolSearchUserAccount(
    {
      accountId:
        "917c8734-8470-4a3e-a18f-57c3f2ee6631",
      userId: "snaptrade-user-123",
      userSecret:
        "adf2aa34-8219-40f7-a6b3-60156985cc61",
      substring: "AAPL",
    },
  );
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.reference_data.symbol_search_user_account(
    account_id="917c8734-8470-4a3e-a18f-57c3f2ee6631",
    user_id="snaptrade-user-123",
    user_secret="adf2aa34-8219-40f7-a6b3-60156985cc61",
    substring="AAPL"
)
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}/symbols:
    post:
      tags:
        - Reference Data
      summary: Search account symbols
      description: >
        Returns a list of Universal Symbol objects that match the given query.
        The matching takes into consideration both the ticker and the name of
        the symbol. Only the first 20 results are returned.


        The search results are further limited to the symbols supported by the
        brokerage for which the account is under.
      operationId: ReferenceData_symbolSearchUserAccount
      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
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                substring:
                  description: The search query for symbols.
                  type: string
                  example: AAPL
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                description: A list of Universal Symbol objects that match the given query.
                items:
                  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
        default:
          description: Unexpected Error

```