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) Watchlist#

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() List[Watchlist]#

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]) Watchlist#

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) Watchlist#

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) Watchlist#

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) Watchlist#

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