diff --git a/docs/client.rst b/docs/client.rst index 08157df..eeffb32 100644 --- a/docs/client.rst +++ b/docs/client.rst @@ -347,4 +347,8 @@ Transaction History :members: :undoc-members: +---------------- +User Preferences +---------------- +.. automethod:: schwab.client.Client.get_user_preferences diff --git a/schwab/client/base.py b/schwab/client/base.py index 3c27a12..a926367 100644 --- a/schwab/client/base.py +++ b/schwab/client/base.py @@ -418,6 +418,7 @@ def get_transaction(self, account_hash, transaction_id): account_hash, transaction_id) return self._get_request(path, {}) + ########################################################################## # Price History @@ -540,7 +541,6 @@ def get_price_history( ########################################################################## # Price history utilities - def __normalize_start_and_end_datetimes(self, start_datetime, end_datetime): if start_datetime is None: start_datetime = datetime.datetime(year=1971, month=1, day=1) @@ -940,3 +940,11 @@ def get_option_chain( return self._get_request(path, params) + ########################################################################## + # User Info and Preferences + + def get_user_preferences(self, account_id): + '''Preferences for the logged in account, including all linked + accounts.''' + path = '/trader/v1/userPreference' + return self._get_request(path, ())