You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.
'cash_available_from_instant_deposits' appears to always return from Robinhood as the entire initial deposit and does not subtract any usage of that deposit ('instant_allocated' appears to be the amount used) This can result in 'cash' ending up as a negative number creating the addition of ''cash_available_from_instant_deposits' to 'stock'
Removing the subtraction of 'cash' from 'stock' and 'request.cash_available_from_instant_deposits' from 'uninvested_cash` resolves this issue for me locally, but i assume there is a case unknown to me where this subtraction is necessary.
For example what is happening with my current account.
cash = 1 - 1000 // -999
stock = 1000 - ( -999 ) // 1999
@chris14991 this subtraction was a change as a result of the Robinhood Cash balance being set as the cash balance + buying power that I reported in issue #44.
Currently, my Robinhood Cash Balance is not being correctly recorded with the extension because of the calculation cash = parseFloat(request.uninvested_cash) - parseFloat(request.cash_available_from_instant_deposits); results in a negative number.
@pkmnct I believe the following changes will fix this issue.
content/robinhood/main.ts : add instant_allocated to returnValue if (json.instant_allocated && json.instant_allocated.amount) { returnValue.instant_allocated = json.instant_allocated.amount; }
content/mint/properties/update.js: subtract cash_available_from_instant_deposits from instant_allocated if (request.uninvested_cash) { cash = parseFloat(request.uninvested_cash) - (parseFloat(request.cash_available_from_instant_deposits) - parseFloat(request.instant_allocated) ); }
This screenshot from Robinhood shows the "Instant Available"
In my case, the current values are:
uninvested_cash = 0
cash_available_from_instant_deposits = 10
insant_allocated = 10
The current calculation was 0 - 10, resulting in -10.
By subtracting the instant_allocated, the calculation becomes 0 - (10 - 10) which is the correct result. The Mint UI does not allow negative numbers which is why my cash balance was stuck at an incorrect value.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
'cash_available_from_instant_deposits' appears to always return from Robinhood as the entire initial deposit and does not subtract any usage of that deposit ('instant_allocated' appears to be the amount used) This can result in 'cash' ending up as a negative number creating the addition of ''cash_available_from_instant_deposits' to 'stock'
Removing the subtraction of 'cash' from 'stock' and 'request.cash_available_from_instant_deposits' from 'uninvested_cash` resolves this issue for me locally, but i assume there is a case unknown to me where this subtraction is necessary.
For example what is happening with my current account.
cash = 1 - 1000 // -999
stock = 1000 - ( -999 ) // 1999
The text was updated successfully, but these errors were encountered: