From 37476ea4bc8c0055d3bea9b2a2ede98157da03a0 Mon Sep 17 00:00:00 2001 From: discountry Date: Wed, 26 Nov 2025 22:53:36 +0800 Subject: [PATCH] fix: ensure explicit size is always sent for close-position MARKET orders in ParadexGateway to comply with exchange requirements --- src/exchanges/paradex/gateway.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/exchanges/paradex/gateway.ts b/src/exchanges/paradex/gateway.ts index 236bfd0..3df8523 100644 --- a/src/exchanges/paradex/gateway.ts +++ b/src/exchanges/paradex/gateway.ts @@ -599,8 +599,8 @@ export class ParadexGateway { try { const isClosePosition = (extraParams as any).closePosition === true; - // Only omit amount for MARKET close-position orders; STOP requires explicit size - const shouldOmitAmount = isClosePosition && type === "market"; + // Paradex requires explicit size for close-position MARKET orders; always send amount + const shouldOmitAmount = false; const amountArg: any = shouldOmitAmount ? undefined : amount; if (!shouldOmitAmount && amountArg != null && extraParams.size === undefined) { extraParams.size = amountArg.toString();