From dad0b1cd6cd39d2525f23b1b33df19932fc4cddb Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Mon, 29 Jun 2026 11:28:27 +0800
Subject: [PATCH] 止损追单逻辑(多仓/空仓对称): 触发 → 查询 → 计算 → 下单 清理:取消相邻网格旧挂单 + 取消最远止盈单 一句话总结:每次止损触发补回 quantity*2 张,但总持仓不超 maxPositionSize,也不再累加放大。
---
src/main/java/com/xcong/excoin/modules/contract/parameter/dto/ProfitOrLessDto.java | 21 ++++-----------------
1 files changed, 4 insertions(+), 17 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/modules/contract/parameter/dto/ProfitOrLessDto.java b/src/main/java/com/xcong/excoin/modules/contract/parameter/dto/ProfitOrLessDto.java
index 454e628..ea0e60f 100644
--- a/src/main/java/com/xcong/excoin/modules/contract/parameter/dto/ProfitOrLessDto.java
+++ b/src/main/java/com/xcong/excoin/modules/contract/parameter/dto/ProfitOrLessDto.java
@@ -17,26 +17,13 @@
@ApiModel(value = "ProfitOrLessDto", description = "设置止盈止损接口参数类")
public class ProfitOrLessDto {
- /**
- * 类型 止盈
- */
- public static final int TYPE_PROFIT = 1;
-
- /**
- * 类型 止损
- */
- public static final int TYPE_LESS = 2;
-
@NotNull
@ApiModelProperty(value = "订单ID", example = "1")
private Long id;
- @NotNull
- @ApiModelProperty(value = "类型 1-止盈2-止损", example = "1")
- private Integer type;
+ @ApiModelProperty(value = "止盈价", example = "9000.00")
+ private BigDecimal stopProfitPrice;
- @NotNull
- @Min(0)
- @ApiModelProperty(value = "目标价格", example = "9000.00")
- private BigDecimal price;
+ @ApiModelProperty(value = "止损价", example = "9000.00")
+ private BigDecimal stopLessPrice;
}
--
Gitblit v1.9.1