Open chapchap33 opened 3 years ago
nice find. working on it now.
Do you know if there are any other urls besides 'received'?
I'm also playing with the get_bank_transfers() function but with a different issue. I'm only able to get the first page of results and my sums are massively off as this only goes back 50 transactions.
I get the output: Found Additional pages. Additional pages exist but could not be loaded.
digging deeper the nextData['next'] is producing a url of the form https://api.robinhood.com/public/ach/transfers/?cursor=XXX but then the request response is a 404 ?!
I happen to try the url stripping out 'public' and it looks to work now (doing manually but got a 2nd page of transfers). Looks to be bad url coming right from robinhood, but I think need to correct with a patch in the helper (?)
in the mean time and for whoever else encounter this problem, what I did to fix it was to change the line https://github.com/jmfernandes/robin_stocks/blob/8ffc27f91baa6dcf692d33628871e0867a49e3be/robin_stocks/robinhood/helper.py#L304
to looks like
res = SESSION.get(nextData['next'].replace('/public', ''))
By trying to get all transactions in my account using
r.get_bank_transfers()
, we can see some are missing. After investigating further, it looks like it's because I initiated a transfer from my bank rather than initiating it from Robinhood. While this URL exists:def banktransfers(): return('https://api.robinhood.com/ach/transfers/')
it looks like this one exists as well to collect received transfers from banks:https://api.robinhood.com/ach/received/transfers/
Do you think we should add another definition for the following URL?
https://api.robinhood.com/ach/received/transfers/