Watchlists#
Create a Watchlist For Account#
- BrokerClient.create_watchlist_for_account(account_id: Union[UUID, str], watchlist_data: CreateWatchlistRequest) Union[Watchlist, Dict[str, Any]] #
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:
Get All Watchlists For Account#
- BrokerClient.get_watchlists_for_account(account_id: Union[UUID, str]) Union[List[Watchlist], Dict[str, Any]] #
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]) Union[Watchlist, Dict[str, Any]] #
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:
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) Union[Watchlist, Dict[str, Any]] #
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:
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) Union[Watchlist, Dict[str, Any]] #
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:
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) Union[Watchlist, Dict[str, Any]] #
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: