make codespell happy

This commit is contained in:
Jamie
2021-03-18 16:00:30 -04:00
parent 58c6d18054
commit c65617e6db
3 changed files with 12 additions and 12 deletions

View File

@@ -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:
![hold](https://user-images.githubusercontent.com/18151143/111685384-3c6ab080-87fe-11eb-80ce-9b256c396bf2.png)
## 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:
![hist](https://user-images.githubusercontent.com/18151143/111685390-3d9bdd80-87fe-11eb-90f9-7ca8b0c1e7f8.png)
![rhhist](https://user-images.githubusercontent.com/18151143/111685390-3d9bdd80-87fe-11eb-90f9-7ca8b0c1e7f8.png)

View File

@@ -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":

View File

@@ -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)
)