Administrator
2025-12-09 3c693fa3cc1798e51ef434bcdcff7d5925b3e987
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
package com.xcong.excoin.modules.okxNewPrice.okxpi.trade;
 
import lombok.Data;
 
import java.io.Serializable;
import java.math.BigDecimal;
 
@Data
public class TradeRequestBuy implements Serializable {
    /**
     * 实现了 Serializable 接口,rabbitmq可以直接发送它,但需要确保 SimpleMessageConverter 能够处理它(对象简单,不是复杂的对象)
     */
    private static final long serialVersionUID = 1L;
 
    private Long strategiesId;//策略ID   ReturnBuyVo.strategyId
 
    private String tradeCode;//自定义订单编号
 
    private Double tradeCnt;//交易数量    ReturnBuyVo.quantity
    /**
     *     限定价格
     *         限定价格为0的时候,表示市价操作当前订单
     */
    private String limitPrice = "0";
    /**
     * 产品ID,如 BTC-USDT
     */
    private String instId;     //ReturnBuyVo.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 BigDecimal priceRange; //买入的价格段位
 
    private Long operationCurrencyId; //操作货币id
 
    private String redisKey; //redisKey 用于标识是否已经处理过
 
    private String exchange; //交易所
}