From 8b20e60753542a0b992d548cccbe06933fc2d612 Mon Sep 17 00:00:00 2001 From: discountry Date: Sat, 11 Oct 2025 21:27:37 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E6=AD=A2=E6=8D=9F?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E9=80=BB=E8=BE=91=EF=BC=8C=E9=92=88=E5=AF=B9?= =?UTF-8?q?Aster=E6=9C=9F=E8=B4=A7=E8=B0=83=E6=95=B4reduceOnly=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E5=A4=84=E7=90=86=E4=BB=A5=E7=AC=A6=E5=90=88=E4=BA=A4?= =?UTF-8?q?=E6=98=93=E6=89=80=E8=A6=81=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/order-coordinator.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/order-coordinator.ts b/src/core/order-coordinator.ts index 9b0ddbd..1bb36bf 100644 --- a/src/core/order-coordinator.ts +++ b/src/core/order-coordinator.ts @@ -241,18 +241,22 @@ export async function placeStopLossOrder( } const priceTick = opts?.priceTick ?? 0.1; const qtyStep = opts?.qtyStep ?? 0.001; + const isAster = String((adapter as any).id ?? "").toLowerCase() === "aster"; const params: CreateOrderParams = { symbol, side, type, stopPrice: roundDownToTick(stopPrice, priceTick), - reduceOnly: "true", closePosition: "true", timeInForce: "GTC", // Do not round down stop quantity here to avoid underflow to exchange min; gateway will quantize precisely quantity, triggerType: "STOP_LOSS", }; + // For Aster futures, STOP orders must not include reduceOnly; omit it specifically. + if (!isAster) { + params.reduceOnly = "true"; + } // Avoid forcing price for STOP_MARKET globally; keep this exchange-specific in gateways await deduplicateOrders(adapter, symbol, openOrders, locks, timers, pendings, type, side, log); lockOperating(locks, timers, pendings, type, log);