removed minor conditionals in some endpoints
This commit is contained in:
parent
a5efd6e992
commit
56cbf51129
6
main.py
6
main.py
|
|
@ -1952,14 +1952,11 @@ def unwrapped_global_last_call():
|
||||||
jsonify: A jsonified dictionary detailing the outcome of the operation.
|
jsonify: A jsonified dictionary detailing the outcome of the operation.
|
||||||
'''
|
'''
|
||||||
try:
|
try:
|
||||||
if broker.get_pairs!=[]:
|
|
||||||
#broker.clear_pairs()
|
|
||||||
for instance in running_traders:
|
for instance in running_traders:
|
||||||
instance.status.set_stop_when_profit(True)
|
instance.status.set_stop_when_profit(True)
|
||||||
instance.config.set_autoswitch(False)
|
instance.config.set_autoswitch(False)
|
||||||
broker.logger.log_this("Modified flag",2,f"{instance.base}/{instance.quote}")
|
broker.logger.log_this("Modified flag",2,f"{instance.base}/{instance.quote}")
|
||||||
return jsonify({"Success": "All traders scheduled to go offline when profit is reached"})
|
return jsonify({"Success": "All traders scheduled to go offline when profit is reached"})
|
||||||
return jsonify({"Error": "No traders running"})
|
|
||||||
except Exception:
|
except Exception:
|
||||||
return jsonify({"Error": "Halp"})
|
return jsonify({"Error": "Halp"})
|
||||||
|
|
||||||
|
|
@ -1972,13 +1969,10 @@ def unwrapped_cancel_global_last_call():
|
||||||
jsonify: A jsonified dictionary detailing the outcome of the operation.
|
jsonify: A jsonified dictionary detailing the outcome of the operation.
|
||||||
'''
|
'''
|
||||||
try:
|
try:
|
||||||
if broker.get_pairs!=[]:
|
|
||||||
#broker.clear_pairs()
|
|
||||||
for instance in running_traders:
|
for instance in running_traders:
|
||||||
instance.status.set_stop_when_profit(False)
|
instance.status.set_stop_when_profit(False)
|
||||||
broker.logger.log_this("Modified flag",2,f"{instance.base}/{instance.quote}")
|
broker.logger.log_this("Modified flag",2,f"{instance.base}/{instance.quote}")
|
||||||
return jsonify({"Success": "Last call canceled"})
|
return jsonify({"Success": "Last call canceled"})
|
||||||
return jsonify({"Error": "No traders running"})
|
|
||||||
except Exception:
|
except Exception:
|
||||||
return jsonify({"Error": "Halp"})
|
return jsonify({"Error": "Halp"})
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue