|
@@ -209,12 +209,12 @@ def buy(amount=None, object_name=None, limit='', stop_loss='', time_until_expira
|
|
|
'to see if the order has been executed already.')
|
|
|
|
|
|
|
|
|
-def sell(amount=None, object_name=None, limit=None, stop_loss='', time_until_expiration=None):
|
|
|
+def sell(amount=None, object_name=None, limit='', stop_loss='', time_until_expiration=None):
|
|
|
if object_name is None: # TODO list some available objects
|
|
|
object_name = input('Name of object to sell: ')
|
|
|
if amount is None:
|
|
|
amount = input('Amount: ')
|
|
|
- if limit is None:
|
|
|
+ if limit == '':
|
|
|
set_limit = yn_dialog('Do you want to place a limit?')
|
|
|
if set_limit:
|
|
|
limit = input('Limit: ')
|
|
@@ -222,7 +222,7 @@ def sell(amount=None, object_name=None, limit=None, stop_loss='', time_until_exp
|
|
|
else:
|
|
|
limit = None
|
|
|
stop_loss = None
|
|
|
- if limit is not None and stop_loss == '':
|
|
|
+ if limit != '' and stop_loss == '':
|
|
|
stop_loss = yn_dialog('Is this a stop-loss limit?')
|
|
|
|
|
|
if time_until_expiration is None:
|