Skip to content

Commit

Permalink
fix all brokers command
Browse files Browse the repository at this point in the history
  • Loading branch information
NelsonDane committed Oct 10, 2023
1 parent ccbff02 commit 414dfe1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions autoRSA.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,13 @@ def argParser(args: list) -> stockOrder:
orderObj.set_amount(args[1])
for stock in args[2].split(","):
orderObj.set_stock(stock.upper())
# If next argument is a broker, set broker
for broker in args[3].split(","):
if nicknames(broker) in SUPPORTED_BROKERS:
orderObj.set_brokers(nicknames(broker))
# Next argument is a broker, set broker
if args[3].lower() == "all":
orderObj.set_brokers(SUPPORTED_BROKERS)
else:
for broker in args[3].split(","):
if nicknames(broker) in SUPPORTED_BROKERS:
orderObj.set_brokers(nicknames(broker))
# If next argument is not, set not broker
if len(args) > 4 and args[4].lower() == "not":
for broker in args[5].split(","):
Expand Down

0 comments on commit 414dfe1

Please sign in to comment.