2025.09.01
This commit is contained in:
parent
f5e5f4eb77
commit
a5efd6e992
|
|
@ -17,6 +17,7 @@ logs/gateio.log
|
|||
logs/kucoin.log
|
||||
upload_testnet.sh
|
||||
upload_mainnet.sh
|
||||
upload_local_testnet.sh
|
||||
utils/data/binance.db
|
||||
utils/data/okx.db
|
||||
utils/data/gateio.db
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
2025.09.01:
|
||||
. Fixed bug in unwrapped_last_call().
|
||||
|
||||
2025.08.19:
|
||||
. Improved log trimming.
|
||||
|
||||
|
|
|
|||
19
main.py
19
main.py
|
|
@ -18,7 +18,7 @@ import exchange_wrapper
|
|||
import trader
|
||||
|
||||
|
||||
version = "2025.08.19"
|
||||
version = "2025.09.01"
|
||||
|
||||
'''
|
||||
Color definitions. If you want to change them, check the reference at https://en.wikipedia.org/wiki/ANSI_escape_code#Colors
|
||||
|
|
@ -1871,16 +1871,15 @@ def unwrapped_last_call(base,quote):
|
|||
|
||||
try:
|
||||
symbol = f"{base}/{quote}"
|
||||
if symbol in broker.get_pairs(): #Why was this?
|
||||
for instance in running_traders:
|
||||
if symbol==instance.config.get_pair():
|
||||
instance.status.set_stop_when_profit(not instance.status.get_stop_when_profit())
|
||||
for instance in running_traders:
|
||||
if symbol==instance.config.get_pair():
|
||||
instance.status.set_stop_when_profit(not instance.status.get_stop_when_profit())
|
||||
instance.update_status(True)
|
||||
if instance.status.get_stop_when_profit():
|
||||
instance.config.set_autoswitch(False)
|
||||
instance.update_status(True)
|
||||
if instance.status.get_stop_when_profit():
|
||||
instance.config.set_autoswitch(False)
|
||||
instance.update_status(True)
|
||||
return jsonify({"Success": "Trader scheduled to go offline when profit is reached"})
|
||||
return jsonify({"Success": "Last call cancelled"})
|
||||
return jsonify({"Success": "Trader scheduled to go offline when profit is reached"})
|
||||
return jsonify({"Success": "Last call cancelled"})
|
||||
return jsonify({"Error": "Trader does not exist"})
|
||||
except Exception:
|
||||
return jsonify({"Error": "Halp"})
|
||||
|
|
|
|||
Loading…
Reference in New Issue