From c393205608ceb0312f2054b5a34ac8c6196b33a8 Mon Sep 17 00:00:00 2001 From: primalmachina Date: Fri, 2 Jun 2023 10:22:45 -0500 Subject: [PATCH] consistent docstring style (remove ###) remove ### from docstrings --- samples/stream_client/example_handlers.py | 2 +- td/rest/accounts.py | 26 ++++++------ td/rest/instruments.py | 14 +++---- td/rest/market_hours.py | 14 +++---- td/rest/movers.py | 10 ++--- td/rest/options_chain.py | 10 ++--- td/rest/orders.py | 44 ++++++++++----------- td/rest/price_history.py | 10 ++--- td/rest/quotes.py | 18 ++++----- td/rest/saved_orders.py | 34 ++++++++-------- td/rest/user_info.py | 26 ++++++------ td/rest/watchlists.py | 48 +++++++++++------------ 12 files changed, 128 insertions(+), 128 deletions(-) diff --git a/samples/stream_client/example_handlers.py b/samples/stream_client/example_handlers.py index e36b28f..6320880 100644 --- a/samples/stream_client/example_handlers.py +++ b/samples/stream_client/example_handlers.py @@ -204,7 +204,7 @@ async def save_raw_msg(self, future, timeframe, msg): async def raw_message_handler(self, msg): """ - Processes a message with the snapshot key and returns pydantic obj representation. + Processes a message with the snapshot key {"snapshot":...} and returns pydantic obj representation. """ msg = msg["snapshot"][0] return self.construct_message(msg) diff --git a/td/rest/accounts.py b/td/rest/accounts.py index 9d25871..ec97de8 100644 --- a/td/rest/accounts.py +++ b/td/rest/accounts.py @@ -10,7 +10,7 @@ class Accounts: """ - ## Overview + Overview ---- Allows the user to retrieve account information. """ @@ -18,7 +18,7 @@ class Accounts: def __init__(self, session: TdAmeritradeSession) -> None: """Initializes the `Accounts` services. - ### Parameters + Parameters ---- session : TdAmeritradeSession An authenticated `TDAmeritradeSession @@ -35,7 +35,7 @@ def get_accounts( ) -> dict | list: """Queries accounts for a user. - ### Overview + Overview ---- Serves as the mechanism to make a request to the "Get Accounts" and "Get Account" Endpoint. If one @@ -43,11 +43,11 @@ def get_accounts( be made and if more than one account is provided then a "Get Accounts" request will be made. - ### Documentation + Documentation ---- https://developer.tdameritrade.com/account-access/apis - ### Parameters + Parameters ---- account_id: str (optional, default=None) The account number you wish to recieve data on. @@ -64,7 +64,7 @@ def get_accounts( from the API. If set to `False` no positions will be returned. - ### Usage + Usage ---- >>> account_services = td_client.accounts() >>> account_services.get_accounts( @@ -118,11 +118,11 @@ def get_transactions( ) -> dict: """Queries the transactions for an account. - ### Documentation + Documentation ---- https://developer.tdameritrade.com/transaction-history/apis - ### Parameters + Parameters ---- account_id: str The account number you want to query transactions @@ -147,7 +147,7 @@ def get_transactions( Note: The maximum date range is one year. Valid ISO-8601 formats are: yyyy-MM-dd. - ### Usage + Usage ---- >>> account_services = td_client.accounts() >>> account_services.get_transactions( @@ -188,17 +188,17 @@ def get_transactions( def get_transaction(self, account_id: str, transaction_id: str) -> dict: """Queries a transaction for a specific account. - ### Overview + Overview ---- Serves as the mechanism to make a request to the "Get Transaction" Endpoint. The transaction ID will be queried for the specific account passed through. - ### Documentation + Documentation ---- https://developer.tdameritrade.com/transaction-history/apis - ### Parameters + Parameters ---- account_id: str The account number you want to query transactions @@ -209,7 +209,7 @@ def get_transaction(self, account_id: str, transaction_id: str) -> dict: from the API. If set to `False` no orders will be returned. - ### Usage + Usage ---- >>> account_services = td_client.accounts() >>> account_services.get_transaction( diff --git a/td/rest/instruments.py b/td/rest/instruments.py index edd0dae..55db16e 100644 --- a/td/rest/instruments.py +++ b/td/rest/instruments.py @@ -22,7 +22,7 @@ class Instruments: def __init__(self, session: TdAmeritradeSession) -> None: """Initializes the `Instruments` services. - ### Parameters + Parameters ---- session : TdAmeritradeSession An authenticated `TDAmeritradeSession @@ -35,15 +35,15 @@ def __init__(self, session: TdAmeritradeSession) -> None: def search_instruments(self, instruments_query: InstrumentsQuery) -> dict: """Search or retrieve instrument data, including fundamental data. - ### Documentation + Documentation ---- https://developer.tdameritrade.com/instruments/apis/get/instruments - ### Parameters + Parameters ---- instruments_query : InstrumentsQuery - ### Usage + Usage ---- This method can be used in three different ways: @@ -81,16 +81,16 @@ def search_instruments(self, instruments_query: InstrumentsQuery) -> dict: def get_instrument(self, cusip: str) -> dict: """Get an instrument by CUSIP. - ### Documentation + Documentation ---- https://developer.tdameritrade.com/instruments/apis/get/instruments/%7Bcusip%7D - ### Parameters + Parameters ---- cusip: str The CUSIP Id. - ### Usage + Usage ---- >>> from td.enums import Instruments >>> instruments_service = td_client.instruments() diff --git a/td/rest/market_hours.py b/td/rest/market_hours.py index a7632ac..72e014f 100644 --- a/td/rest/market_hours.py +++ b/td/rest/market_hours.py @@ -16,7 +16,7 @@ class MarketHours: def __init__(self, session: TdAmeritradeSession) -> None: """Initializes the `MarketHours` services. - ### Parameters + Parameters ---- session : TdAmeritradeSession An authenticated `TDAmeritradeSession @@ -29,15 +29,15 @@ def __init__(self, session: TdAmeritradeSession) -> None: def get_multiple_market_hours(self, market_hours_query: MarketHoursQuery) -> dict: """Returns the market hours for all the markets. - ### Documentation + Documentation ---- https://developer.tdameritrade.com/market-hours/apis - ### Parameters + Parameters ---- market_hours_query : MarketHoursQuery - ### Usage + Usage ---- 1. Population by field names specified in `MarketHoursQuery` >>> market_hours_service = td_client.market_hours() @@ -70,15 +70,15 @@ def get_multiple_market_hours(self, market_hours_query: MarketHoursQuery) -> dic def get_market_hours(self, market_hours_query: MarketHoursQuery) -> dict: """Returns the market hours for the specified market. - ### Documentation + Documentation ---- https://developer.tdameritrade.com/market-hours/apis - ### Parameters + Parameters ---- market_hours_query : MarketHoursQuery - ### Usage + Usage ---- 1. Population by field names specified in `MarketHoursQuery` >>> market_hours_service = td_client.market_hours() diff --git a/td/rest/movers.py b/td/rest/movers.py index 6fafdcf..167d140 100644 --- a/td/rest/movers.py +++ b/td/rest/movers.py @@ -17,7 +17,7 @@ class Movers: def __init__(self, session: TdAmeritradeSession) -> None: """Initializes the `Movers` services. - ### Parameters + Parameters ---- session : TdAmeritradeSession An authenticated `TDAmeritradeSession @@ -30,20 +30,20 @@ def __init__(self, session: TdAmeritradeSession) -> None: def get_movers(self, movers_query: MoversQuery) -> List[Mover]: """Gets Active movers for a specific Index. - ### Overview + Overview ---- Top 10 (up or down) movers by value or percent for a particular market. - ### Documentation + Documentation ---- https://developer.tdameritrade.com/movers/apis/get/marketdata - ### Parameters + Parameters ---- movers_query : MoversQuery - ### Usage + Usage ---- 1. Population by field names specified in `MoversQuery` >>> movers_service = td_client.movers() diff --git a/td/rest/options_chain.py b/td/rest/options_chain.py index 22420ae..ba27d2a 100644 --- a/td/rest/options_chain.py +++ b/td/rest/options_chain.py @@ -18,7 +18,7 @@ class OptionsChain: def __init__(self, session: TdAmeritradeSession) -> None: """Initializes the `OptionsChain` services. - ### Parameters + Parameters ---- session : TdAmeritradeSession An authenticated `TDAmeritradeSession @@ -31,17 +31,17 @@ def __init__(self, session: TdAmeritradeSession) -> None: def get_option_chain(self, option_chain_query: OptionChainQuery) -> OptionChain: """Get option chain for an optionable Symbol. - ### Documentation + Documentation ---- https://developer.tdameritrade.com/option-chains/apis/get/marketdata/chains - ### Parameters + Parameters ---- option_chain_query: OptionChainQuery - ### NOTE: Filters such as ITM/OTM/DTE don't seem to work. + NOTE: Filters such as ITM/OTM/DTE don't seem to work. - ### Usage + Usage ---- 1. Population by field names specified in `OptionChainQuery` >>> options_chain_service = td_client.options_chain() diff --git a/td/rest/orders.py b/td/rest/orders.py index 6cc15b3..2fa85a5 100644 --- a/td/rest/orders.py +++ b/td/rest/orders.py @@ -20,7 +20,7 @@ class Orders: def __init__(self, session: TdAmeritradeSession) -> None: """Initializes the `Orders` services. - ### Parameters + Parameters ---- session : TdAmeritradeSession An authenticated `TDAmeritradeSession @@ -39,11 +39,11 @@ def get_orders_by_path( ) -> List[Order]: """Returns the orders for a specific account. - ### Documentation + Documentation ---- https://developer.tdameritrade.com/account-access/apis/get/accounts/%7BaccountId%7D/orders-0 - ### Parameters + Parameters ---- account_id: str The account number that you want to @@ -67,9 +67,9 @@ def get_orders_by_path( status: Union[datetime, Enum] (optional, Default=None) Specifies that only orders of this status should be returned. - ### NOTE: Including status only works sometimes. + NOTE: Including status only works sometimes. - ### Usage + Usage ---- >>> order_query = orders_service.get_orders_by_query( account_number, order_status=OrderStatus.Filled @@ -105,11 +105,11 @@ def get_orders_by_path( def get_order(self, account_id: str, order_id: str) -> Order: """Get a specific order for a specific account. - ### Documentation + Documentation ---- https://developer.tdameritrade.com/account-access/apis/get/accounts/%7BaccountId%7D/orders/%7BorderId%7D-0 - ### Parameters + Parameters ---- account_id: str The account number that you want to @@ -118,7 +118,7 @@ def get_order(self, account_id: str, order_id: str) -> Order: order_id: str The order ID you want to query. - ### Usage + Usage ---- >>> orders_service = td_client.orders() >>> orders_service.get_order( @@ -143,11 +143,11 @@ def get_orders_by_query( ) -> List[Order]: """Returns the orders for a specific account. - ### Documentation + Documentation ---- https://developer.tdameritrade.com/account-access/apis/get/accounts/%7BaccountId%7D/orders-0 - ### Parameters + Parameters ---- account_id: str The account number that you want to @@ -171,9 +171,9 @@ def get_orders_by_query( status: Union[datetime, Enum] (optional, Default=None) Specifies that only orders of this status should be returned. - ### NOTE: Including status only works sometimes. + NOTE: Including status only works sometimes. - ### Usage + Usage ---- >>> order_query = orders_service.get_orders_by_query( account_number, order_status="CANCELED" @@ -211,11 +211,11 @@ def place_order(self, account_id: str, order_object: Order) -> dict: """Place an order for a specific account. Order throttle limits may apply. - ### Documentation + Documentation ---- https://developer.tdameritrade.com/account-access/apis/post/accounts/%7BaccountId%7D/orders-0 - ### Parameters + Parameters ---- account_id: str (optional, Default=None) The account number that you want to @@ -225,7 +225,7 @@ def place_order(self, account_id: str, order_object: Order) -> dict: Represents an `Order` object that can be used to submit a new order to the TD Ameritrade API. - ### Usage + Usage ---- >>> orders_service = td_client.orders() >>> orders_service.place_order( @@ -246,17 +246,17 @@ def replace_order( ) -> dict: """Replace an existing order for an account. - ### Overview + Overview ---- The existing order will be replaced by the new order. Once replaced, the old order will be canceled and a new order will be created. Order throttle limits may apply. - ### Documentation + Documentation ---- https://developer.tdameritrade.com/account-access/apis/put/accounts/%7BaccountId%7D/orders/%7BorderId%7D-0 - ### Parameters + Parameters ---- account_id: str (optional, Default=None) The account number that you want to @@ -269,7 +269,7 @@ def replace_order( Represents an `Order` object that can be used to submit a replacing order to the TD Ameritrade API. - ### Usage + Usage ---- >>> orders_service = td_client.orders() >>> orders_service.replace_order( @@ -291,11 +291,11 @@ def cancel_order(self, account_id: str, order_id: str) -> dict: """Cancels an order for a specific account. Order throttle limits may apply. - ### Documentation + Documentation ---- https://developer.tdameritrade.com/account-access/apis/delete/accounts/%7BaccountId%7D/orders/%7BorderId%7D-0 - ### Parameters + Parameters ---- account_id: str (optional, Default=None) The account number that contains the order @@ -304,7 +304,7 @@ def cancel_order(self, account_id: str, order_id: str) -> dict: order_id: str (optional, Default=None) The order ID of the order you want to cancel. - ### Usage + Usage ---- >>> orders_service = td_client.orders() >>> orders_service.cancel_order( diff --git a/td/rest/price_history.py b/td/rest/price_history.py index 415b583..e063ad2 100644 --- a/td/rest/price_history.py +++ b/td/rest/price_history.py @@ -16,13 +16,13 @@ class PriceHistory: def __init__(self, session: TdAmeritradeSession) -> None: """Initializes the `PriceHistory` services. - ### Parameters + Parameters ---- session : TdAmeritradeSession An authenticated `TDAmeritradeSession object. - ### Usage + Usage ---- >>> td_client = TdAmeritradeClient() >>> price_history_service = td_client.price_history() @@ -34,15 +34,15 @@ def __init__(self, session: TdAmeritradeSession) -> None: def get_price_history(self, price_history_query: PriceHistoryQuery) -> dict: """Gets historical candle data for a financial instrument. - ### Documentation + Documentation ---- https://developer.tdameritrade.com/price-history/apis - ### Parameters + Parameters ---- price_history_query : PriceHistoryQuery - ### Usage + Usage ---- 1. Population by field names specified in `PriceHistoryQuery` >>> price_history_service = td_client.price_history() diff --git a/td/rest/quotes.py b/td/rest/quotes.py index 59ad82e..6ff300c 100644 --- a/td/rest/quotes.py +++ b/td/rest/quotes.py @@ -25,7 +25,7 @@ class Quotes: def __init__(self, session: TdAmeritradeSession) -> None: """Initializes the `Quotes` services. - ### Parameters + Parameters ---- session : TdAmeritradeSession An authenticated `TDAmeritradeSession @@ -37,23 +37,23 @@ def __init__(self, session: TdAmeritradeSession) -> None: def get_quote(self, instrument=str) -> dict: """Grabs real-time quotes for an instrument. - ### Overview + Overview ---- Serves as the mechanism to make a request to the Get Quote and Get Quotes Endpoint. If one item is provided a Get Quote request will be made and if more than one item is provided then a Get Quotes request will be made. - ### Documentation + Documentation ---- https://developer.tdameritrade.com/quotes/apis - ### Parameters + Parameters ---- instruments: str A list of different financial instruments. - ### Usage + Usage ---- >>> quote_service = td_client.quotes() >>> quote_service.get_quote(instrument='AAPL') @@ -92,7 +92,7 @@ def get_quote(self, instrument=str) -> dict: def get_quotes(self, instruments=List[str]) -> dict: """Grabs real-time quotes for multiple instruments. - ### Overview + Overview ---- Serves as the mechanism to make a request to the Get Quote and Get Quotes Endpoint. If one item is provided @@ -100,16 +100,16 @@ def get_quotes(self, instruments=List[str]) -> dict: item is provided then a Get Quotes request will be made. Only 500 symbols can be sent at a single time. - ### Documentation + Documentation ---- https://developer.tdameritrade.com/quotes/apis - ### Parameters + Parameters ---- instruments: str A list of different financial instruments. - ### Usage + Usage ---- >>> quote_service = td_client.quotes() >>> quote_service.get_quotes(instruments=['AAPL','SQ']) diff --git a/td/rest/saved_orders.py b/td/rest/saved_orders.py index 8731b56..26689c8 100644 --- a/td/rest/saved_orders.py +++ b/td/rest/saved_orders.py @@ -16,7 +16,7 @@ # def __init__(self, session: TdAmeritradeSession) -> None: # """Initializes the `SavedOrders` services. -# ### Parameters +# Parameters # ---- # session : TdAmeritradeSession # An authenticated `TDAmeritradeSession @@ -31,17 +31,17 @@ # ) -> dict: # """Returns the saved orders for a specific account. -# ### Documentation +# Documentation # ---- # https://developer.tdameritrade.com/account-access/apis/get/accounts/%7BaccountId%7D/savedorders-0 -# ### Parameters +# Parameters # ---- # account_id: str # The account number that you want to # query for saved orders. -# ### Usage +# Usage # ---- # >>> saved_orders_service = td_client.saved_orders() # >>> saved_orders_service.get_saved_orders_by_path( @@ -64,11 +64,11 @@ # ) -> dict: # """Get a specific saved order for a specific account. -# ### Documentation +# Documentation # ---- # https://developer.tdameritrade.com/account-access/apis/get/accounts/%7BaccountId%7D/savedorders/%7BsavedOrderId%7D-0 -# ### Parameters +# Parameters # ---- # account_id: str # The account number that you want to @@ -77,7 +77,7 @@ # saved_order_id: str # The order ID you want to query. -# ### Usage +# Usage # ---- # >>> saved_orders_service = td_client.saved_orders() # >>> saved_orders_service.get_order( @@ -103,11 +103,11 @@ # """Create a saved order for a specific account. Order throttle # limits may apply. -# ### Documentation +# Documentation # ---- # https://developer.tdameritrade.com/account-access/apis/post/accounts/%7BaccountId%7D/savedorders-0 -# ### Parameters +# Parameters # ---- # account_id: str (optional, Default=None) # The account number that you want to @@ -124,7 +124,7 @@ # dictionary object. No additional checks will be made on the # inputs to validate them. -# ### Usage +# Usage # ---- # >>> saved_orders_service = td_client.saved_orders() # >>> saved_orders_service.place_saved_order( @@ -157,17 +157,17 @@ # ) -> dict: # """Replace an existing saved order for an account. -# ### Overview +# Overview # ---- # The existing order will be replaced by the new saved order. Once # replaced, the old saved order will be canceled and a new order # will be created. Order throttle limits may apply. -# ### Documentation +# Documentation # ---- # https://developer.tdameritrade.com/account-access/apis/put/accounts/%7BaccountId%7D/savedorders/%7BsavedOrderId%7D-0 -# ### Parameters +# Parameters # ---- # account_id: str (optional, Default=None) # The account number that you want to @@ -187,7 +187,7 @@ # dictionary object. No additional checks will be made on the # inputs to validate them. -# ### Usage +# Usage # ---- # >>> saved_orders_service = td_client.saved_orders() # >>> saved_orders_service.replace_saved_order( @@ -220,11 +220,11 @@ # """Deletes a saved order for a specific account. Order throttle # limits may apply. -# ### Documentation +# Documentation # ---- # https://developer.tdameritrade.com/account-access/apis/delete/accounts/%7BaccountId%7D/savedorders/%7BsavedOrderId%7D-0 -# ### Parameters +# Parameters # ---- # account_id: str (optional, Default=None) # The account number that contains the saved order @@ -233,7 +233,7 @@ # saved_order_id: str (optional, Default=None) # The saved order ID of the order you want to cancel. -# ### Usage +# Usage # ---- # >>> saved_orders_service = td_client.saved_orders() # >>> saved_orders_service.cancel_saved_order( diff --git a/td/rest/user_info.py b/td/rest/user_info.py index 617c156..5475260 100644 --- a/td/rest/user_info.py +++ b/td/rest/user_info.py @@ -18,13 +18,13 @@ class UserInfo: def __init__(self, session: TdAmeritradeSession) -> None: """Initializes the `UserInfo` services. - ### Parameters + Parameters ---- session : TdAmeritradeSession An authenticated `TDAmeritradeSession object. - ### Usage + Usage ---- >>> user_info_service = td_client.user_service() """ @@ -34,16 +34,16 @@ def __init__(self, session: TdAmeritradeSession) -> None: def get_preferences(self, account_id: str) -> dict: """Get's User Preferences for a specific account. - ### Documentation + Documentation ---- https://developer.tdameritrade.com/user-principal/apis/get/accounts/%7BaccountId%7D/preferences-0 - ### Parameters + Parameters ---- account_id: str The User's TD Ameritrade account ID. - ### Usage + Usage ---- >>> user_info_service = td_client.user_service() >>> user_info_service.get_preferences( @@ -59,16 +59,16 @@ def get_preferences(self, account_id: str) -> dict: def get_streamer_subscription_keys(self, account_ids: List[str]) -> dict: """SubscriptionKey for provided accounts or default accounts. - ### Documentation + Documentation ---- https://developer.tdameritrade.com/user-principal/apis/get/userprincipals/streamersubscriptionkeys-0 - ### Parameters + Parameters ---- account_ids: List[str] A list of account IDs. - ### Usage + Usage ---- >>> user_info_service = td_client.user_service() >>> user_info_service.get_streamer_subscription_keys( @@ -87,11 +87,11 @@ def get_streamer_subscription_keys(self, account_ids: List[str]) -> dict: def get_user_principals(self) -> dict: """Get's User principals details. - ### Documentation + Documentation ---- https://developer.tdameritrade.com/user-principal/apis/get/userprincipals-0 - ### Usage + Usage ---- >>> user_info_service = td_client.user_service() >>> user_info_service.get_user_principals() @@ -110,11 +110,11 @@ def update_user_preferences( ) -> dict: """Update preferences for a specific account. - ### Documentation + Documentation ---- https://developer.tdameritrade.com/user-principal/apis/put/accounts/%7BaccountId%7D/preferences-0 - ### Parameters + Parameters ---- account_id: str The User's TD Ameritrade account ID. @@ -123,7 +123,7 @@ def update_user_preferences( The preferences you want changed, either as a python dict or a `UserPreferences` object. - ### Usage + Usage ---- >>> user_service = td_client.user_service() >>> user_info_service.update_user_preferences( diff --git a/td/rest/watchlists.py b/td/rest/watchlists.py index 3a586b1..db9c9f2 100644 --- a/td/rest/watchlists.py +++ b/td/rest/watchlists.py @@ -16,7 +16,7 @@ class Watchlists: def __init__(self, session: TdAmeritradeSession) -> None: """Initializes the `Watchlists` services. - ### Parameters + Parameters ---- session : TdAmeritradeSession An authenticated `TDAmeritradeSession @@ -28,11 +28,11 @@ def __init__(self, session: TdAmeritradeSession) -> None: def get_all_accounts_watchlists(self) -> dict: """All watchlists for all of the user's linked accounts. - ### Documentation + Documentation ---- https://developer.tdameritrade.com/watchlist/apis/get/accounts/watchlists-0 - ### Usage + Usage ---- >>> watchlists_service = td_client.watchlists() >>> watchlists_service.get_all_accounts_watchlists() @@ -43,16 +43,16 @@ def get_all_accounts_watchlists(self) -> dict: def get_accounts_watchlist(self, account_id: str) -> dict: """Gets all the watchlists of an account. - ### Documentation + Documentation ---- https://developer.tdameritrade.com/watchlist/apis/get/accounts/%7BaccountId%7D/watchlists-0 - ### Parameters + Parameters ---- account_id: str The account number the watchlist belongs to. - ### Usage + Usage ---- >>> watchlists_service = td_client.watchlists() >>> watchlists_service.get_accounts_watchlist( @@ -67,11 +67,11 @@ def get_accounts_watchlist(self, account_id: str) -> dict: def get_watchlist(self, account_id: str, watchlist_id: str) -> dict: """Gets a specific watchlist for a specific account. - ### Documentation + Documentation ---- https://developer.tdameritrade.com/watchlist/apis/get/accounts/%7BaccountId%7D/watchlists/%7BwatchlistId%7D-0 - ### Parameters + Parameters ---- account_id: str The account number the watchlist belongs to. @@ -79,7 +79,7 @@ def get_watchlist(self, account_id: str, watchlist_id: str) -> dict: watchlist_id: str The watchlist ID you want to query. - ### Usage + Usage ---- >>> watchlists_service = td_client.watchlists() >>> watchlists_service.get_watchlist( @@ -97,16 +97,16 @@ def create_watchlist( ) -> dict: """Creates a new watchlist. - ### Overview + Overview ---- Create watchlist for specific account. This method does not verify that the symbol or asset type are valid. - ### Documentation + Documentation ---- https://developer.tdameritrade.com/watchlist/apis/post/accounts/%7BaccountId%7D/watchlists-0 - ### Parameters + Parameters ---- account_id: str The account number the watchlist belongs to. @@ -118,7 +118,7 @@ def create_watchlist( A list of items you want to add to your watchlist. - ### Usage + Usage ---- >>> watchlists_service = td_client.watchlists() >>> watchlists_service.create_watchlist( @@ -150,17 +150,17 @@ def update_watchlist( ) -> dict: """Updates an existing watchlist. - ### Overview + Overview ---- Partially update watchlist for a specific account: change watchlist name, add to the beginning/end of a watchlist, update or delete items in a watchlist. This method does not verify that the symbol or asset type are valid. - ### Documentation + Documentation ---- https://developer.tdameritrade.com/watchlist/apis/patch/accounts/%7BaccountId%7D/watchlists/%7BwatchlistId%7D-0 - ### Parameters + Parameters ---- account_id: str The account number the watchlist belongs to. @@ -175,7 +175,7 @@ def update_watchlist( A list of items you want to add to your watchlist. - ### Usage + Usage ---- >>> watchlists_service = td_client.watchlists() >>> watchlists_service.update_watchlist( @@ -211,17 +211,17 @@ def replace_watchlist( ) -> dict: """Replaces an existing watchlist. - ### Overview + Overview ---- This method does not verify that the symbol or asset type are valid. Additionally, this method from what I can see will only append on new values. It will not delete an old watchlist. - ### Documentation + Documentation ---- https://developer.tdameritrade.com/watchlist/apis/patch/accounts/%7BaccountId%7D/watchlists/%7BwatchlistId%7D-0 - ### Parameters + Parameters ---- account_id: str The account number the watchlist belongs to. @@ -236,7 +236,7 @@ def replace_watchlist( A list of items you want to add to your watchlist. - ### Usage + Usage ---- >>> watchlists_service = td_client.watchlists() >>> watchlists_service.replace_watchlist( @@ -270,11 +270,11 @@ def replace_watchlist( def delete_watchlist(self, account_id: str, watchlist_id: str) -> dict: """Deletes a watchlist for a specific account. - ### Documentation + Documentation ---- https://developer.tdameritrade.com/watchlist/apis/delete/accounts/%7BaccountId%7D/watchlists/%7BwatchlistId%7D-0. - ### Parameters + Parameters ---- account_id: str The account number the watchlist belongs to. @@ -282,7 +282,7 @@ def delete_watchlist(self, account_id: str, watchlist_id: str) -> dict: watchlist_id: str The watchlist ID you want to query. - ### Usage + Usage ---- >>> watchlists_service = td_client.watchlists() >>> watchlists_service.delete_watchlist(