Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error messages #47

Merged
merged 1 commit into from
Jan 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions martin_binance/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ def save_to_db(queue_to_db) -> None:
connection_analytic.commit()
except sqlite3.Error as err:
result = False
print(f"For save data into t_funds: {err}, try one else")
print(f"For save data into t_funds: {err}, retry")
else:
result = True
elif data.get('destination') == 't_orders':
Expand Down Expand Up @@ -1298,13 +1298,13 @@ def restore_strategy_state(self, strategy_state: Dict[str, str] = None) -> None:
self.cancel_grid()

elif grid_more and self.orders_init:
self.message_log('Restore, was placed some grid order(s)', tlg=True)
self.message_log('Restored, some grid order(s) was placed', tlg=True)

elif tp_placed:
self.message_log('Restore, was placed take profit order(s)', tlg=True)
self.message_log('Restored, take profit order(s) was placed', tlg=True)

else:
self.message_log('Restore, some else. Need investigations.', tlg=True)
self.message_log('Restored, unknown state. Investigation needed', tlg=True)
# self.unsuspend()

def start(self) -> None:
Expand Down Expand Up @@ -3148,7 +3148,7 @@ def on_place_order_error_string(self, place_order_id: int, error: str) -> None:
self.message_log(f"Order {place_order_id} placed", tlg=True)
self.on_place_order_success(place_order_id, order)
elif 'FAILED_PRECONDITION' not in error:
self.message_log(f"Trying place order {place_order_id} one else time", tlg=True)
self.message_log(f"Trying place order {place_order_id} one more time", tlg=True)
if self.orders_init.exist(place_order_id):
_buy, _amount, _price = self.orders_init.get_by_id(place_order_id)
self.orders_init.remove(place_order_id)
Expand Down Expand Up @@ -3223,7 +3223,7 @@ def on_cancel_order_error_string(self, order_id: int, error: str) -> None:
# Check all orders on exchange if not exists required
open_orders = self.get_buffered_open_orders(True) # lgtm [py/call/wrong-arguments]
if any(i.id == order_id for i in open_orders):
self.message_log(f"On cancel order {order_id} {error}, try one else", LogLevel.ERROR)
self.message_log(f"On cancel order {order_id} {error}, retry", LogLevel.ERROR)
self.cancel_order(order_id)
elif not STANDALONE:
self.message_log(f"On cancel order {order_id} {error}", LogLevel.ERROR)
Expand Down