From 09ff4dc29646eba844d5361376c92b7491948ffb Mon Sep 17 00:00:00 2001 From: discountry Date: Sat, 11 Oct 2025 21:45:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=A7=BB=E9=99=A4=E4=B8=8D=E5=BF=85?= =?UTF-8?q?=E8=A6=81=E7=9A=84=E6=95=B0=E9=87=8F=E5=8F=82=E6=95=B0=EF=BC=8C?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=AD=A2=E6=8D=9F=E5=92=8C=E5=B8=82=E4=BB=B7?= =?UTF-8?q?=E5=B9=B3=E4=BB=93=E8=AE=A2=E5=8D=95=E9=80=BB=E8=BE=91=E4=BB=A5?= =?UTF-8?q?=E7=A1=AE=E4=BF=9D=E7=B2=BE=E7=A1=AE=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/order-coordinator.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/core/order-coordinator.ts b/src/core/order-coordinator.ts index a0caec4..de72d73 100644 --- a/src/core/order-coordinator.ts +++ b/src/core/order-coordinator.ts @@ -247,7 +247,7 @@ export async function placeStopLossOrder( } } const priceTick = opts?.priceTick ?? 0.1; - const qtyStep = opts?.qtyStep ?? 0.001; + const params: CreateOrderParams = { symbol, side, @@ -255,7 +255,6 @@ export async function placeStopLossOrder( stopPrice: roundDownToTick(stopPrice, priceTick), closePosition: "true", timeInForce: "GTC", - quantity, triggerType: "STOP_LOSS", }; @@ -343,16 +342,14 @@ export async function marketClose( const type = "MARKET"; if (isOperating(locks, type)) return; if (!enforceMarkPriceGuard(side, guard?.expectedPrice ?? null, guard, log, "市价平仓")) return; - const qtyStep = opts?.qtyStep ?? 0.001; - const roundedQty = roundQtyDownToStep(quantity, qtyStep); - const safeQty = roundedQty > 0 ? roundedQty : quantity; + const params: CreateOrderParams = { symbol, side, type, - quantity: safeQty, closePosition: "true", }; + await deduplicateOrders(adapter, symbol, openOrders, locks, timers, pendings, type, side, log); lockOperating(locks, timers, pendings, type, log); try {