Watchlists#
Create a Watchlist For Account#
- BrokerClient.create_watchlist_for_account(account_id: UUID | str, watchlist_data: CreateWatchlistRequest) 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#
Get Watchlist For Account By Id#
- BrokerClient.get_watchlist_for_account_by_id(account_id: UUID | str, watchlist_id: UUID | str) 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: UUID | str, watchlist_id: UUID | str, watchlist_data: UpdateWatchlistRequest) 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: UUID | str, watchlist_id: 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: UUID | str, watchlist_id: UUID | str, symbol: str) 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: UUID | str, watchlist_id: UUID | str, symbol: str) 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: