Create and manage watchlists with the Python SDK
watchlists = client.watchlist.get_watchlists(account_id="acc_123") for wl in watchlists: print(f"{wl.name}: {len(wl.symbols)} symbols")
watchlist = client.watchlist.create_watchlist( account_id="acc_123", name="Tech Stocks", symbols=["AAPL", "GOOGL", "MSFT"] )
client.watchlist.update_watchlist( watchlist_id="wl_123", symbols=["AAPL", "GOOGL", "MSFT", "AMZN"] )
client.watchlist.delete_watchlist(watchlist_id="wl_123")
# 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"] )
Was this page helpful?