Skip to main content
PUT
/
v1
/
accounts
/
{account_id}
/
watchlist
Python (SDK)
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)
{
  "account_id": "ACC123456",
  "watchlist": [
    {
      "id": 1,
      "name": "Tech Stocks",
      "symbols": [
        "AAPL",
        "GOOGL",
        "MSFT",
        "TSLA",
        "NVDA"
      ]
    },
    {
      "id": 3,
      "name": "Energy",
      "symbols": [
        "XOM",
        "CVX",
        "COP"
      ]
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://finance.dev/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

account_id
string
required

The unique identifier of the trading account (must be a valid account owned by the authenticated user)

Body

application/json

Array of watchlist objects to create or update. Each watchlist must have a unique name and a list of stock symbols.

name
string
required

Unique name for the watchlist within the account

Example:

"Tech Stocks"

symbols
string[]
required

Array of stock ticker symbols to track (must be unique and valid)

Minimum array length: 1
Example:
["AAPL", "GOOGL", "MSFT"]

Response

Watchlist created or updated successfully

account_id
string

The trading account identifier

watchlist
object[]

Array of watchlists associated with this account