Skip to content

Commit

Permalink
Merge pull request #487 from SolarWolf-Code/unified-transfers
Browse files Browse the repository at this point in the history
Unified transfers
  • Loading branch information
jmfernandes authored Oct 12, 2024
2 parents 4fcfb42 + 00bfd04 commit c033856
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
14 changes: 14 additions & 0 deletions robin_stocks/robinhood/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions robin_stocks/robinhood/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down

0 comments on commit c033856

Please sign in to comment.