diff --git a/robin_stocks/robinhood/account.py b/robin_stocks/robinhood/account.py index 5c131a9..2d58af2 100644 --- a/robin_stocks/robinhood/account.py +++ b/robin_stocks/robinhood/account.py @@ -406,6 +406,20 @@ def get_bank_transfers(direction=None, info=None): data = request_get(url, 'pagination') return(filter_data(data, info)) +@login_required +def get_unified_transfers(info=None): + """Returns all transfers made for the account. + + :param info: Will filter the results to get a specific value. + :type info: Optional[str] + :returns: Returns a list of dictionaries of key/value pairs for each transfer. If info parameter is provided, \ + a list of strings is returned where the strings are the value of the key that matches info. + + """ + url = unifiedtransfers_url() + data = request_get(url, 'results') + return(filter_data(data, info)) + @login_required def get_card_transactions(cardType=None, info=None): """Returns all debit card transactions made on the account diff --git a/robin_stocks/robinhood/urls.py b/robin_stocks/robinhood/urls.py index 3d5f99b..353352a 100644 --- a/robin_stocks/robinhood/urls.py +++ b/robin_stocks/robinhood/urls.py @@ -107,6 +107,9 @@ def banktransfers_url(direction=None): def cardtransactions_url(): return('https://minerva.robinhood.com/history/transactions/') +def unifiedtransfers_url(): + return('https://bonfire.robinhood.com/paymenthub/unified_transfers/') + def daytrades_url(account): return('https://api.robinhood.com/accounts/{0}/recent_day_trades/'.format(account))