pkmnct / robinhood-mint-sync-chrome

A browser extension that allows you to sync Robinhood and Mint
https://pkmnct.github.io/robinhood-mint-sync-chrome/
MIT License
53 stars 7 forks source link

Cash balance is being incorrectly set as buying power #44

Closed billvsd closed 3 years ago

billvsd commented 3 years ago

The "Robinhood Cash" balance is incorrectly being set as the Buying Power amount. For example, if you have a $50 cash balance in Robinhood (robinhood.com/cash) and $1,000 in buying power, the Chrome Extension is setting the "Robinhood Cash" account value at $1050 when it should be $50. Under the account menu, it may say $1,050 buying power, but the actual cash balance is $50.

billvsd commented 3 years ago

Screenshots for reference:

Mint-RobinhoodCashBalance RH-buyingPower RH-cash
superpowered commented 3 years ago

Hmmmm looks like they do provide us with this number under the cash_available_from_instant_deposits key. So we'd have to change the cash = parseFloat(request.uninvested_cash); -> cash = parseFloat(request.uninvested_cash) - parseFloat(request.cash_available_from_instant_deposits);. OR there is the withdrawable_cash key which seems to return the cash value without buying power, but I'm not as sure what other scenarios could affect said number.

pkmnct commented 3 years ago

@superpowered I believe there are some other cases where that number does not match up, such as just after a deposit occurs. I believe that subtracting cash_available_from_instant_deposits should be correct.

pkmnct commented 3 years ago

This change has been submitted to the Chrome Web Store and Firefox Add-on site.