> ## 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 Watchlists

> Create or update user watchlists.

_Requires bearer token authentication_



## OpenAPI

````yaml https://spec.speakeasy.com/aries/aries/aries-trading-platform-api-with-code-samples put /v1/config/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/config/watchlist:
    put:
      tags:
        - Watchlist
      summary: Create or Update Watchlists
      description: |-
        Create or update user watchlists.

        _Requires bearer token authentication_
      operationId: watchlist_CreateOrUpdate
      requestBody:
        description: Array of watchlists to create or update
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/WatchlistRequest'
            example:
              - name: Tech Stocks
                symbols:
                  - AAPL
                  - GOOGL
                  - MSFT
                  - AMZN
              - name: Crypto
                symbols:
                  - BTC-USD
                  - ETH-USD
                  - SOL-USD
        required: true
      responses:
        '201':
          description: Watchlists created or updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WatchlistResponse'
              example:
                user_id: 12345
                watchlist:
                  - id: 1
                    name: Tech Stocks
                    symbols:
                      - AAPL
                      - GOOGL
                      - MSFT
                      - AMZN
                  - id: 2
                    name: Crypto
                    symbols:
                      - BTC-USD
                      - ETH-USD
                      - SOL-USD
        '400':
          description: Bad request - Invalid request body or validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                nameRequired:
                  value:
                    error: name is required
                nameUnique:
                  value:
                    error: name must be unique
                symbolsUnique:
                  value:
                    error: symbols must be unique
        '401':
          description: Unauthorized
        '500':
          description: Internal server error
      security:
        - BearerAuth: []
      x-codeSamples:
        - 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.WatchlistRequest;

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

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


            public class Application {

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

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

                    List<WatchlistRequest> req = List.of(
                            WatchlistRequest.builder()
                                .name("Tech Stocks")
                                .symbols(List.of(
                                    "AAPL",
                                    "GOOGL",
                                    "MSFT",
                                    "AMZN"))
                                .build(),
                            WatchlistRequest.builder()
                                .name("Crypto")
                                .symbols(List.of(
                                    "BTC-USD",
                                    "ETH-USD",
                                    "SOL-USD"))
                                .build());

                    WatchlistCreateOrUpdateResponse res = sdk.watchlists().upsert()
                            .request(req)
                            .call();

                    if (res.watchlistResponse().isPresent()) {
                        // handle response
                    }
                }
            }
components:
  schemas:
    WatchlistRequest:
      type: object
      properties:
        name:
          type: string
          description: Unique name for the watchlist
        symbols:
          type: array
          items:
            type: string
          description: Array of stock symbols (must be unique)
          example:
            - AAPL
            - GOOGL
            - MSFT
      required:
        - name
        - symbols
    WatchlistResponse:
      type: object
      properties:
        user_id:
          type: integer
          format: int64
          description: User ID
        watchlist:
          type: array
          items:
            $ref: '#/components/schemas/Watchlist'
          description: Array of watchlists
    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
    Watchlist:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: Watchlist ID
        name:
          type: string
          description: Watchlist name
        symbols:
          type: array
          items:
            type: string
          description: Array of stock symbols
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````