From 45a8a42e3eec8feca80dfdc6b3a433c22c9012bc Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Wed, 20 May 2026 09:57:34 +0800
Subject: [PATCH] fix(trade): 修复条件单取消逻辑并添加回调支持
---
src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java | 8 ++++----
1 files changed, 4 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 02c2304..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,7 @@
List<GridElement> allShortOrders = GridElement.findAllShortOrders(longEntryPrice);
if (CollUtil.isNotEmpty(allShortOrders)){
for (GridElement e : allShortOrders) {
- executor.cancelOrder(
+ executor.cancelConditionalOrder(
e.getShortOrderId(),
orderId -> {
shortEntryTraderIdParam(
@@ -454,7 +454,7 @@
List<GridElement> allLongOrders = GridElement.findAllLongOrders(shortEntryPrice);
if (CollUtil.isNotEmpty(allLongOrders)){
for (GridElement e : allLongOrders) {
- executor.cancelOrder(
+ executor.cancelConditionalOrder(
e.getLongOrderId(),
orderId -> {
shortEntryTraderIdParam(
@@ -1112,7 +1112,7 @@
){
executor.placeConditionalEntryOrder(
downShortTraderParam.getEntryPrice(),
- FuturesPriceTrigger.RuleEnum.NUMBER_2,
+ FuturesPriceTrigger.RuleEnum.NUMBER_1,
negate(downShortTraderParam.getQuantity()),
orderId ->
{
@@ -1134,7 +1134,7 @@
){
executor.placeConditionalEntryOrder(
downLongTraderParam.getEntryPrice(),
- FuturesPriceTrigger.RuleEnum.NUMBER_2,
+ FuturesPriceTrigger.RuleEnum.NUMBER_1,
downLongTraderParam.getQuantity(),
orderId ->
{
--
Gitblit v1.9.1