Watchlists#

Create a Watchlist For Account#

BrokerClient.create_watchlist_for_account(account_id: Union[UUID, str], watchlist_data: CreateWatchlistRequest) Watchlist#

Creates a new watchlist for a given account.

Parameters
  • account_id (Union[UUID, str]) – The account to create a new watchlist for.

  • watchlist_data (CreateWatchlistRequest) – The watchlist to create.

Returns

The new watchlist.

Return type

Watchlist

Get All Watchlists For Account#

BrokerClient.get_watchlists_for_account(account_id: Union[UUID, str]) List[Watchlist]#

Returns all watchlists for an account.

Parameters

account_id (Union[UUID, str]) – The account to retrieve watchlists for

Returns

The watchlists for that account

Return type

List[Watchlist]

Get Watchlist For Account By Id#

BrokerClient.get_watchlist_for_account_by_id(account_id: Union[UUID, str], watchlist_id: Union[UUID, str]) Watchlist#

Returns a specific watchlist by its id for a given account.

Parameters
  • account_id (Union[UUID, str]) – The account to retrieve watchlist data for.

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

Returns

The watchlist.

Return type

Watchlist

Update Watchlist For Account By Id#

BrokerClient.update_watchlist_for_account_by_id(account_id: Union[UUID, str], watchlist_id: Union[UUID, str], watchlist_data: UpdateWatchlistRequest) Watchlist#

Updates a watchlist with new data.

Parameters
  • account_id (Union[UUID, str]) – The account whose watchlist to be updated.

  • 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

Delete Watchlist From Account By Id#

BrokerClient.delete_watchlist_from_account_by_id(account_id: Union[UUID, str], watchlist_id: Union[UUID, str]) None#

Deletes a watchlist. This is permanent.

Parameters
  • account_id (Union[UUID, str]) – The account the watchlist belongs to.

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

Returns

None

Add Asset To Watchlist For Account By Id#

BrokerClient.add_asset_to_watchlist_for_account_by_id(account_id: Union[UUID, str], watchlist_id: Union[UUID, str], symbol: str) Watchlist#

Adds an asset by its symbol to a specified watchlist for a given account. :param account_id: The account id that the watchlist belongs to. :type account_id: Union[UUID, str] :param watchlist_id: The watchlist to add the symbol to. :type watchlist_id: Union[UUID, str] :param symbol: The symbol for the asset to add. :type symbol: str

Returns

The updated watchlist.

Return type

Watchlist

Remove Asset From Watchlist For Account By Id#

BrokerClient.remove_asset_from_watchlist_for_account_by_id(account_id: Union[UUID, str], watchlist_id: Union[UUID, str], symbol: str) Watchlist#

Removes an asset from a watchlist for a given account.

Parameters
  • account_id (Union[UUID, str]) – The account the watchlist belongs to.

  • 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