Watchlists#
The watchlist endpoints allow you to create lists of securities and track their performance.
Create a New Watchlist#
- TradingClient.create_watchlist(watchlist_data: CreateWatchlistRequest) Union[Watchlist, Dict[str, Any]] #
Creates a new watchlist.
- Parameters:
watchlist_data (CreateWatchlistRequest) – The watchlist to create.
- Returns:
The new watchlist.
- Return type:
Get All Watchlists#
Get a Watchlist By Id#
Update Watchlist By Id#
- TradingClient.update_watchlist_by_id(watchlist_id: Union[UUID, str], watchlist_data: UpdateWatchlistRequest) Union[Watchlist, Dict[str, Any]] #
Updates a watchlist with new data.
- Parameters:
watchlist_id (Union[UUID, str]) – The watchlist to be updated.
watchlist_data (UpdateWatchlistRequest) – The new watchlist data.
- Returns:
The watchlist with updated data.
- Return type:
Add Asset To Watchlist By Id#
- TradingClient.add_asset_to_watchlist_by_id(watchlist_id: Union[UUID, str], symbol: str) Union[Watchlist, Dict[str, Any]] #
Adds an asset by its symbol to a specified watchlist.
- Parameters:
watchlist_id (Union[UUID, str]) – The watchlist to add the symbol to.
symbol (str) – The symbol for the asset to add.
- Returns:
The updated watchlist.
- Return type:
Remove Asset From Watchlist By Id#
- TradingClient.remove_asset_from_watchlist_by_id(watchlist_id: Union[UUID, str], symbol: str) Union[Watchlist, Dict[str, Any]] #
Removes an asset from a watchlist.
- Parameters:
watchlist_id (Union[UUID, str]) – The watchlist to remove the asset from.
symbol (str) – The symbol for the asset to add.
- Returns:
The updated watchlist.
- Return type:
Delete Watchlist By Id#
- TradingClient.delete_watchlist_by_id(watchlist_id: Union[UUID, str]) None #
Deletes a watchlist. This is permanent.
- Parameters:
watchlist_id (Union[UUID, str]) – The watchlist to delete.
- Returns:
None