migration line
This commit is contained in:
parent
3a4ce2311e
commit
c4cfa40577
2
main.py
2
main.py
|
|
@ -18,7 +18,7 @@ import exchange_wrapper
|
|||
import trader
|
||||
|
||||
|
||||
version = "2025.08.25"
|
||||
version = "2025.08.27"
|
||||
|
||||
'''
|
||||
Color definitions. If you want to change them, check the reference at https://en.wikipedia.org/wiki/ANSI_escape_code#Colors
|
||||
|
|
|
|||
1
todo.txt
1
todo.txt
|
|
@ -8,7 +8,6 @@ Mandatory:
|
|||
4. Implement api key hashing.
|
||||
5. Dockerize.
|
||||
6. Inspect orderbook liquidity prior to changing mode from short to long (big sell market order needs to have liquidity).
|
||||
7. Use create_orders ccxt method to send the batch of safety orders (Binance does not support it in spot trading)
|
||||
|
||||
|
||||
Would be nice to have:
|
||||
|
|
|
|||
12
trader.py
12
trader.py
|
|
@ -945,7 +945,7 @@ class trader:
|
|||
#It can happen if the max amount of concurrent orders is modified through an API call.
|
||||
max_orders = self.config.get_concurrent_safety_orders() if not self.status.get_is_boosted() else self.config.get_boosted_concurrent_safety_orders()
|
||||
if len(self.status.get_safety_orders())<max_orders:
|
||||
self.send_new_safety_order_batch(len(filled_safety_orders))
|
||||
self.send_new_safety_order_batch(max_orders-len(self.status.get_safety_orders()))
|
||||
#Cooldown
|
||||
time.sleep(self.broker.get_wait_time())
|
||||
|
||||
|
|
@ -1626,14 +1626,8 @@ class trader:
|
|||
self.quit = True
|
||||
return 1
|
||||
|
||||
#Safety order list does not need refreshing
|
||||
#Probably validation while migrating to the new version.
|
||||
#Refresh safety orders
|
||||
#new_order_list = []
|
||||
#for order in self.status.get_safety_orders():
|
||||
# new_order_list.append(self.broker.get_order(order["id"],self.status.get_pair()))
|
||||
# time.sleep(self.broker.get_wait_time())
|
||||
#self.status.set_safety_orders(new_order_list)
|
||||
#MIGRATION: ONCE MIGRATION IS DONE, REMOVE THIS LINE
|
||||
#self.status.set_safety_orders([self.status.status_dictionary["safety_order"]])
|
||||
|
||||
#Done
|
||||
self.pause = False
|
||||
|
|
|
|||
Loading…
Reference in New Issue