From f59fff5888538b6c3db66f0e3ee29494a40ee404 Mon Sep 17 00:00:00 2001 From: DogsTailFarmer Date: Sun, 17 Sep 2023 23:59:36 +0300 Subject: [PATCH] 1.3.5b4 --- CHANGELOG.md | 1 + martin_binance/__init__.py | 2 +- martin_binance/executor.py | 6 ++++-- martin_binance/margin_wrapper.py | 4 ---- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 952ccdf..6a190a4 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +* Fix: Incorrect calculated depo volume for grid update, not include held grid orders volume * Fix: tmp converted when restored MS_ORDERS from list to dict (inter-version compatibility) ## 1.3.4rc5-1 2023-08-24 diff --git a/martin_binance/__init__.py b/martin_binance/__init__.py index f658c25..95d55f3 100644 --- a/martin_binance/__init__.py +++ b/martin_binance/__init__.py @@ -6,7 +6,7 @@ __author__ = "Jerry Fedorenko" __copyright__ = "Copyright © 2021 Jerry Fedorenko aka VM" __license__ = "MIT" -__version__ = "1.3.5b3" +__version__ = "1.3.5b4" __maintainer__ = "Jerry Fedorenko" __contact__ = "https://github.com/DogsTailFarmer" diff --git a/martin_binance/executor.py b/martin_binance/executor.py index f427043..46c271f 100644 --- a/martin_binance/executor.py +++ b/martin_binance/executor.py @@ -4,7 +4,7 @@ __author__ = "Jerry Fedorenko" __copyright__ = "Copyright © 2021 Jerry Fedorenko aka VM" __license__ = "MIT" -__version__ = "1.3.4rc4-5" +__version__ = "1.3.5b4" __maintainer__ = "Jerry Fedorenko" __contact__ = 'https://github.com/DogsTailFarmer' ################################################################## @@ -2953,7 +2953,9 @@ def cancel_grid(self, cancel_all=False): self.cancel_order_exp(_id, cancel_all=cancel_all) elif self.grid_remove: self.message_log("cancel_grid: Ended", log_level=LogLevel.DEBUG) - sum_amount = self.orders_save.sum_amount(self.cycle_buy) if self.grid_update_started else Decimal('0.0') + sum_amount = ((self.orders_save.sum_amount(self.cycle_buy) + + self.orders_hold.sum_amount(self.cycle_buy)) + if self.grid_update_started else Decimal('0.0')) self.orders_save.orders_list.clear() self.orders_hold.orders_list.clear() self.grid_remove = None diff --git a/martin_binance/margin_wrapper.py b/martin_binance/margin_wrapper.py index 0b643f1..784c272 100644 --- a/martin_binance/margin_wrapper.py +++ b/martin_binance/margin_wrapper.py @@ -546,10 +546,6 @@ def place_limit_order(self, buy: bool, amount: Decimal, price: Decimal) -> int: color=ms.Style.B_YELLOW) loop.create_task(place_limit_order_timeout(cls.order_id)) loop.create_task(create_limit_order(cls.order_id, buy, any2str(amount), any2str(price))) - if cls.exchange == 'huobi': - time.sleep(0.02) - elif cls.exchange == 'okx': - time.sleep(0.035) return cls.order_id def get_buffered_completed_trades(self, _get_all_trades: bool = False) -> List[PrivateTrade]: