mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-07 09:52:13 +00:00
make codespell happy
This commit is contained in:
@@ -6,13 +6,13 @@ Once this screen is accessed, the first command to be run is
|
||||
````
|
||||
login
|
||||
````
|
||||
Which will use your robinhood login infomation, which should be stored as environment variables or in the config_terminal.py
|
||||
Which will use your robinhood login information, which should be stored as environment variables or in the config_terminal.py
|
||||
|
||||
Currently there are 2 options:
|
||||
* [hold](#hold)
|
||||
* Look at current (stock only) holdings
|
||||
* [hist](#hist)
|
||||
* Get and plot historical portfolio
|
||||
* [rhhist](#rhhist)
|
||||
* Get and plot rhhistorical portfolio
|
||||
|
||||
## hold <a name="hold"></a>
|
||||
|
||||
@@ -26,10 +26,10 @@ the % change from previous close.
|
||||
|
||||
Example:
|
||||

|
||||
## hist <a name="hist"></a>
|
||||
## rhhist <a name="rhhist"></a>
|
||||
Display your RH portfolio based on provided interval and span. Based on the API data availablility, plotted as a candlestick chart.
|
||||
````
|
||||
usage: hist [-s --span] [-i --interval]
|
||||
usage: rhhist [-s --span] [-i --interval]
|
||||
````
|
||||
* -s/--span : How long to look back. Defaults to the day. Options:
|
||||
* [day, week, month, 3month, year, 5year, all]
|
||||
@@ -37,4 +37,4 @@ usage: hist [-s --span] [-i --interval]
|
||||
* [5minute, 10minute, hour, day, week]
|
||||
|
||||
Example Default Output:
|
||||

|
||||

|
||||
@@ -21,14 +21,14 @@ def print_port(show_login):
|
||||
if show_login:
|
||||
print(" login login")
|
||||
print(" hold look at current holdings")
|
||||
print(" hist look at historical portfolio")
|
||||
print(" rhhist look at historical portfolio")
|
||||
print(" ")
|
||||
|
||||
|
||||
def port_menu():
|
||||
plt.close("all")
|
||||
port_parser = argparse.ArgumentParser(prog="port", add_help=False)
|
||||
choices = ["help", "q", "quit", "hold", "hist", "login", "logoff"]
|
||||
choices = ["help", "q", "quit", "hold", "rhhist", "login", "logoff"]
|
||||
port_parser.add_argument("cmd", choices=choices)
|
||||
completer = NestedCompleter.from_nested_dict({c: None for c in choices})
|
||||
should_print_help = True
|
||||
@@ -81,7 +81,7 @@ def port_menu():
|
||||
print(e)
|
||||
print("")
|
||||
|
||||
elif ns_known_args.cmd == "hist":
|
||||
elif ns_known_args.cmd == "rhhist":
|
||||
rh_api.plot_historical(l_args)
|
||||
|
||||
elif ns_known_args.cmd == "login":
|
||||
|
||||
@@ -110,15 +110,15 @@ def plot_historical(l_args):
|
||||
"Invalid Span: Must be one of : day, week, month, 3month, year, 5year, all"
|
||||
)
|
||||
|
||||
hist = r.account.get_historical_portfolio(
|
||||
rhhist = r.account.get_historical_portfolio(
|
||||
ns_parser.interval, span=ns_parser.span
|
||||
)
|
||||
hist_eq = hist["equity_historicals"]
|
||||
rhhist_eq = rhhist["equity_historicals"]
|
||||
open_eq = []
|
||||
close_eq = []
|
||||
time = []
|
||||
|
||||
for h in hist_eq:
|
||||
for h in rhhist_eq:
|
||||
time.append(
|
||||
dt.strptime(h["begins_at"], dt_format) - datetime.timedelta(hours=4)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user