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; //交易所
|
}
|