Browse Source

增加 OrderReq 、CancelOrderReq 总线接口支持

zhou.xiaoning 2 years ago
parent
commit
353ed7b65c
6 changed files with 939 additions and 8 deletions
  1. 4 0
      global/funcode.go
  2. 3 0
      global/topic.go
  3. 36 0
      initialize/rabbitmq.go
  4. 36 0
      model/mq/request/mq.go
  5. 791 8
      res/pb/mtp2.pb.go
  6. 69 0
      res/pb/mtp2.proto

+ 4 - 0
global/funcode.go

@@ -84,6 +84,10 @@ var (
 	WROutApplyReq = 1900657 // 仓单出库申请
 	WROutApplyRsp = 1900658 // 仓单出库申请响应
 
+	OrderReq       = 196609 // 交易委托请求
+	OrderRsp       = 196610 // 交易委托应答
+	CancelOrderReq = 196611 // 撤单请求
+	CancelOrderRsp = 196612 // 撤单应答
 )
 
 // 通过请求功能码获取对应主题的方法

+ 3 - 0
global/topic.go

@@ -37,4 +37,7 @@ var (
 	TOPIC_RSP_WAREHOUSE_PRESALE_GZ        = "warehouse_presale_gz_rsp"        // 广钻预售响应
 	TOPIC_REQ_WAREHOUSE_CENTERPURCHASE_GZ = "warehouse_centerpurchase_gz_req" // 广钻集采请求
 	TOPIC_RSP_WAREHOUSE_CENTERPURCHASE_GZ = "warehouse_centerpurchase_gz_rsp" // 广钻集采响应
+
+	TOPIC_REQ_ORDER = "order_req" // 交易服务相关请求
+	TOPIC_RSP_ORDER = "order_rsp" // 交易服务相关回应
 )

+ 36 - 0
initialize/rabbitmq.go

@@ -541,6 +541,32 @@ func (t *MQProc) getRspProtobuf(msg *[]byte) (funcode uint32, sessionId uint32,
 			bytes = &bs
 			serialNumber = p.GetHeader().GetRequestID()
 		}
+	case global.OrderRsp:
+		var p pb.OrderRsp
+		if err = proto.Unmarshal(b, &p); err != nil {
+			global.M2A_LOG.Error("总线回复数据反序列化失败", zap.Error(err))
+			return
+		}
+		if bs, e := protojson.Marshal(&p); e != nil {
+			global.M2A_LOG.Error("总线回复数据反序列化失败", zap.Error(err))
+			return
+		} else {
+			bytes = &bs
+			serialNumber = p.GetHeader().GetRequestID()
+		}
+	case global.CancelOrderRsp:
+		var p pb.CancelOrderRsp
+		if err = proto.Unmarshal(b, &p); err != nil {
+			global.M2A_LOG.Error("总线回复数据反序列化失败", zap.Error(err))
+			return
+		}
+		if bs, e := protojson.Marshal(&p); e != nil {
+			global.M2A_LOG.Error("总线回复数据反序列化失败", zap.Error(err))
+			return
+		} else {
+			bytes = &bs
+			serialNumber = p.GetHeader().GetRequestID()
+		}
 	}
 
 	return
@@ -604,6 +630,11 @@ func RabbitMQSubscribeTopic() (err error) {
 		return
 	}
 
+	if err = rabbitmq.SubscribeTopic(global.TOPIC_RSP_ORDER); err != nil {
+		global.M2A_LOG.Error("rabbitmq subscribe topic failed, err:", zap.Error(err))
+		return
+	}
+
 	global.M2A_LOG.Info("rabbitmq subscribe topic successed.")
 
 	return
@@ -688,4 +719,9 @@ func InitFuncodeTopic() {
 		global.GZCenterPurchaseOrderReq,
 		global.BSWMSReckonPayReq,
 	}
+
+	global.M2A_FuncodeTopic[global.TOPIC_REQ_ORDER] = []int{
+		global.OrderReq,
+		global.CancelOrderReq,
+	}
 }

+ 36 - 0
model/mq/request/mq.go

@@ -694,6 +694,42 @@ func (r *MQBodyReq) GetProtoBytes(serialNumber *uint32) (bytes *[]byte, err erro
 		} else {
 			bytes = &b
 		}
+	case global.OrderReq:
+		m := pb.OrderReq{}
+		if err = r.reflect(data, &m); err != nil {
+			return
+		}
+		if m.Header != nil {
+			m.Header.RequestID = serialNumber
+		} else {
+			err = errors.New("请求信息序列化失败")
+			return
+		}
+		if b, e := proto.Marshal(&m); e != nil {
+			global.M2A_LOG.Error(e.Error(), zap.Error(e))
+			err = errors.New("请求信息序列化失败")
+			return
+		} else {
+			bytes = &b
+		}
+	case global.CancelOrderReq:
+		m := pb.CancelOrderReq{}
+		if err = r.reflect(data, &m); err != nil {
+			return
+		}
+		if m.Header != nil {
+			m.Header.RequestID = serialNumber
+		} else {
+			err = errors.New("请求信息序列化失败")
+			return
+		}
+		if b, e := proto.Marshal(&m); e != nil {
+			global.M2A_LOG.Error(e.Error(), zap.Error(e))
+			err = errors.New("请求信息序列化失败")
+			return
+		} else {
+			bytes = &b
+		}
 	}
 
 	return

+ 791 - 8
res/pb/mtp2.pb.go

@@ -9945,6 +9945,614 @@ func (x *WROutApplyRsp) GetClientSerialID() uint64 {
 	return 0
 }
 
+// 交易委托请求
+type OrderReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Header            *MessageHead `protobuf:"bytes,1,opt,name=Header" json:"Header,omitempty"`
+	ClientSerialNo    *string      `protobuf:"bytes,2,opt,name=ClientSerialNo" json:"ClientSerialNo,omitempty"`         // 客户端流水号
+	ClientOrderTime   *string      `protobuf:"bytes,3,opt,name=ClientOrderTime" json:"ClientOrderTime,omitempty"`       // 客户端委托时间
+	ClientType        *uint32      `protobuf:"varint,4,opt,name=ClientType" json:"ClientType,omitempty"`                // 终端类型
+	LoginID           *uint64      `protobuf:"varint,5,opt,name=LoginID" json:"LoginID,omitempty"`                      // 登陆账号
+	AccountID         *uint64      `protobuf:"varint,6,opt,name=AccountID" json:"AccountID,omitempty"`                  // 交易账号
+	GoodsID           *uint32      `protobuf:"varint,7,opt,name=GoodsID" json:"GoodsID,omitempty"`                      // 商品ID
+	MarketID          *uint32      `protobuf:"varint,8,opt,name=MarketID" json:"MarketID,omitempty"`                    // 市场ID
+	ValidType         *int32       `protobuf:"varint,9,opt,name=ValidType" json:"ValidType,omitempty"`                  // 校验类型
+	OperateType       *uint32      `protobuf:"varint,10,opt,name=OperateType" json:"OperateType,omitempty"`             // 操作类型:
+	OrderSrc          *uint32      `protobuf:"varint,11,opt,name=OrderSrc" json:"OrderSrc,omitempty"`                   // 单据来源
+	OperatorID        *uint64      `protobuf:"varint,12,opt,name=OperatorID" json:"OperatorID,omitempty"`               // 操作员账号ID
+	OrderPrice        *float64     `protobuf:"fixed64,13,opt,name=OrderPrice" json:"OrderPrice,omitempty"`              // 委托价格
+	MarketMaxSub      *float64     `protobuf:"fixed64,14,opt,name=MarketMaxSub" json:"MarketMaxSub,omitempty"`          // 市价允许最大偏差(做市)
+	OrderQty          *uint64      `protobuf:"varint,15,opt,name=OrderQty" json:"OrderQty,omitempty"`                   // 委托数量
+	BuyOrSell         *uint32      `protobuf:"varint,16,opt,name=BuyOrSell" json:"BuyOrSell,omitempty"`                 // 买卖方向
+	BuildType         *uint32      `protobuf:"varint,17,opt,name=BuildType" json:"BuildType,omitempty"`                 // 下单类型
+	CurtQuotePrice    *float64     `protobuf:"fixed64,18,opt,name=CurtQuotePrice" json:"CurtQuotePrice,omitempty"`      // 保留,计算冻结金额使用
+	SpPrice           *float64     `protobuf:"fixed64,19,opt,name=SpPrice" json:"SpPrice,omitempty"`                    // 止盈价格
+	SlPrice           *float64     `protobuf:"fixed64,20,opt,name=SlPrice" json:"SlPrice,omitempty"`                    // 止损价格
+	PriceMode         *uint32      `protobuf:"varint,21,opt,name=PriceMode" json:"PriceMode,omitempty"`                 // 取价方式
+	TimevalidType     *uint32      `protobuf:"varint,22,opt,name=TimevalidType" json:"TimevalidType,omitempty"`         // 时间有效类型
+	TriggerType       *uint32      `protobuf:"varint,23,opt,name=TriggerType" json:"TriggerType,omitempty"`             // 预埋单触发类型
+	TriggerPrice      *float64     `protobuf:"fixed64,24,opt,name=TriggerPrice" json:"TriggerPrice,omitempty"`          // 预埋单触发价格
+	ListingSelectType *uint32      `protobuf:"varint,25,opt,name=ListingSelectType" json:"ListingSelectType,omitempty"` // 挂牌点选类型
+	DelistingType     *uint32      `protobuf:"varint,26,opt,name=DelistingType" json:"DelistingType,omitempty"`         // 摘牌类型
+	RelatedID         *uint64      `protobuf:"varint,27,opt,name=RelatedID" json:"RelatedID,omitempty"`                 // 关联单号
+	OptionType        *uint32      `protobuf:"varint,28,opt,name=OptionType" json:"OptionType,omitempty"`               // 期权类型(1:认购(看涨)2:认沽(看跌))
+	Premium           *float64     `protobuf:"fixed64,29,opt,name=Premium" json:"Premium,omitempty"`                    // 权利金
+	TriggerOperator   *uint32      `protobuf:"varint,30,opt,name=TriggerOperator" json:"TriggerOperator,omitempty"`     // 触发条件(1:大于等于2:小于等于)
+	ServiceTime       *string      `protobuf:"bytes,31,opt,name=ServiceTime" json:"ServiceTime,omitempty"`              // 服务端时间
+	CouponTypeID      *uint64      `protobuf:"varint,32,opt,name=CouponTypeID" json:"CouponTypeID,omitempty"`           // 优惠券类型ID(买方)
+	UsedQty           *uint32      `protobuf:"varint,33,opt,name=UsedQty" json:"UsedQty,omitempty"`                     // 使用数量
+	ValidTime         *string      `protobuf:"bytes,34,opt,name=ValidTime" json:"ValidTime,omitempty"`                  // 指定有效日期
+	ReceiveInfoID     *uint64      `protobuf:"varint,35,opt,name=ReceiveInfoID" json:"ReceiveInfoID,omitempty"`         // 收货地址ID
+	OrderFlag         *uint32      `protobuf:"varint,36,opt,name=OrderFlag" json:"OrderFlag,omitempty"`                 // 委托标识-1:按量
+	OrderAmount       *float64     `protobuf:"fixed64,37,opt,name=OrderAmount" json:"OrderAmount,omitempty"`            // 委托金额OrderFlag=2必填
+}
+
+func (x *OrderReq) Reset() {
+	*x = OrderReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_mtp2_proto_msgTypes[86]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *OrderReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*OrderReq) ProtoMessage() {}
+
+func (x *OrderReq) ProtoReflect() protoreflect.Message {
+	mi := &file_mtp2_proto_msgTypes[86]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use OrderReq.ProtoReflect.Descriptor instead.
+func (*OrderReq) Descriptor() ([]byte, []int) {
+	return file_mtp2_proto_rawDescGZIP(), []int{86}
+}
+
+func (x *OrderReq) GetHeader() *MessageHead {
+	if x != nil {
+		return x.Header
+	}
+	return nil
+}
+
+func (x *OrderReq) GetClientSerialNo() string {
+	if x != nil && x.ClientSerialNo != nil {
+		return *x.ClientSerialNo
+	}
+	return ""
+}
+
+func (x *OrderReq) GetClientOrderTime() string {
+	if x != nil && x.ClientOrderTime != nil {
+		return *x.ClientOrderTime
+	}
+	return ""
+}
+
+func (x *OrderReq) GetClientType() uint32 {
+	if x != nil && x.ClientType != nil {
+		return *x.ClientType
+	}
+	return 0
+}
+
+func (x *OrderReq) GetLoginID() uint64 {
+	if x != nil && x.LoginID != nil {
+		return *x.LoginID
+	}
+	return 0
+}
+
+func (x *OrderReq) GetAccountID() uint64 {
+	if x != nil && x.AccountID != nil {
+		return *x.AccountID
+	}
+	return 0
+}
+
+func (x *OrderReq) GetGoodsID() uint32 {
+	if x != nil && x.GoodsID != nil {
+		return *x.GoodsID
+	}
+	return 0
+}
+
+func (x *OrderReq) GetMarketID() uint32 {
+	if x != nil && x.MarketID != nil {
+		return *x.MarketID
+	}
+	return 0
+}
+
+func (x *OrderReq) GetValidType() int32 {
+	if x != nil && x.ValidType != nil {
+		return *x.ValidType
+	}
+	return 0
+}
+
+func (x *OrderReq) GetOperateType() uint32 {
+	if x != nil && x.OperateType != nil {
+		return *x.OperateType
+	}
+	return 0
+}
+
+func (x *OrderReq) GetOrderSrc() uint32 {
+	if x != nil && x.OrderSrc != nil {
+		return *x.OrderSrc
+	}
+	return 0
+}
+
+func (x *OrderReq) GetOperatorID() uint64 {
+	if x != nil && x.OperatorID != nil {
+		return *x.OperatorID
+	}
+	return 0
+}
+
+func (x *OrderReq) GetOrderPrice() float64 {
+	if x != nil && x.OrderPrice != nil {
+		return *x.OrderPrice
+	}
+	return 0
+}
+
+func (x *OrderReq) GetMarketMaxSub() float64 {
+	if x != nil && x.MarketMaxSub != nil {
+		return *x.MarketMaxSub
+	}
+	return 0
+}
+
+func (x *OrderReq) GetOrderQty() uint64 {
+	if x != nil && x.OrderQty != nil {
+		return *x.OrderQty
+	}
+	return 0
+}
+
+func (x *OrderReq) GetBuyOrSell() uint32 {
+	if x != nil && x.BuyOrSell != nil {
+		return *x.BuyOrSell
+	}
+	return 0
+}
+
+func (x *OrderReq) GetBuildType() uint32 {
+	if x != nil && x.BuildType != nil {
+		return *x.BuildType
+	}
+	return 0
+}
+
+func (x *OrderReq) GetCurtQuotePrice() float64 {
+	if x != nil && x.CurtQuotePrice != nil {
+		return *x.CurtQuotePrice
+	}
+	return 0
+}
+
+func (x *OrderReq) GetSpPrice() float64 {
+	if x != nil && x.SpPrice != nil {
+		return *x.SpPrice
+	}
+	return 0
+}
+
+func (x *OrderReq) GetSlPrice() float64 {
+	if x != nil && x.SlPrice != nil {
+		return *x.SlPrice
+	}
+	return 0
+}
+
+func (x *OrderReq) GetPriceMode() uint32 {
+	if x != nil && x.PriceMode != nil {
+		return *x.PriceMode
+	}
+	return 0
+}
+
+func (x *OrderReq) GetTimevalidType() uint32 {
+	if x != nil && x.TimevalidType != nil {
+		return *x.TimevalidType
+	}
+	return 0
+}
+
+func (x *OrderReq) GetTriggerType() uint32 {
+	if x != nil && x.TriggerType != nil {
+		return *x.TriggerType
+	}
+	return 0
+}
+
+func (x *OrderReq) GetTriggerPrice() float64 {
+	if x != nil && x.TriggerPrice != nil {
+		return *x.TriggerPrice
+	}
+	return 0
+}
+
+func (x *OrderReq) GetListingSelectType() uint32 {
+	if x != nil && x.ListingSelectType != nil {
+		return *x.ListingSelectType
+	}
+	return 0
+}
+
+func (x *OrderReq) GetDelistingType() uint32 {
+	if x != nil && x.DelistingType != nil {
+		return *x.DelistingType
+	}
+	return 0
+}
+
+func (x *OrderReq) GetRelatedID() uint64 {
+	if x != nil && x.RelatedID != nil {
+		return *x.RelatedID
+	}
+	return 0
+}
+
+func (x *OrderReq) GetOptionType() uint32 {
+	if x != nil && x.OptionType != nil {
+		return *x.OptionType
+	}
+	return 0
+}
+
+func (x *OrderReq) GetPremium() float64 {
+	if x != nil && x.Premium != nil {
+		return *x.Premium
+	}
+	return 0
+}
+
+func (x *OrderReq) GetTriggerOperator() uint32 {
+	if x != nil && x.TriggerOperator != nil {
+		return *x.TriggerOperator
+	}
+	return 0
+}
+
+func (x *OrderReq) GetServiceTime() string {
+	if x != nil && x.ServiceTime != nil {
+		return *x.ServiceTime
+	}
+	return ""
+}
+
+func (x *OrderReq) GetCouponTypeID() uint64 {
+	if x != nil && x.CouponTypeID != nil {
+		return *x.CouponTypeID
+	}
+	return 0
+}
+
+func (x *OrderReq) GetUsedQty() uint32 {
+	if x != nil && x.UsedQty != nil {
+		return *x.UsedQty
+	}
+	return 0
+}
+
+func (x *OrderReq) GetValidTime() string {
+	if x != nil && x.ValidTime != nil {
+		return *x.ValidTime
+	}
+	return ""
+}
+
+func (x *OrderReq) GetReceiveInfoID() uint64 {
+	if x != nil && x.ReceiveInfoID != nil {
+		return *x.ReceiveInfoID
+	}
+	return 0
+}
+
+func (x *OrderReq) GetOrderFlag() uint32 {
+	if x != nil && x.OrderFlag != nil {
+		return *x.OrderFlag
+	}
+	return 0
+}
+
+func (x *OrderReq) GetOrderAmount() float64 {
+	if x != nil && x.OrderAmount != nil {
+		return *x.OrderAmount
+	}
+	return 0
+}
+
+// 交易委托应答
+type OrderRsp struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Header    *MessageHead `protobuf:"bytes,1,opt,name=Header" json:"Header,omitempty"`       // 消息头
+	RetCode   *int32       `protobuf:"varint,2,opt,name=RetCode" json:"RetCode,omitempty"`    // 返回码
+	RetDesc   *string      `protobuf:"bytes,3,opt,name=RetDesc" json:"RetDesc,omitempty"`     // 描述信息
+	OrderID   *uint64      `protobuf:"varint,4,opt,name=OrderID" json:"OrderID,omitempty"`    // 一级生成的订单号
+	OrderTime *string      `protobuf:"bytes,5,opt,name=OrderTime" json:"OrderTime,omitempty"` // 接收委托交易的时间
+}
+
+func (x *OrderRsp) Reset() {
+	*x = OrderRsp{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_mtp2_proto_msgTypes[87]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *OrderRsp) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*OrderRsp) ProtoMessage() {}
+
+func (x *OrderRsp) ProtoReflect() protoreflect.Message {
+	mi := &file_mtp2_proto_msgTypes[87]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use OrderRsp.ProtoReflect.Descriptor instead.
+func (*OrderRsp) Descriptor() ([]byte, []int) {
+	return file_mtp2_proto_rawDescGZIP(), []int{87}
+}
+
+func (x *OrderRsp) GetHeader() *MessageHead {
+	if x != nil {
+		return x.Header
+	}
+	return nil
+}
+
+func (x *OrderRsp) GetRetCode() int32 {
+	if x != nil && x.RetCode != nil {
+		return *x.RetCode
+	}
+	return 0
+}
+
+func (x *OrderRsp) GetRetDesc() string {
+	if x != nil && x.RetDesc != nil {
+		return *x.RetDesc
+	}
+	return ""
+}
+
+func (x *OrderRsp) GetOrderID() uint64 {
+	if x != nil && x.OrderID != nil {
+		return *x.OrderID
+	}
+	return 0
+}
+
+func (x *OrderRsp) GetOrderTime() string {
+	if x != nil && x.OrderTime != nil {
+		return *x.OrderTime
+	}
+	return ""
+}
+
+// 撤单请求
+type CancelOrderReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Header          *MessageHead `protobuf:"bytes,1,opt,name=Header" json:"Header,omitempty"`
+	ClientSerialNo  *string      `protobuf:"bytes,2,opt,name=ClientSerialNo" json:"ClientSerialNo,omitempty"`   // 客户端流水号
+	ClientOrderTime *string      `protobuf:"bytes,3,opt,name=ClientOrderTime" json:"ClientOrderTime,omitempty"` // 客户端委托时间
+	ClientType      *uint32      `protobuf:"varint,4,opt,name=ClientType" json:"ClientType,omitempty"`          // 终端类型
+	OperateType     *uint32      `protobuf:"varint,5,opt,name=OperateType" json:"OperateType,omitempty"`        // 操作类型
+	OldOrderId      *uint64      `protobuf:"varint,6,opt,name=OldOrderId" json:"OldOrderId,omitempty"`          // 原委托单号
+	AccountID       *uint64      `protobuf:"varint,7,opt,name=AccountID" json:"AccountID,omitempty"`            // 交易账号
+	OrderSrc        *uint32      `protobuf:"varint,8,opt,name=OrderSrc" json:"OrderSrc,omitempty"`              // 单据来源
+	OperatorID      *uint64      `protobuf:"varint,9,opt,name=OperatorID" json:"OperatorID,omitempty"`          // 操作员账号ID
+}
+
+func (x *CancelOrderReq) Reset() {
+	*x = CancelOrderReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_mtp2_proto_msgTypes[88]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *CancelOrderReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CancelOrderReq) ProtoMessage() {}
+
+func (x *CancelOrderReq) ProtoReflect() protoreflect.Message {
+	mi := &file_mtp2_proto_msgTypes[88]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use CancelOrderReq.ProtoReflect.Descriptor instead.
+func (*CancelOrderReq) Descriptor() ([]byte, []int) {
+	return file_mtp2_proto_rawDescGZIP(), []int{88}
+}
+
+func (x *CancelOrderReq) GetHeader() *MessageHead {
+	if x != nil {
+		return x.Header
+	}
+	return nil
+}
+
+func (x *CancelOrderReq) GetClientSerialNo() string {
+	if x != nil && x.ClientSerialNo != nil {
+		return *x.ClientSerialNo
+	}
+	return ""
+}
+
+func (x *CancelOrderReq) GetClientOrderTime() string {
+	if x != nil && x.ClientOrderTime != nil {
+		return *x.ClientOrderTime
+	}
+	return ""
+}
+
+func (x *CancelOrderReq) GetClientType() uint32 {
+	if x != nil && x.ClientType != nil {
+		return *x.ClientType
+	}
+	return 0
+}
+
+func (x *CancelOrderReq) GetOperateType() uint32 {
+	if x != nil && x.OperateType != nil {
+		return *x.OperateType
+	}
+	return 0
+}
+
+func (x *CancelOrderReq) GetOldOrderId() uint64 {
+	if x != nil && x.OldOrderId != nil {
+		return *x.OldOrderId
+	}
+	return 0
+}
+
+func (x *CancelOrderReq) GetAccountID() uint64 {
+	if x != nil && x.AccountID != nil {
+		return *x.AccountID
+	}
+	return 0
+}
+
+func (x *CancelOrderReq) GetOrderSrc() uint32 {
+	if x != nil && x.OrderSrc != nil {
+		return *x.OrderSrc
+	}
+	return 0
+}
+
+func (x *CancelOrderReq) GetOperatorID() uint64 {
+	if x != nil && x.OperatorID != nil {
+		return *x.OperatorID
+	}
+	return 0
+}
+
+// 撤单应答
+type CancelOrderRsp struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Header       *MessageHead `protobuf:"bytes,1,opt,name=Header" json:"Header,omitempty"`              // 消息头
+	RetCode      *int32       `protobuf:"varint,2,opt,name=RetCode" json:"RetCode,omitempty"`           // 返回码
+	RetDesc      *string      `protobuf:"bytes,3,opt,name=RetDesc" json:"RetDesc,omitempty"`            // 描述信息
+	ExchActionID *uint64      `protobuf:"varint,4,opt,name=ExchActionID" json:"ExchActionID,omitempty"` // 交易所操作号
+	OrderTime    *string      `protobuf:"bytes,5,opt,name=OrderTime" json:"OrderTime,omitempty"`        // 接收委托交易的时间
+}
+
+func (x *CancelOrderRsp) Reset() {
+	*x = CancelOrderRsp{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_mtp2_proto_msgTypes[89]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *CancelOrderRsp) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CancelOrderRsp) ProtoMessage() {}
+
+func (x *CancelOrderRsp) ProtoReflect() protoreflect.Message {
+	mi := &file_mtp2_proto_msgTypes[89]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use CancelOrderRsp.ProtoReflect.Descriptor instead.
+func (*CancelOrderRsp) Descriptor() ([]byte, []int) {
+	return file_mtp2_proto_rawDescGZIP(), []int{89}
+}
+
+func (x *CancelOrderRsp) GetHeader() *MessageHead {
+	if x != nil {
+		return x.Header
+	}
+	return nil
+}
+
+func (x *CancelOrderRsp) GetRetCode() int32 {
+	if x != nil && x.RetCode != nil {
+		return *x.RetCode
+	}
+	return 0
+}
+
+func (x *CancelOrderRsp) GetRetDesc() string {
+	if x != nil && x.RetDesc != nil {
+		return *x.RetDesc
+	}
+	return ""
+}
+
+func (x *CancelOrderRsp) GetExchActionID() uint64 {
+	if x != nil && x.ExchActionID != nil {
+		return *x.ExchActionID
+	}
+	return 0
+}
+
+func (x *CancelOrderRsp) GetOrderTime() string {
+	if x != nil && x.OrderTime != nil {
+		return *x.OrderTime
+	}
+	return ""
+}
+
 var File_mtp2_proto protoreflect.FileDescriptor
 
 var file_mtp2_proto_rawDesc = []byte{
@@ -11795,7 +12403,126 @@ var file_mtp2_proto_rawDesc = []byte{
 	0x52, 0x65, 0x74, 0x44, 0x65, 0x73, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x52,
 	0x65, 0x74, 0x44, 0x65, 0x73, 0x63, 0x12, 0x26, 0x0a, 0x0e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74,
 	0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e,
-	0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x44,
+	0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x44, 0x22, 0xcb,
+	0x09, 0x0a, 0x08, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x27, 0x0a, 0x06, 0x48,
+	0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62,
+	0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x65, 0x61, 0x64, 0x52, 0x06, 0x48, 0x65,
+	0x61, 0x64, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65,
+	0x72, 0x69, 0x61, 0x6c, 0x4e, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x43, 0x6c,
+	0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4e, 0x6f, 0x12, 0x28, 0x0a, 0x0f,
+	0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x18,
+	0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x72, 0x64,
+	0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74,
+	0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x43, 0x6c, 0x69, 0x65,
+	0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x49,
+	0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x49, 0x44,
+	0x12, 0x1c, 0x0a, 0x09, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x06, 0x20,
+	0x01, 0x28, 0x04, 0x52, 0x09, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x18,
+	0x0a, 0x07, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x44, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52,
+	0x07, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x4d, 0x61, 0x72, 0x6b,
+	0x65, 0x74, 0x49, 0x44, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x4d, 0x61, 0x72, 0x6b,
+	0x65, 0x74, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x54, 0x79, 0x70,
+	0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x54, 0x79,
+	0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70,
+	0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65,
+	0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x72, 0x63,
+	0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x72, 0x63,
+	0x12, 0x1e, 0x0a, 0x0a, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x44, 0x18, 0x0c,
+	0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x44,
+	0x12, 0x1e, 0x0a, 0x0a, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0d,
+	0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65,
+	0x12, 0x22, 0x0a, 0x0c, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x4d, 0x61, 0x78, 0x53, 0x75, 0x62,
+	0x18, 0x0e, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x4d, 0x61,
+	0x78, 0x53, 0x75, 0x62, 0x12, 0x1a, 0x0a, 0x08, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x51, 0x74, 0x79,
+	0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x51, 0x74, 0x79,
+	0x12, 0x1c, 0x0a, 0x09, 0x42, 0x75, 0x79, 0x4f, 0x72, 0x53, 0x65, 0x6c, 0x6c, 0x18, 0x10, 0x20,
+	0x01, 0x28, 0x0d, 0x52, 0x09, 0x42, 0x75, 0x79, 0x4f, 0x72, 0x53, 0x65, 0x6c, 0x6c, 0x12, 0x1c,
+	0x0a, 0x09, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x54, 0x79, 0x70, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28,
+	0x0d, 0x52, 0x09, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x0e,
+	0x43, 0x75, 0x72, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x12,
+	0x20, 0x01, 0x28, 0x01, 0x52, 0x0e, 0x43, 0x75, 0x72, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x50,
+	0x72, 0x69, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x53, 0x70, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18,
+	0x13, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x53, 0x70, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x18,
+	0x0a, 0x07, 0x53, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x01, 0x52,
+	0x07, 0x53, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x72, 0x69, 0x63,
+	0x65, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x50, 0x72, 0x69,
+	0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x54, 0x69, 0x6d, 0x65, 0x76, 0x61,
+	0x6c, 0x69, 0x64, 0x54, 0x79, 0x70, 0x65, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x54,
+	0x69, 0x6d, 0x65, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b,
+	0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28,
+	0x0d, 0x52, 0x0b, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22,
+	0x0a, 0x0c, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x18,
+	0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x50, 0x72, 0x69,
+	0x63, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x6c,
+	0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x4c,
+	0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65,
+	0x12, 0x24, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x79, 0x70,
+	0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x44, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x69,
+	0x6e, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65,
+	0x64, 0x49, 0x44, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x52, 0x65, 0x6c, 0x61, 0x74,
+	0x65, 0x64, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79,
+	0x70, 0x65, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+	0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x75, 0x6d, 0x18,
+	0x1d, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x75, 0x6d, 0x12, 0x28,
+	0x0a, 0x0f, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f,
+	0x72, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72,
+	0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76,
+	0x69, 0x63, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x53,
+	0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x43, 0x6f,
+	0x75, 0x70, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x49, 0x44, 0x18, 0x20, 0x20, 0x01, 0x28, 0x04,
+	0x52, 0x0c, 0x43, 0x6f, 0x75, 0x70, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x49, 0x44, 0x12, 0x18,
+	0x0a, 0x07, 0x55, 0x73, 0x65, 0x64, 0x51, 0x74, 0x79, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0d, 0x52,
+	0x07, 0x55, 0x73, 0x65, 0x64, 0x51, 0x74, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x56, 0x61, 0x6c, 0x69,
+	0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x22, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x56, 0x61, 0x6c,
+	0x69, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76,
+	0x65, 0x49, 0x6e, 0x66, 0x6f, 0x49, 0x44, 0x18, 0x23, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x52,
+	0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09,
+	0x4f, 0x72, 0x64, 0x65, 0x72, 0x46, 0x6c, 0x61, 0x67, 0x18, 0x24, 0x20, 0x01, 0x28, 0x0d, 0x52,
+	0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x72,
+	0x64, 0x65, 0x72, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x25, 0x20, 0x01, 0x28, 0x01, 0x52,
+	0x0b, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9f, 0x01, 0x0a,
+	0x08, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x73, 0x70, 0x12, 0x27, 0x0a, 0x06, 0x48, 0x65, 0x61,
+	0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4d,
+	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x65, 0x61, 0x64, 0x52, 0x06, 0x48, 0x65, 0x61, 0x64,
+	0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20,
+	0x01, 0x28, 0x05, 0x52, 0x07, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07,
+	0x52, 0x65, 0x74, 0x44, 0x65, 0x73, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x52,
+	0x65, 0x74, 0x44, 0x65, 0x73, 0x63, 0x12, 0x18, 0x0a, 0x07, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49,
+	0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x44,
+	0x12, 0x1c, 0x0a, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xc7,
+	0x02, 0x0a, 0x0e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65,
+	0x71, 0x12, 0x27, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
+	0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x65,
+	0x61, 0x64, 0x52, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0e, 0x43, 0x6c,
+	0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4e, 0x6f, 0x18, 0x02, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x0e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c,
+	0x4e, 0x6f, 0x12, 0x28, 0x0a, 0x0f, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x72, 0x64, 0x65,
+	0x72, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x43, 0x6c, 0x69,
+	0x65, 0x6e, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a,
+	0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d,
+	0x52, 0x0a, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b,
+	0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
+	0x0d, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e,
+	0x0a, 0x0a, 0x4f, 0x6c, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01,
+	0x28, 0x04, 0x52, 0x0a, 0x4f, 0x6c, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c,
+	0x0a, 0x09, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x07, 0x20, 0x01, 0x28,
+	0x04, 0x52, 0x09, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08,
+	0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x72, 0x63, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08,
+	0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x72, 0x63, 0x12, 0x1e, 0x0a, 0x0a, 0x4f, 0x70, 0x65, 0x72,
+	0x61, 0x74, 0x6f, 0x72, 0x49, 0x44, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x4f, 0x70,
+	0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x44, 0x22, 0xaf, 0x01, 0x0a, 0x0e, 0x43, 0x61, 0x6e,
+	0x63, 0x65, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x73, 0x70, 0x12, 0x27, 0x0a, 0x06, 0x48,
+	0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62,
+	0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x65, 0x61, 0x64, 0x52, 0x06, 0x48, 0x65,
+	0x61, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18,
+	0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x18,
+	0x0a, 0x07, 0x52, 0x65, 0x74, 0x44, 0x65, 0x73, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x07, 0x52, 0x65, 0x74, 0x44, 0x65, 0x73, 0x63, 0x12, 0x22, 0x0a, 0x0c, 0x45, 0x78, 0x63, 0x68,
+	0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c,
+	0x45, 0x78, 0x63, 0x68, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09,
+	0x4f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65,
 }
 
 var (
@@ -11810,7 +12537,7 @@ func file_mtp2_proto_rawDescGZIP() []byte {
 	return file_mtp2_proto_rawDescData
 }
 
-var file_mtp2_proto_msgTypes = make([]protoimpl.MessageInfo, 86)
+var file_mtp2_proto_msgTypes = make([]protoimpl.MessageInfo, 90)
 var file_mtp2_proto_goTypes = []interface{}{
 	(*MessageHead)(nil),                         // 0: pb.MessageHead
 	(*NotifyHead)(nil),                          // 1: pb.NotifyHead
@@ -11898,6 +12625,10 @@ var file_mtp2_proto_goTypes = []interface{}{
 	(*WROutInDetail)(nil),                       // 83: pb.WROutInDetail
 	(*WROutApplyReq)(nil),                       // 84: pb.WROutApplyReq
 	(*WROutApplyRsp)(nil),                       // 85: pb.WROutApplyRsp
+	(*OrderReq)(nil),                            // 86: pb.OrderReq
+	(*OrderRsp)(nil),                            // 87: pb.OrderRsp
+	(*CancelOrderReq)(nil),                      // 88: pb.CancelOrderReq
+	(*CancelOrderRsp)(nil),                      // 89: pb.CancelOrderRsp
 }
 var file_mtp2_proto_depIdxs = []int32{
 	0,  // 0: pb.ModifyPwdReq.Header:type_name -> pb.MessageHead
@@ -11986,11 +12717,15 @@ var file_mtp2_proto_depIdxs = []int32{
 	0,  // 83: pb.WROutApplyReq.Header:type_name -> pb.MessageHead
 	83, // 84: pb.WROutApplyReq.WROutInDetails:type_name -> pb.WROutInDetail
 	0,  // 85: pb.WROutApplyRsp.Header:type_name -> pb.MessageHead
-	86, // [86:86] is the sub-list for method output_type
-	86, // [86:86] is the sub-list for method input_type
-	86, // [86:86] is the sub-list for extension type_name
-	86, // [86:86] is the sub-list for extension extendee
-	0,  // [0:86] is the sub-list for field type_name
+	0,  // 86: pb.OrderReq.Header:type_name -> pb.MessageHead
+	0,  // 87: pb.OrderRsp.Header:type_name -> pb.MessageHead
+	0,  // 88: pb.CancelOrderReq.Header:type_name -> pb.MessageHead
+	0,  // 89: pb.CancelOrderRsp.Header:type_name -> pb.MessageHead
+	90, // [90:90] is the sub-list for method output_type
+	90, // [90:90] is the sub-list for method input_type
+	90, // [90:90] is the sub-list for extension type_name
+	90, // [90:90] is the sub-list for extension extendee
+	0,  // [0:90] is the sub-list for field type_name
 }
 
 func init() { file_mtp2_proto_init() }
@@ -13031,6 +13766,54 @@ func file_mtp2_proto_init() {
 				return nil
 			}
 		}
+		file_mtp2_proto_msgTypes[86].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*OrderReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_mtp2_proto_msgTypes[87].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*OrderRsp); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_mtp2_proto_msgTypes[88].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*CancelOrderReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_mtp2_proto_msgTypes[89].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*CancelOrderRsp); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
 	}
 	type x struct{}
 	out := protoimpl.TypeBuilder{
@@ -13038,7 +13821,7 @@ func file_mtp2_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_mtp2_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   86,
+			NumMessages:   90,
 			NumExtensions: 0,
 			NumServices:   0,
 		},

+ 69 - 0
res/pb/mtp2.proto

@@ -1147,4 +1147,73 @@ message WROutApplyRsp {
 	optional int32 RetCode = 2; // 返回码
 	optional string RetDesc = 3; // 描述信息
 		optional uint64 ClientSerialID = 4; // 客户端唯一ID
+}
+
+// 交易委托请求
+message OrderReq {
+	optional MessageHead Header = 1;
+		optional string ClientSerialNo = 2; // 客户端流水号
+		optional string ClientOrderTime = 3; // 客户端委托时间
+		optional uint32 ClientType = 4; // 终端类型
+		optional uint64 LoginID = 5; // 登陆账号
+		optional uint64 AccountID = 6; // 交易账号
+		optional uint32 GoodsID = 7; // 商品ID
+		optional uint32 MarketID = 8; // 市场ID
+		optional int32 ValidType = 9; // 校验类型
+		optional uint32 OperateType = 10; // 操作类型:
+		optional uint32 OrderSrc = 11; // 单据来源
+		optional uint64 OperatorID = 12; // 操作员账号ID
+		optional double OrderPrice = 13; // 委托价格
+		optional double MarketMaxSub = 14; // 市价允许最大偏差(做市)
+		optional uint64 OrderQty = 15; // 委托数量
+		optional uint32 BuyOrSell = 16; // 买卖方向
+		optional uint32 BuildType = 17; // 下单类型
+		optional double CurtQuotePrice = 18; // 保留,计算冻结金额使用
+		optional double SpPrice = 19; // 止盈价格
+		optional double SlPrice = 20; // 止损价格
+		optional uint32 PriceMode = 21; // 取价方式
+		optional uint32 TimevalidType = 22; // 时间有效类型
+		optional uint32 TriggerType = 23; // 预埋单触发类型
+		optional double TriggerPrice = 24; // 预埋单触发价格
+		optional uint32 ListingSelectType = 25; // 挂牌点选类型
+		optional uint32 DelistingType = 26; // 摘牌类型
+		optional uint64 RelatedID = 27; // 关联单号
+		optional uint32 OptionType = 28; // 期权类型(1:认购(看涨)2:认沽(看跌))
+		optional double Premium = 29; // 权利金
+		optional uint32 TriggerOperator = 30; // 触发条件(1:大于等于2:小于等于)
+		optional string ServiceTime = 31; // 服务端时间
+		optional uint64 CouponTypeID = 32; // 优惠券类型ID(买方)
+		optional uint32 UsedQty = 33; // 使用数量
+		optional string ValidTime = 34; // 指定有效日期
+		optional uint64 ReceiveInfoID = 35; // 收货地址ID
+		optional uint32 OrderFlag = 36; // 委托标识-1:按量
+		optional double OrderAmount = 37; // 委托金额OrderFlag=2必填
+}
+// 交易委托应答
+message OrderRsp {
+	optional MessageHead Header = 1; // 消息头
+	optional int32 RetCode = 2; // 返回码
+	optional string RetDesc = 3; // 描述信息
+		optional uint64 OrderID = 4; // 一级生成的订单号
+		optional string OrderTime = 5; // 接收委托交易的时间
+}
+// 撤单请求
+message CancelOrderReq {
+	optional MessageHead Header = 1;
+		optional string ClientSerialNo = 2; // 客户端流水号
+		optional string ClientOrderTime = 3; // 客户端委托时间
+		optional uint32 ClientType = 4; // 终端类型
+		optional uint32 OperateType = 5; // 操作类型
+		optional uint64 OldOrderId = 6; // 原委托单号
+		optional uint64 AccountID = 7; // 交易账号
+		optional uint32 OrderSrc = 8; // 单据来源
+		optional uint64 OperatorID = 9; // 操作员账号ID
+}
+// 撤单应答
+message CancelOrderRsp {
+	optional MessageHead Header = 1; // 消息头
+	optional int32 RetCode = 2; // 返回码
+	optional string RetDesc = 3; // 描述信息
+		optional uint64 ExchActionID = 4; // 交易所操作号
+		optional string OrderTime = 5; // 接收委托交易的时间
 }