Skip to content

Commit

Permalink
small ally fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
NelsonDane committed Aug 8, 2023
1 parent 5d39bbe commit 7ef8ac4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions allyAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def ally_transaction(
print()
# Set the action
price = ally.Order.Market()
if isinstance(orderObj.get_price(), float) or isinstance(orderObj.get_price(), int):
if isinstance(orderObj.get_price(), (int, float)):
print(f"Limit order at: ${float(orderObj.get_price())}")
price = ally.Order.Limit(limpx=float(orderObj.get_price()))
for s in orderObj.get_stocks():
Expand All @@ -142,7 +142,6 @@ def ally_transaction(
price=price,
time=orderObj.get_time(),
qty=orderObj.get_amount(),
# account=account # This fails if account is not an integer
)
# Print order preview
print(f"{key} {account}: {str(o)}")
Expand Down

0 comments on commit 7ef8ac4

Please sign in to comment.