Skip to content

Commit

Permalink
1.3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
DogsTailFarmer committed Sep 24, 2023
1 parent d717f46 commit 830c7da
Show file tree
Hide file tree
Showing 7 changed files with 126 additions and 70 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
## 1.3.6 2023-09-24
### Fix
* Due to a rounding error, the order status was incorrectly fetched if it was partially completed

### Update
* Up requirements for exchanges-wrapper==1.3.7.post1

### Added for new features
* To boost trade in case of low market volatility: TP order is updated once every 15 minutes,
and in Reverse cycle grid update once an hour

## 1.3.5-1.dev1
* Fix: Error getting internal id while re-placing grid order

## 1.3.5-1.dev0
* Update: On-the-fly update assets with withdrawal and deposit operations also for Reverse cycle

## 1.3.5 2023-09-19
### Fix
* Fix: Incorrect calculated depo volume for grid update, not include held grid orders volume
Expand Down
2 changes: 1 addition & 1 deletion martin_binance/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
__author__ = "Jerry Fedorenko"
__copyright__ = "Copyright © 2021 Jerry Fedorenko aka VM"
__license__ = "MIT"
__version__ = "1.3.5"
__version__ = "1.3.6"
__maintainer__ = "Jerry Fedorenko"
__contact__ = "https://github.com/DogsTailFarmer"

Expand Down
158 changes: 99 additions & 59 deletions martin_binance/executor.py

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions martin_binance/margin_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
__author__ = "Jerry Fedorenko"
__copyright__ = "Copyright © 2021 Jerry Fedorenko aka VM"
__license__ = "MIT"
__version__ = "1.3.5"
__version__ = "1.3.6"
__maintainer__ = "Jerry Fedorenko"
__contact__ = "https://github.com/DogsTailFarmer"

Expand All @@ -23,7 +23,7 @@
import psutil

from colorama import init as color_init
from decimal import Decimal
from decimal import Decimal, ROUND_FLOOR
from pathlib import Path
from datetime import datetime, timedelta
from tqdm import tqdm
Expand Down Expand Up @@ -131,7 +131,7 @@ def order_trades_sum(_order_id: int) -> Decimal:
for _trade in StrategyBase.trades:
if _trade.order_id == _order_id:
saved_filled_quantity += Decimal(str(_trade.amount))
return saved_filled_quantity
return saved_filled_quantity.quantize(Decimal("1.01234567"), rounding=ROUND_FLOOR)


class PrivateTrade:
Expand Down Expand Up @@ -1025,7 +1025,8 @@ async def buffered_orders():
_id = int(order['orderId'])
exch_orders.append(_id)
if (order.get('status') == 'PARTIALLY_FILLED'
and order_trades_sum(_id) < Decimal(order['executedQty'])):
and order_trades_sum(_id) < Decimal(order['executedQty']).quantize(Decimal("1.01234567"),
rounding=ROUND_FLOOR)):
diff_id.add(_id)

# Missed fill event list
Expand Down
6 changes: 2 additions & 4 deletions martin_binance/service/relaunch.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
__author__ = "Jerry Fedorenko"
__copyright__ = "Copyright © 2021 Jerry Fedorenko aka VM"
__license__ = "MIT"
__version__ = "1.3.4"
__version__ = "1.3.6"
__maintainer__ = "Jerry Fedorenko"
__contact__ = 'https://github.com/DogsTailFarmer'
##################################################################
Expand All @@ -18,9 +18,7 @@
time.sleep(10)

server = libtmux.Server()
session = [s for s in server.sessions if s.name == "Trade"][0]

if session:
if session := [s for s in server.sessions if s.name == "Trade"][0]:
for window in session.windows:
if window.name == 'srv':
window.attached_pane.send_keys('exchanges-wrapper-srv', enter=True)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dynamic = ["version", "description"]
requires-python = ">=3.8"

dependencies = [
"exchanges-wrapper==1.3.7",
"exchanges-wrapper==1.3.7.post1",
"margin-strategy-sdk==0.0.11",
"jsonpickle==3.0.2",
"psutil==5.9.5",
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
exchanges-wrapper==1.3.7
exchanges-wrapper==1.3.7.post1
margin-strategy-sdk==0.0.11
jsonpickle==3.0.2
psutil==5.9.5
Expand Down

0 comments on commit 830c7da

Please sign in to comment.