Closed Njreardo closed 6 years ago
It is available as buying_power in rh.get_account(), with more details in margin_balances
#!/usr/bin/env python3
from Robinhood import Robinhood
import json
# load username and password
from userInfo import username,password
#Setup
rh = Robinhood();
#login
rh.login(username=username, password=password)
account = rh.get_account()
portfolio = rh.portfolios()
positoons = rh.positions()
print("Account", json.dumps(account,indent=3))
print("Portfolio", json.dumps(portfolio,indent=3))
print("Positions", json.dumps(positions,indent=3))
Just wanted to note that, at least when I compared the numbers provided in my own account, "Buying power" in the RH app is actually "unallocated_margin_cash" under "margin_balances" in get_account() response. At least for a margin account (might be different for cash account). I'm actually not sure what the "buying_power" value is yet.
edit: to clarify, "buying_power" overstated my buying power relative to what the app says.
Is there a way to do this with this API?