> ## Documentation Index
> Fetch the complete documentation index at: https://finance.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Create or Update Watchlist

> Creates new watchlists or updates existing watchlists for a specific trading account. Allows users to organize stocks into named groups for monitoring. Each watchlist must have a unique name within the account and contains an array of stock symbols. If a watchlist with the same name already exists, it will be updated with the new symbol list.



## OpenAPI

````yaml https://spec.speakeasy.com/aries/aries/aries-trading-platform-api-with-code-samples put /v1/accounts/{account_id}/watchlist
openapi: 3.0.3
info:
  title: Aries Trading Platform API
  description: >-
    Complete API documentation for the Aries trading platform including user
    management, authentication, account management, order management, market
    data, and analytics
  contact:
    name: Aries Financial
    email: dev@aries.com
  version: 1.0.0
servers:
  - url: https://api.tradearies.dev
    description: Production server
security: []
tags:
  - name: Accounts
    description: Account management endpoints for positions, orders, and balances
  - name: Analytics
    description: >-
      Analytics endpoints for market data analysis including top gainers,
      losers, volume leaders, sector analysis, analyst ratings, market breadth,
      and net inflow
  - name: Authentication
    description: User authentication endpoints
  - name: Calendars
    description: Calendar endpoints for economic events and historical data
  - name: Market Data
    description: >-
      Market data endpoints for symbol search, real-time data access, and equity
      details
  - name: Orders
    description: >-
      Order management endpoints for placing, updating, canceling, and
      previewing orders
  - name: Users
    description: User management endpoints
  - name: Health
    description: Service health endpoints
paths:
  /v1/accounts/{account_id}/watchlist:
    put:
      tags:
        - Watchlist
      summary: Create or Update Watchlist
      description: >-
        Creates new watchlists or updates existing watchlists for a specific
        trading account. Allows users to organize stocks into named groups for
        monitoring. Each watchlist must have a unique name within the account
        and contains an array of stock symbols. If a watchlist with the same
        name already exists, it will be updated with the new symbol list.
      operationId: createUpdateWatchlistByAccountId
      parameters:
        - name: account_id
          in: path
          description: >-
            The unique identifier of the trading account (must be a valid
            account owned by the authenticated user)
          required: true
          schema:
            type: string
      requestBody:
        description: >-
          Array of watchlist objects to create or update. Each watchlist must
          have a unique name and a list of stock symbols.
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/WatchlistAccountRequest'
            example:
              - name: Tech Stocks
                symbols:
                  - AAPL
                  - GOOGL
                  - MSFT
                  - TSLA
                  - NVDA
              - name: Energy
                symbols:
                  - XOM
                  - CVX
                  - COP
        required: true
      responses:
        '201':
          description: Watchlist created or updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WatchlistAccountResponse'
              example:
                account_id: ACC123456
                watchlist:
                  - id: 1
                    name: Tech Stocks
                    symbols:
                      - AAPL
                      - GOOGL
                      - MSFT
                      - TSLA
                      - NVDA
                  - id: 3
                    name: Energy
                    symbols:
                      - XOM
                      - CVX
                      - COP
        '400':
          description: Bad request - invalid account ID or watchlist data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - invalid authentication
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden - user does not have access to this account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
      x-codeSamples:
        - lang: python
          label: Python (SDK)
          source: |-
            from finance_dev import FinanceDev, models
            import os


            with FinanceDev(
                security=models.Security(
                    client_id=os.getenv("FINANCEDEV_CLIENT_ID", ""),
                    client_secret=os.getenv("FINANCEDEV_CLIENT_SECRET", ""),
                ),
            ) as fd_client:

                res = fd_client.watchlist.create_update_watchlist_by_account_id(account_id="<id>", request_body=[
                    {
                        "name": "Tech Stocks",
                        "symbols": [
                            "AAPL",
                            "GOOGL",
                            "MSFT",
                            "TSLA",
                            "NVDA",
                        ],
                    },
                    {
                        "name": "Energy",
                        "symbols": [
                            "XOM",
                            "CVX",
                            "COP",
                        ],
                    },
                ])

                # Handle response
                print(res)
        - lang: java
          label: Java (SDK)
          source: >-
            package hello.world;


            import java.lang.Exception;

            import java.util.List;

            import org.openapis.openapi.AriesJava;

            import
            org.openapis.openapi.models.components.WatchlistAccountRequest;

            import org.openapis.openapi.models.errors.ErrorResponse;

            import
            org.openapis.openapi.models.operations.CreateUpdateWatchlistByAccountIdResponse;


            public class Application {

                public static void main(String[] args) throws ErrorResponse, Exception {

                    AriesJava sdk = AriesJava.builder()
                            .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
                        .build();

                    CreateUpdateWatchlistByAccountIdResponse res = sdk.watchlist().createOrUpdate()
                            .accountId("<id>")
                            .body(List.of(
                                WatchlistAccountRequest.builder()
                                    .name("Tech Stocks")
                                    .symbols(List.of(
                                        "AAPL",
                                        "GOOGL",
                                        "MSFT",
                                        "TSLA",
                                        "NVDA"))
                                    .build(),
                                WatchlistAccountRequest.builder()
                                    .name("Energy")
                                    .symbols(List.of(
                                        "XOM",
                                        "CVX",
                                        "COP"))
                                    .build()))
                            .call();

                    if (res.watchlistAccountResponse().isPresent()) {
                        // handle response
                    }
                }
            }
components:
  schemas:
    WatchlistAccountRequest:
      type: object
      properties:
        name:
          type: string
          description: Unique name for the watchlist within the account
          example: Tech Stocks
        symbols:
          type: array
          items:
            type: string
          minItems: 1
          description: Array of stock ticker symbols to track (must be unique and valid)
          example:
            - AAPL
            - GOOGL
            - MSFT
      required:
        - name
        - symbols
    WatchlistAccountResponse:
      type: object
      properties:
        account_id:
          type: string
          description: The trading account identifier
        watchlist:
          type: array
          items:
            $ref: '#/components/schemas/WatchlistItem'
          description: Array of watchlists associated with this account
      example:
        account_id: ACC123456
        watchlist:
          - id: 1
            name: Tech Stocks
            symbols:
              - AAPL
              - GOOGL
              - MSFT
          - id: 2
            name: Finance
            symbols:
              - JPM
              - BAC
              - GS
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message
        codes:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                description: Error code
              description:
                type: string
                description: Error description
    WatchlistItem:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: Unique identifier for the watchlist
        name:
          type: string
          description: Name of the watchlist
        symbols:
          type: array
          items:
            type: string
          description: Array of stock symbols in this watchlist
      example:
        id: 1
        name: Tech Stocks
        symbols:
          - AAPL
          - GOOGL
          - MSFT
          - TSLA
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````