Administrator
2025-12-16 45572e4fa21220854faaef378248d8322b59da7a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package com.xcong.excoin.modules.okxNewPrice.okxpi.trade;
 
import com.xcong.excoin.modules.okxNewPrice.okxpi.trade.vo.SellOrderVo;
import lombok.Data;
 
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
 
@Data
public class TradeRequestSell implements Serializable {
    /**
     * 实现了 Serializable 接口,rabbitmq可以直接发送它,但需要确保 SimpleMessageConverter 能够处理它(对象简单,不是复杂的对象)
     */
    private static final long serialVersionUID = 1L;
 
    private Long strategiesId;//策略ID  ReturnVo.strategyId
 
    private String tradeCode;//自定义订单编号
 
    private BigDecimal rangeRatio;//区域比率
 
    private BigDecimal incomePrice;//平仓传入价格
 
    private Double tradeCnt;//交易数量  ReturnVo.quantity
    /**
     *     限定价格
     *         限定价格为0的时候,表示市价操作当前订单
     */
    private String limitPrice = "0";
    /**
     * 产品ID,如 BTC-USDT
     */
    private String instId; //ReturnVo.instId
    /**
     * 持仓方向
     * 在开平仓模式下必填,且仅可选择 long 或 short。 仅适用交割、永续。
     * 1-long 2-short
     */
    private Integer positionSide = 1;
    /**
     * 1 - isolated:逐仓 ;2 - cross:全仓
     * 交易模式
     * 保证金模式:isolated:逐仓 ;cross:全仓
     * 非保证金模式:cash:非保证金
     * spot_isolated:现货逐仓(仅适用于现货带单) ,现货带单时,tdMode 的值需要指定为spot_isolated
     */
    private Integer tdMode = 2;
 
    private List<SellOrderVo> sellOrderList; //卖出订单列表,当operations为buy时,该字段为空
 
    private Long operationCurrencyId; //操作货币id
 
    private String redisKey; //redisKey 用于标识是否已经处理过
 
    private String exchange; //交易所
}