forked from kodorvan/stcs
The logic of the trading cycle has been changed, fixed errors when setting TP and SL
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user