The logic of the trading cycle has been changed, fixed errors when setting TP and SL

This commit is contained in:
algizn97
2025-11-09 13:10:13 +05:00
parent 39bbe8d997
commit 7c85c03d10
4 changed files with 178 additions and 158 deletions

View File

@@ -75,6 +75,12 @@ async def start_trading_cycle(
commission_place=commission_place,
pnl_series=0
)
await rq.set_total_fee_user_auto_trading(
tg_id=tg_id, symbol=symbol, total_fee=0
)
await rq.set_fee_user_auto_trading(
tg_id=tg_id, symbol=symbol, fee=0
)
res = await open_positions(
tg_id=tg_id,
@@ -343,7 +349,6 @@ async def open_positions(
"triggerBy": "LastPrice",
"timeInForce": "GTC",
"positionIdx": 0,
"tpslMode": "Full",
}
response = client.place_order(**order_params)