Skip to main content

Overview

The Watchlist API allows you to create, update, and delete watchlists for tracking securities.

Methods

get_watchlists(account_id)

watchlists = client.watchlist.get_watchlists(account_id="acc_123")
for wl in watchlists:
    print(f"{wl.name}: {len(wl.symbols)} symbols")

create_watchlist(account_id, name, symbols)

watchlist = client.watchlist.create_watchlist(
    account_id="acc_123",
    name="Tech Stocks",
    symbols=["AAPL", "GOOGL", "MSFT"]
)

update_watchlist(watchlist_id, symbols)

client.watchlist.update_watchlist(
    watchlist_id="wl_123",
    symbols=["AAPL", "GOOGL", "MSFT", "AMZN"]
)

delete_watchlist(watchlist_id)

client.watchlist.delete_watchlist(watchlist_id="wl_123")

Examples

# Create watchlist
wl = client.watchlist.create_watchlist(
    account_id="acc_123",
    name="My Favorites",
    symbols=["AAPL", "TSLA", "NVDA"]
)

# Add more symbols
client.watchlist.update_watchlist(
    watchlist_id=wl.id,
    symbols=wl.symbols + ["AMD", "INTC"]
)