From 57e9818d263a7795b0099d708cdce2c2d3dd1761 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Wed, 20 May 2026 09:59:29 +0800
Subject: [PATCH] config(exchange): 切换到实盘配置并更新交易参数

---
 src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java |   26 ++++++++++++++++++++++----
 1 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java b/src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java
index 2f1487b..b746605 100644
--- a/src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java
+++ b/src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java
@@ -421,7 +421,16 @@
                     List<GridElement> allShortOrders = GridElement.findAllShortOrders(longEntryPrice);
                     if (CollUtil.isNotEmpty(allShortOrders)){
                         for (GridElement e : allShortOrders) {
-                            executor.cancelOrder(e.getShortOrderId());
+                            executor.cancelConditionalOrder(
+                                    e.getShortOrderId(),
+                                    orderId -> {
+                                        shortEntryTraderIdParam(
+                                                e,
+                                                null,
+                                                false
+                                        );
+                                    }
+                            );
                         }
                     }
                 }
@@ -445,7 +454,16 @@
                     List<GridElement> allLongOrders = GridElement.findAllLongOrders(shortEntryPrice);
                     if (CollUtil.isNotEmpty(allLongOrders)){
                         for (GridElement e : allLongOrders) {
-                            executor.cancelOrder(e.getLongOrderId());
+                            executor.cancelConditionalOrder(
+                                    e.getLongOrderId(),
+                                    orderId -> {
+                                        shortEntryTraderIdParam(
+                                                e,
+                                                null,
+                                                false
+                                        );
+                                    }
+                            );
                         }
                     }
                 }
@@ -1094,7 +1112,7 @@
                     ){
                         executor.placeConditionalEntryOrder(
                                 downShortTraderParam.getEntryPrice(),
-                                FuturesPriceTrigger.RuleEnum.NUMBER_2,
+                                FuturesPriceTrigger.RuleEnum.NUMBER_1,
                                 negate(downShortTraderParam.getQuantity()),
                                 orderId ->
                                 {
@@ -1231,7 +1249,7 @@
                     ){
                         executor.placeConditionalEntryOrder(
                                 downLongTraderParam.getEntryPrice(),
-                                FuturesPriceTrigger.RuleEnum.NUMBER_1,
+                                FuturesPriceTrigger.RuleEnum.NUMBER_2,
                                 config.getQuantity(),
                                 orderId ->
                                 {

--
Gitblit v1.9.1