migration line

This commit is contained in:
Nicolás Sánchez 2025-08-27 18:57:34 -03:00
parent 3a4ce2311e
commit c4cfa40577
3 changed files with 4 additions and 11 deletions

View File

@ -18,7 +18,7 @@ import exchange_wrapper
import trader 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 Color definitions. If you want to change them, check the reference at https://en.wikipedia.org/wiki/ANSI_escape_code#Colors

View File

@ -8,7 +8,6 @@ Mandatory:
4. Implement api key hashing. 4. Implement api key hashing.
5. Dockerize. 5. Dockerize.
6. Inspect orderbook liquidity prior to changing mode from short to long (big sell market order needs to have liquidity). 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: Would be nice to have:

View File

@ -945,7 +945,7 @@ class trader:
#It can happen if the max amount of concurrent orders is modified through an API call. #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() 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: 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 #Cooldown
time.sleep(self.broker.get_wait_time()) time.sleep(self.broker.get_wait_time())
@ -1626,14 +1626,8 @@ class trader:
self.quit = True self.quit = True
return 1 return 1
#Safety order list does not need refreshing #MIGRATION: ONCE MIGRATION IS DONE, REMOVE THIS LINE
#Probably validation while migrating to the new version. #self.status.set_safety_orders([self.status.status_dictionary["safety_order"]])
#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)
#Done #Done
self.pause = False self.pause = False