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:

Watchlist

Get All Watchlists#

TradingClient.get_watchlists() Union[List[Watchlist], Dict[str, Any]]#

Returns all watchlists.

Returns:

The list of all watchlists.

Return type:

List[Watchlist]

Get a Watchlist By Id#

TradingClient.get_watchlist_by_id(watchlist_id: Union[UUID, str]) Union[Watchlist, Dict[str, Any]]#

Returns a specific watchlist by its id.

Parameters:

watchlist_id (Union[UUID, str]) – The watchlist to retrieve.

Returns:

The watchlist.

Return type:

Watchlist

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:

Watchlist

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:

Watchlist

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:

Watchlist

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