li.shaoyi 3 mēneši atpakaļ
vecāks
revīzija
24660f34ed

+ 672 - 0
public/proto/mtp.js

@@ -4059,6 +4059,14 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr
       ChangeType: {
         type: "uint32",
         id: 9
+      },
+      DailyMaxBuyDeliveryQty: {
+        type: "int64",
+        id: 10
+      },
+      DailyMaxSellDeliveryQty: {
+        type: "int64",
+        id: 11
       }
     }
   },
@@ -4223,6 +4231,22 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr
       AddrInfo: {
         type: "string",
         id: 40
+      },
+      TPFlag: {
+        type: "uint32",
+        id: 41
+      },
+      TPRatio: {
+        type: "double",
+        id: 42
+      },
+      SLFlag: {
+        type: "uint32",
+        id: 43
+      },
+      SLRatio: {
+        type: "double",
+        id: 44
       }
     }
   },
@@ -21367,6 +21391,654 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr
       }
     }
   },
+  QuoteDay: {
+    fields: {
+      GoodsCode: {
+        type: "string",
+        id: 1
+      },
+      ExchangeID: {
+        type: "uint32",
+        id: 2
+      },
+      TradeDate: {
+        type: "string",
+        id: 3
+      },
+      UTCLastTime: {
+        type: "uint64",
+        id: 4
+      },
+      LastTime: {
+        type: "string",
+        id: 5
+      },
+      OpenTime: {
+        type: "uint64",
+        id: 6
+      },
+      PreClose: {
+        type: "uint64",
+        id: 7
+      },
+      Opened: {
+        type: "uint64",
+        id: 8
+      },
+      Highest: {
+        type: "uint64",
+        id: 9
+      },
+      Lowest: {
+        type: "uint64",
+        id: 10
+      },
+      Last: {
+        type: "uint64",
+        id: 11
+      },
+      LastVolume: {
+        type: "uint64",
+        id: 12
+      },
+      LastTurnover: {
+        type: "uint64",
+        id: 13
+      },
+      TotalBidVolume: {
+        type: "uint64",
+        id: 14
+      },
+      TotalAskVolume: {
+        type: "uint64",
+        id: 15
+      },
+      TotalVolume: {
+        type: "uint64",
+        id: 16
+      },
+      TotalTurnover: {
+        type: "uint64",
+        id: 17
+      },
+      Bid: {
+        type: "uint64",
+        id: 18
+      },
+      Bid2: {
+        type: "uint64",
+        id: 19
+      },
+      Bid3: {
+        type: "uint64",
+        id: 20
+      },
+      Bid4: {
+        type: "uint64",
+        id: 21
+      },
+      Bid5: {
+        type: "uint64",
+        id: 22
+      },
+      Bid6: {
+        type: "uint64",
+        id: 23
+      },
+      Bid7: {
+        type: "uint64",
+        id: 24
+      },
+      Bid8: {
+        type: "uint64",
+        id: 25
+      },
+      Bid9: {
+        type: "uint64",
+        id: 26
+      },
+      Bid10: {
+        type: "uint64",
+        id: 27
+      },
+      Ask: {
+        type: "uint64",
+        id: 28
+      },
+      Ask2: {
+        type: "uint64",
+        id: 29
+      },
+      Ask3: {
+        type: "uint64",
+        id: 30
+      },
+      Ask4: {
+        type: "uint64",
+        id: 31
+      },
+      Ask5: {
+        type: "uint64",
+        id: 32
+      },
+      Ask6: {
+        type: "uint64",
+        id: 33
+      },
+      Ask7: {
+        type: "uint64",
+        id: 34
+      },
+      Ask8: {
+        type: "uint64",
+        id: 35
+      },
+      Ask9: {
+        type: "uint64",
+        id: 36
+      },
+      Ask10: {
+        type: "uint64",
+        id: 37
+      },
+      BidVolume: {
+        type: "uint64",
+        id: 38
+      },
+      BidVolume2: {
+        type: "uint64",
+        id: 39
+      },
+      BidVolume3: {
+        type: "uint64",
+        id: 40
+      },
+      BidVolume4: {
+        type: "uint64",
+        id: 41
+      },
+      BidVolume5: {
+        type: "uint64",
+        id: 42
+      },
+      BidVolume6: {
+        type: "uint64",
+        id: 43
+      },
+      BidVolume7: {
+        type: "uint64",
+        id: 44
+      },
+      BidVolume8: {
+        type: "uint64",
+        id: 45
+      },
+      BidVolume9: {
+        type: "uint64",
+        id: 46
+      },
+      BidVolume10: {
+        type: "uint64",
+        id: 47
+      },
+      AskVolume: {
+        type: "uint64",
+        id: 48
+      },
+      AskVolume2: {
+        type: "uint64",
+        id: 49
+      },
+      AskVolume3: {
+        type: "uint64",
+        id: 50
+      },
+      AskVolume4: {
+        type: "uint64",
+        id: 51
+      },
+      AskVolume5: {
+        type: "uint64",
+        id: 52
+      },
+      AskVolume6: {
+        type: "uint64",
+        id: 53
+      },
+      AskVolume7: {
+        type: "uint64",
+        id: 54
+      },
+      AskVolume8: {
+        type: "uint64",
+        id: 55
+      },
+      AskVolume9: {
+        type: "uint64",
+        id: 56
+      },
+      AskVolume10: {
+        type: "uint64",
+        id: 57
+      },
+      BidOrderVolume: {
+        type: "uint64",
+        id: 58
+      },
+      BidOrderVolume2: {
+        type: "uint64",
+        id: 59
+      },
+      BidOrderVolume3: {
+        type: "uint64",
+        id: 60
+      },
+      BidOrderVolume4: {
+        type: "uint64",
+        id: 61
+      },
+      BidOrderVolume5: {
+        type: "uint64",
+        id: 62
+      },
+      BidOrderVolume6: {
+        type: "uint64",
+        id: 63
+      },
+      BidOrderVolume7: {
+        type: "uint64",
+        id: 64
+      },
+      BidOrderVolume8: {
+        type: "uint64",
+        id: 65
+      },
+      BidOrderVolume9: {
+        type: "uint64",
+        id: 66
+      },
+      BidOrderVolume10: {
+        type: "uint64",
+        id: 67
+      },
+      AskOrderVolume: {
+        type: "uint64",
+        id: 68
+      },
+      AskOrderVolume2: {
+        type: "uint64",
+        id: 69
+      },
+      AskOrderVolume3: {
+        type: "uint64",
+        id: 70
+      },
+      AskOrderVolume4: {
+        type: "uint64",
+        id: 71
+      },
+      AskOrderVolume5: {
+        type: "uint64",
+        id: 72
+      },
+      AskOrderVolume6: {
+        type: "uint64",
+        id: 73
+      },
+      AskOrderVolume7: {
+        type: "uint64",
+        id: 74
+      },
+      AskOrderVolume8: {
+        type: "uint64",
+        id: 75
+      },
+      AskOrderVolume9: {
+        type: "uint64",
+        id: 76
+      },
+      AskOrderVolume10: {
+        type: "uint64",
+        id: 77
+      },
+      PreSettle: {
+        type: "uint64",
+        id: 78
+      },
+      Settle: {
+        type: "uint64",
+        id: 79
+      },
+      PreHoldVolume: {
+        type: "uint64",
+        id: 80
+      },
+      HoldVolume: {
+        type: "uint64",
+        id: 81
+      },
+      HoldIncrement: {
+        type: "uint64",
+        id: 82
+      },
+      AveragePrice: {
+        type: "uint64",
+        id: 83
+      },
+      OrderId: {
+        type: "uint64",
+        id: 84
+      },
+      LimitUp: {
+        type: "uint64",
+        id: 85
+      },
+      LimitDown: {
+        type: "uint64",
+        id: 86
+      },
+      Inventory: {
+        type: "uint64",
+        id: 87
+      },
+      IsCleared: {
+        type: "int32",
+        id: 88
+      },
+      IsSettled: {
+        type: "int32",
+        id: 89
+      },
+      LowTime: {
+        type: "string",
+        id: 90
+      },
+      HighTime: {
+        type: "string",
+        id: 91
+      },
+      BidQueueInfo: {
+        type: "string",
+        id: 92
+      },
+      AskQueueInfo: {
+        type: "string",
+        id: 93
+      },
+      OriginalTurnover: {
+        type: "double",
+        id: 94
+      },
+      LastLot: {
+        type: "uint64",
+        id: 95
+      },
+      TotalLot: {
+        type: "uint64",
+        id: 96
+      },
+      BidOrderID: {
+        type: "uint64",
+        id: 97
+      },
+      BidOrderID2: {
+        type: "uint64",
+        id: 98
+      },
+      BidOrderID3: {
+        type: "uint64",
+        id: 99
+      },
+      BidOrderID4: {
+        type: "uint64",
+        id: 100
+      },
+      BidOrderID5: {
+        type: "uint64",
+        id: 101
+      },
+      AskOrderID: {
+        type: "uint64",
+        id: 102
+      },
+      AskOrderID2: {
+        type: "uint64",
+        id: 103
+      },
+      AskOrderID3: {
+        type: "uint64",
+        id: 104
+      },
+      AskOrderID4: {
+        type: "uint64",
+        id: 105
+      },
+      AskOrderID5: {
+        type: "uint64",
+        id: 106
+      },
+      StrikePrice: {
+        type: "uint64",
+        id: 107
+      },
+      ClearTime: {
+        type: "uint64",
+        id: 108
+      },
+      CallOptionPremiums: {
+        type: "uint64",
+        id: 109
+      },
+      CallOptionPremiums2: {
+        type: "uint64",
+        id: 110
+      },
+      CallOptionPremiums3: {
+        type: "uint64",
+        id: 111
+      },
+      CallOptionPremiums4: {
+        type: "uint64",
+        id: 112
+      },
+      CallOptionPremiums5: {
+        type: "uint64",
+        id: 113
+      },
+      PutOptionPremiums: {
+        type: "uint64",
+        id: 114
+      },
+      PutOptionPremiums2: {
+        type: "uint64",
+        id: 115
+      },
+      PutOptionPremiums3: {
+        type: "uint64",
+        id: 116
+      },
+      PutOptionPremiums4: {
+        type: "uint64",
+        id: 117
+      },
+      PutOptionPremiums5: {
+        type: "uint64",
+        id: 118
+      },
+      NonTotalVolume: {
+        type: "uint64",
+        id: 119
+      },
+      NonTotalHolderVolume: {
+        type: "uint64",
+        id: 120
+      },
+      NonTotalTurnover: {
+        type: "uint64",
+        id: 121
+      },
+      NonTotalLot: {
+        type: "uint64",
+        id: 122
+      },
+      TradeDateFTH: {
+        type: "uint64",
+        id: 123
+      },
+      MarkPrice: {
+        type: "uint64",
+        id: 124
+      },
+      FundsRate: {
+        type: "uint64",
+        id: 125
+      },
+      BidPriceA: {
+        rule: "repeated",
+        type: "uint64",
+        id: 126,
+        options: {
+          packed: false
+        }
+      },
+      AskPriceA: {
+        rule: "repeated",
+        type: "uint64",
+        id: 127,
+        options: {
+          packed: false
+        }
+      },
+      BidVolumeA: {
+        rule: "repeated",
+        type: "uint64",
+        id: 128,
+        options: {
+          packed: false
+        }
+      },
+      AskVolumeA: {
+        rule: "repeated",
+        type: "uint64",
+        id: 129,
+        options: {
+          packed: false
+        }
+      },
+      BidOrderA: {
+        rule: "repeated",
+        type: "uint64",
+        id: 130,
+        options: {
+          packed: false
+        }
+      },
+      AskOrderA: {
+        rule: "repeated",
+        type: "uint64",
+        id: 131,
+        options: {
+          packed: false
+        }
+      },
+      BidOrderVolA: {
+        rule: "repeated",
+        type: "uint64",
+        id: 132,
+        options: {
+          packed: false
+        }
+      },
+      AskOrderVolA: {
+        rule: "repeated",
+        type: "uint64",
+        id: 133,
+        options: {
+          packed: false
+        }
+      },
+      PublicTradeType: {
+        type: "string",
+        id: 134
+      },
+      IEV: {
+        type: "uint64",
+        id: 135
+      },
+      IEP: {
+        type: "uint64",
+        id: 136
+      },
+      GrepMarketPrice: {
+        type: "uint64",
+        id: 137
+      },
+      BidPricem: {
+        type: "string",
+        id: 138
+      },
+      AskPricem: {
+        type: "string",
+        id: 139
+      },
+      BidVolumem: {
+        type: "string",
+        id: 140
+      },
+      AskVolumem: {
+        type: "string",
+        id: 141
+      },
+      BidPrecision2m: {
+        type: "string",
+        id: 142
+      },
+      AskPrecision2m: {
+        type: "string",
+        id: 143
+      },
+      BidPrecisionVolume2m: {
+        type: "string",
+        id: 144
+      },
+      AskPrecisionVolume2m: {
+        type: "string",
+        id: 145
+      },
+      BidPrecision3m: {
+        type: "string",
+        id: 146
+      },
+      AskPrecision3m: {
+        type: "string",
+        id: 147
+      },
+      BidPrecisionVolume3m: {
+        type: "string",
+        id: 148
+      },
+      AskPrecisionVolume3m: {
+        type: "string",
+        id: 149
+      },
+      PricePctChange: {
+        type: "double",
+        id: 150
+      },
+      PricePctAmplitude: {
+        type: "double",
+        id: 151
+      },
+      PriceChange: {
+        type: "uint64",
+        id: 152
+      },
+      PriceChangeSinceOpen: {
+        type: "uint64",
+        id: 153
+      }
+    }
+  },
   PerformanceTradeApplyReq: {
     fields: {
       Header: {

+ 162 - 0
public/proto/mtp.proto

@@ -1207,6 +1207,8 @@ message UserAuditConfigChangeNtf {
 		optional int32 ClosedDays = 7; // int32 最大持仓天数(3)-1为不限
 		optional uint32 GoodsTradeType = 8; // uint32 商品交易权限类型(3)-1:可建可平
 		optional uint32 ChangeType = 9; // uint32 变更类型(增1、改2
+		optional int64 DailyMaxBuyDeliveryQty = 10; // int64 日最大买交收数量(52,-1为不限)
+		optional int64 DailyMaxSellDeliveryQty = 11; // int64 日最大卖交收数量(52,-1为不限)
 }
 // 交易委托请求
 message OrderReq {
@@ -1250,6 +1252,10 @@ message OrderReq {
 		optional uint32 IsAutoAddDeposit = 38; // 是否允许自动补定金
 		optional uint32 IsAutoRefundDeposit = 39; // 是否允许自动退定金
 		optional string AddrInfo = 40; // 地址信息
+		optional uint32 TPFlag = 41; // 止盈标识:0-未设置1-设置
+		optional double TPRatio = 42; // 止盈比例
+		optional uint32 SLFlag = 43; // 止损标识:0-未设置1-设置
+		optional double SLRatio = 44; // 止损比例
 }
 // 交易委托应答
 message OrderRsp {
@@ -6347,6 +6353,162 @@ message ReckonPriceQuote {
 		optional uint64 UpLimitPrice = 8; // 涨停价
 		optional uint64 DnLimitPrice = 9; // 跌停价
 }
+// 历史盘面信息
+message QuoteDay {
+		optional string GoodsCode = 1; // 商品编码
+		optional uint32 ExchangeID = 2; // 交易所代码
+		optional string TradeDate = 3; // 交易日
+		optional uint64 UTCLastTime = 4; // 行情时间
+		optional string LastTime = 5; // 报价时间
+		optional uint64 OpenTime = 6; // 开盘时间
+		optional uint64 PreClose = 7; // 昨收价
+		optional uint64 Opened = 8; // 开盘价
+		optional uint64 Highest = 9; // 最高价
+		optional uint64 Lowest = 10; // 最低价
+		optional uint64 Last = 11; // 最新价
+		optional uint64 LastVolume = 12; // 成交量
+		optional uint64 LastTurnover = 13; // 成交金额
+		optional uint64 TotalBidVolume = 14; // 总买量
+		optional uint64 TotalAskVolume = 15; // 总卖量
+		optional uint64 TotalVolume = 16; // 成交总量
+		optional uint64 TotalTurnover = 17; // 成交总金额
+		optional uint64 Bid = 18; // 买价
+		optional uint64 Bid2 = 19; // 买价2
+		optional uint64 Bid3 = 20; // 买价3
+		optional uint64 Bid4 = 21; // 买价4
+		optional uint64 Bid5 = 22; // 买价5
+		optional uint64 Bid6 = 23; // 买价6
+		optional uint64 Bid7 = 24; // 买价7
+		optional uint64 Bid8 = 25; // 买价8
+		optional uint64 Bid9 = 26; // 买价9
+		optional uint64 Bid10 = 27; // 买价10
+		optional uint64 Ask = 28; // 卖价
+		optional uint64 Ask2 = 29; // 卖价2
+		optional uint64 Ask3 = 30; // 卖价3
+		optional uint64 Ask4 = 31; // 卖价4
+		optional uint64 Ask5 = 32; // 卖价5
+		optional uint64 Ask6 = 33; // 卖价6
+		optional uint64 Ask7 = 34; // 卖价7
+		optional uint64 Ask8 = 35; // 卖价8
+		optional uint64 Ask9 = 36; // 卖价9
+		optional uint64 Ask10 = 37; // 卖价10
+		optional uint64 BidVolume = 38; // 买量
+		optional uint64 BidVolume2 = 39; // 买量2
+		optional uint64 BidVolume3 = 40; // 买量3
+		optional uint64 BidVolume4 = 41; // 买量4
+		optional uint64 BidVolume5 = 42; // 买量5
+		optional uint64 BidVolume6 = 43; // 买量6
+		optional uint64 BidVolume7 = 44; // 买量7
+		optional uint64 BidVolume8 = 45; // 买量8
+		optional uint64 BidVolume9 = 46; // 买量9
+		optional uint64 BidVolume10 = 47; // 买量10
+		optional uint64 AskVolume = 48; // 卖量
+		optional uint64 AskVolume2 = 49; // 卖量2
+		optional uint64 AskVolume3 = 50; // 卖量3
+		optional uint64 AskVolume4 = 51; // 卖量4
+		optional uint64 AskVolume5 = 52; // 卖量5
+		optional uint64 AskVolume6 = 53; // 卖量6
+		optional uint64 AskVolume7 = 54; // 卖量7
+		optional uint64 AskVolume8 = 55; // 卖量8
+		optional uint64 AskVolume9 = 56; // 卖量9
+		optional uint64 AskVolume10 = 57; // 卖量10
+		optional uint64 BidOrderVolume = 58; // 买单量1
+		optional uint64 BidOrderVolume2 = 59; // 买单量2
+		optional uint64 BidOrderVolume3 = 60; // 买单量3
+		optional uint64 BidOrderVolume4 = 61; // 买单量4
+		optional uint64 BidOrderVolume5 = 62; // 买单量5
+		optional uint64 BidOrderVolume6 = 63; // 买单量6
+		optional uint64 BidOrderVolume7 = 64; // 买单量7
+		optional uint64 BidOrderVolume8 = 65; // 买单量8
+		optional uint64 BidOrderVolume9 = 66; // 买单量9
+		optional uint64 BidOrderVolume10 = 67; // 买单量10
+		optional uint64 AskOrderVolume = 68; // 卖单量1
+		optional uint64 AskOrderVolume2 = 69; // 卖单量2
+		optional uint64 AskOrderVolume3 = 70; // 卖单量3
+		optional uint64 AskOrderVolume4 = 71; // 卖单量4
+		optional uint64 AskOrderVolume5 = 72; // 卖单量5
+		optional uint64 AskOrderVolume6 = 73; // 卖单量6
+		optional uint64 AskOrderVolume7 = 74; // 卖单量7
+		optional uint64 AskOrderVolume8 = 75; // 卖单量8
+		optional uint64 AskOrderVolume9 = 76; // 卖单量9
+		optional uint64 AskOrderVolume10 = 77; // 卖单量10
+		optional uint64 PreSettle = 78; // 昨结
+		optional uint64 Settle = 79; // 结算价
+		optional uint64 PreHoldVolume = 80; // 昨持仓
+		optional uint64 HoldVolume = 81; // 持仓量
+		optional uint64 HoldIncrement = 82; // 日增仓
+		optional uint64 AveragePrice = 83; // 均价
+		optional uint64 OrderId = 84; // 序号
+		optional uint64 LimitUp = 85; // 涨停价
+		optional uint64 LimitDown = 86; // 跌停价
+		optional uint64 Inventory = 87; // 库存
+		optional int32 IsCleared = 88; // 已经清盘
+		optional int32 IsSettled = 89; // 已经结算
+		optional string LowTime = 90; // 创新低时间
+		optional string HighTime = 91; // 创新高时间
+		optional string BidQueueInfo = 92; // 大利市买
+		optional string AskQueueInfo = 93; // 大利市卖
+		optional double OriginalTurnover = 94; // 原始总成交金额
+		optional uint64 LastLot = 95; // 成交手数
+		optional uint64 TotalLot = 96; // 成交总手数
+		optional uint64 BidOrderID = 97; // 买单号1
+		optional uint64 BidOrderID2 = 98; // 买单号2
+		optional uint64 BidOrderID3 = 99; // 买单号3
+		optional uint64 BidOrderID4 = 100; // 买单号4
+		optional uint64 BidOrderID5 = 101; // 买单号5
+		optional uint64 AskOrderID = 102; // 卖单号1
+		optional uint64 AskOrderID2 = 103; // 卖单号2
+		optional uint64 AskOrderID3 = 104; // 卖单号3
+		optional uint64 AskOrderID4 = 105; // 卖单号4
+		optional uint64 AskOrderID5 = 106; // 卖单号5
+		optional uint64 StrikePrice = 107; // 行权价
+		optional uint64 ClearTime = 108; // UTC清盘时间
+		optional uint64 CallOptionPremiums = 109; // 认购权利金
+		optional uint64 CallOptionPremiums2 = 110; // 认购权利金2
+		optional uint64 CallOptionPremiums3 = 111; // 认购权利金3
+		optional uint64 CallOptionPremiums4 = 112; // 认购权利金4
+		optional uint64 CallOptionPremiums5 = 113; // 认购权利金5
+		optional uint64 PutOptionPremiums = 114; // 认沽权利金
+		optional uint64 PutOptionPremiums2 = 115; // 认沽权利金2
+		optional uint64 PutOptionPremiums3 = 116; // 认沽权利金3
+		optional uint64 PutOptionPremiums4 = 117; // 认沽权利金4
+		optional uint64 PutOptionPremiums5 = 118; // 认沽权利金5
+		optional uint64 NonTotalVolume = 119; // 非成交总量
+		optional uint64 NonTotalHolderVolume = 120; // 非成交持仓总量
+		optional uint64 NonTotalTurnover = 121; // 非成交金额
+		optional uint64 NonTotalLot = 122; // 非成交手数
+		optional uint64 TradeDateFTH = 123; // UTC交易日期
+		optional uint64 MarkPrice = 124; // 标记价格
+		optional uint64 FundsRate = 125; // 资金率
+		repeated uint64 BidPriceA = 126; // 买价集合
+		repeated uint64 AskPriceA = 127; // 卖价集合
+		repeated uint64 BidVolumeA = 128; // 买量集合
+		repeated uint64 AskVolumeA = 129; // 卖价集合
+		repeated uint64 BidOrderA = 130; // 买单集合
+		repeated uint64 AskOrderA = 131; // 卖单集合
+		repeated uint64 BidOrderVolA = 132; // 买单量集合
+		repeated uint64 AskOrderVolA = 133; // 卖单量集合
+		optional string PublicTradeType = 134; // 公共交易类型
+		optional uint64 IEV = 135; // 均衡价
+		optional uint64 IEP = 136; // 均衡量
+		optional uint64 GrepMarketPrice = 137; // 暗盘价格
+		optional string BidPricem = 138; // 买价集合字符串
+		optional string AskPricem = 139; // 卖价集合字符串
+		optional string BidVolumem = 140; // 买量集合字符串
+		optional string AskVolumem = 141; // 卖量集合字符串
+		optional string BidPrecision2m = 142; // 买价精度2
+		optional string AskPrecision2m = 143; // 卖价精度2
+		optional string BidPrecisionVolume2m = 144; // 买量精度2
+		optional string AskPrecisionVolume2m = 145; // 卖量精度2
+		optional string BidPrecision3m = 146; // 买价精度3
+		optional string AskPrecision3m = 147; // 卖价精度3
+		optional string BidPrecisionVolume3m = 148; // 买量精度3
+		optional string AskPrecisionVolume3m = 149; // 卖量精度3
+		optional double PricePctChange = 150; // 价格百分比变化
+		optional double PricePctAmplitude = 151; // 价格振幅百分比
+		optional uint64 PriceChange = 152; // 价格变化值
+		optional uint64 PriceChangeSinceOpen = 153; // 价格于开盘价变化值
+}
 // 履约交易申请请求
 message PerformanceTradeApplyReq {
 	optional MessageHead Header = 1;

+ 88 - 6
src/packages/mobile/views/pricing/trade/prepayment/Index.vue

@@ -68,6 +68,43 @@
                     </li>
                 </ul>
             </div>
+            <!-- 任务 #7130 -->
+            <div class="order-tpsl" v-if="quote?.tpslflag">
+                <div class="order-tpsl__tp">
+                    <div class="left">
+                        <Checkbox v-model="formData.TPFlag" :disabled="!!quote.tpslforceflag">止盈退订</Checkbox>
+                    </div>
+                    <div class="right">
+                        <div class="right-top">
+                            <span>单价{{ (tpsl.takeProfitSpread > 0 ? '+' : '')
+                                + tpsl.takeProfitSpread.toFixed(quote.decimalplace) }}</span>
+                            <span class="g-price-up">[{{ takeProfitRatio.toFixed(2) }}%]</span>
+                            <span class="g-price-up">+{{ tpsl.takeProfit.toFixed(2) }}</span>
+                        </div>
+                        <div class="right-bottom">
+                            <Slider v-model="takeProfitRatio" :bar-height="6" :min="quote.tpratiodown * 100"
+                                :max="quote.tpratioup * 100" :step="0.01" :disabled="!formData.TPFlag" />
+                        </div>
+                    </div>
+                </div>
+                <div class="order-tpsl__sl">
+                    <div class="left">
+                        <Checkbox v-model="formData.SLFlag" :disabled="!!quote?.tpslforceflag">止损退订</Checkbox>
+                    </div>
+                    <div class="right">
+                        <div class="right-top">
+                            <span>单价{{ (tpsl.stopLossSpread > 0 ? '+' : '')
+                                + tpsl.stopLossSpread.toFixed(quote.decimalplace) }}</span>
+                            <span class="g-price-down">[{{ stopLossRatio.toFixed(2) }}%]</span>
+                            <span class="g-price-down">-{{ tpsl.stopLoss.toFixed(2) }}</span>
+                        </div>
+                        <div class="right-bottom">
+                            <Slider v-model="stopLossRatio" :bar-height="6" :min="quote.slratiodown * 100"
+                                :max="quote.slratioup * 100" :step="0.01" :disabled="!formData.SLFlag" />
+                        </div>
+                    </div>
+                </div>
+            </div>
             <template #footer v-if="collection">
                 <div class="g-form__footer inset">
                     <Button type="danger" block :disabled="orderQty === 0" @click="onSubmit">
@@ -80,14 +117,14 @@
 </template>
 
 <script lang="ts" setup>
-import { useFuturesStore, useGoodsCollectionStore, i18n, useAccountStore } from '@/stores'
 import { shallowRef, computed, onMounted } from 'vue'
-import { Button, Image } from 'vant'
+import { Button, Image, Slider, Checkbox } from 'vant'
 import { useOrder } from '@/business/trade'
 import { fullloading, dialog } from '@/utils/vant'
 import { BuildType, BuyOrSell, PriceMode } from '@/constants/order'
 import { getFileUrl, currencyFormat } from '@/filters'
 import { getGoodsUnitName } from '@/constants/unit'
+import { useFuturesStore, useGoodsCollectionStore, i18n, useAccountStore } from '@/stores'
 import AppModal from '@/components/base/modal/index.vue'
 import eventBus from '@/services/bus'
 
@@ -122,6 +159,33 @@ const { global: { t } } = i18n
 
 const { formData, formSubmit } = useOrder()
 
+const takeProfitRatio = shallowRef(0) // 止盈比例
+const stopLossRatio = shallowRef(0) // 止损比例
+
+// 计算盈亏
+const calcProfitLoss = (ratio: number) => usedMargin.value.deposit * (ratio / 100)
+
+// 计算价差
+const calcSpread = (value: number) => {
+    const { agreeunit = 0.0 } = quote.value ?? {}
+    return value / (props.orderQty * agreeunit) * (props.orderType === 2 ? 1 : -1)
+}
+
+// 止盈止损
+const tpsl = computed(() => {
+    const takeProfit = calcProfitLoss(takeProfitRatio.value) // 盈利
+    const takeProfitSpread = calcSpread(takeProfit) // 止盈价差
+    const stopLoss = calcProfitLoss(stopLossRatio.value) // 亏损
+    const stopLossSpread = calcSpread(stopLoss) // 止损价差
+
+    return {
+        takeProfit,
+        takeProfitSpread,
+        stopLoss,
+        stopLossSpread
+    }
+})
+
 // 计算市价
 const marketPrice = computed(() => {
     const { ask = 0, bid = 0 } = quote.value ?? {}
@@ -179,11 +243,22 @@ const usedMargin = computed(() => {
 
 // 委托下单
 const onSubmit = () => {
-    const { goodsid, marketid } = quote.value ?? {}
+    const { goodsid, marketid, tpslflag } = quote.value ?? {}
     formData.GoodsID = goodsid
     formData.MarketID = marketid
+
     // 市价
-    if (formData.PriceMode === PriceMode.Market) { formData.OrderPrice = marketPrice.value }
+    if (formData.PriceMode === PriceMode.Market) {
+        formData.OrderPrice = marketPrice.value
+    }
+
+    // 止盈止损
+    if (tpslflag) {
+        formData.TPRatio = formData.TPFlag ? takeProfitRatio.value / 100 : 0
+        formData.SLRatio = formData.SLFlag ? stopLossRatio.value / 100 : 0
+        formData.TPFlag = Number(formData.TPFlag)
+        formData.SLFlag = Number(formData.SLFlag)
+    }
 
     fullloading((hideLoading) => {
         formSubmit().then(() => {
@@ -217,12 +292,19 @@ onMounted(() => {
     formData.PriceMode = PriceMode.Market
     formData.MarketMaxSub = 100.0
     /// 默认价格和数量
-    const { last = 0, presettle = 0 } = quote.value ?? {}
+    const { last = 0, presettle = 0, tpslflag = 0, tpratiodefault = 0, slratiodefault = 0 } = quote.value ?? {}
     formData.OrderPrice = last || presettle
     formData.OrderQty = props.orderQty
+
+    if (tpslflag) {
+        formData.TPFlag = 1
+        formData.SLFlag = 1
+        takeProfitRatio.value = tpratiodefault * 100
+        stopLossRatio.value = slratiodefault * 100
+    }
 })
 </script>
 
-<style lang="less" scoped>
+<style lang="less">
 @import './index.less';
 </style>

+ 58 - 0
src/packages/mobile/views/pricing/trade/prepayment/index.less

@@ -66,4 +66,62 @@
             }
         }
     }
+
+    .order-tpsl {
+        background-color: #fff;
+        padding: 20px;
+        margin-top: 5px;
+
+        &__tp,
+        &__sl {
+            display: flex;
+            align-items: flex-end;
+
+            .right {
+                flex: 1;
+                margin-left: 20px;
+
+                &-top {
+                    font-size: 12px;
+                    text-align: center;
+                    color: #666;
+
+                    span {
+                        margin: 0 2px;
+                    }
+                }
+
+                &-bottom {
+                    min-height: 14px;
+                    margin-top: 20px;
+                }
+            }
+        }
+
+        &__tp {
+            .left {
+                --van-checkbox-checked-icon-color: var(--color-up);
+                --van-checkbox-disabled-icon-color: var(--color-up);
+                --van-checkbox-disabled-background: #cdf3d2;
+            }
+
+            .right {
+                --van-slider-active-background: var(--color-up);
+            }
+        }
+
+        &__sl {
+            margin-top: 24px;
+
+            .left {
+                --van-checkbox-checked-icon-color: var(--color-down);
+                --van-checkbox-disabled-icon-color: var(--color-down);
+                --van-checkbox-disabled-background: #ffe1e1;
+            }
+
+            .right {
+                --van-slider-active-background: var(--color-down);
+            }
+        }
+    }
 }

+ 12 - 3
src/packages/tss/views/order/position/Index.vue

@@ -65,15 +65,24 @@
                             <li>
                                 <label>{{ $t('position.goods.holderprice') }}</label>
                                 <span>
-                                    {{ currencyFormat(item.tHDetailEx.holderPrice, item.currencyid, {
-                                        fractionDigits:
-                                    item.decimalPlace})}}
+                                    {{ currencyFormat(item.tHDetailEx.holderPrice, item.currencyid,
+                                        {fractionDigits:item.decimalPlace})}}
                                 </span>
                             </li>
                             <li>
                                 <label>{{ $t('position.goods.holderamount') }}</label>
                                 <span>{{ currencyFormat(item.tHDetailEx.holderAmount, item.currencyid) }}</span>
                             </li>
+                            <li v-if="item.tHDetailEx.TPFlag">
+                                <label>止盈价格</label>
+                                <span>{{ currencyFormat(item.tHDetailEx.tPPrice, item.currencyid,
+                                    {fractionDigits:item.decimalPlace}) }}</span>
+                            </li>
+                            <li v-if="item.tHDetailEx.sLFlag">
+                                <label>止损价格</label>
+                                <span>{{ currencyFormat(item.tHDetailEx.sLPrice, item.currencyid,
+                                    {fractionDigits:item.decimalPlace}) }}</span>
+                            </li>
                         </ul>
                     </div>
                     <div class="order-list__btnbar" v-if="item.tHDetailEx.holderQty">

+ 1 - 1
src/services/api/trade/index.ts

@@ -187,7 +187,7 @@ export function cancelOrder(config: RequestConfig<Proto.CancelOrderReq>) {
 /**
  * 交易下单
  */
-export function order(config: RequestConfig<Proto.OrderReq>) {
+export function order(config: RequestConfig<Partial<Proto.OrderReq>>) {
     return http.mqRequest<Proto.OrderRsp>({
         data: config.data,
         requestCode: 'OrderReq',

+ 18 - 2
src/stores/modules/futures.ts

@@ -90,7 +90,7 @@ export const useFuturesStore = defineStore(() => {
                 roletype: 7
             }
         })
-        
+
         const { data: goodsList } = await queryErmcpGoods()
 
         for (let i = 0; i < goodsList.length; i++) {
@@ -339,6 +339,14 @@ export const useFuturesStore = defineStore(() => {
             lowestColor: '',
             pictureurl: '',
             thumurls: '',
+            tpslflag: 0,
+            tpslforceflag: 0,
+            slratiodefault: 0,
+            slratiodown: 0,
+            slratioup: 1,
+            tpratiodefault: 0,
+            tpratiodown: 0,
+            tpratioup: 1,
             traderules: [],
             tradefees: []
         }
@@ -381,7 +389,15 @@ export const useFuturesStore = defineStore(() => {
                     pictureurl: item.pictureurl,
                     traderules: item.traderules,
                     tradefees: item.tradefees,
-                    thumurls: item.thumurls
+                    thumurls: item.thumurls,
+                    tpslflag: item.tpslflag,
+                    tpslforceflag: item.tpslforceflag,
+                    slratiodefault: item.slratiodefault,
+                    slratiodown: item.slratiodown,
+                    slratioup: item.slratioup,
+                    tpratiodefault: item.tpratiodefault,
+                    tpratiodown: item.tpratiodown,
+                    tpratioup: item.tpratioup,
                 } = goods)
 
                 item.iscannotbuy = goods.iscannotbuy ?? 0

+ 1 - 1
src/stores/modules/position.ts

@@ -135,7 +135,7 @@ export const useSBYJOrderStore = defineStore(() => {
         state.orderList.forEach((e) => {
             e.tHDetailEx.depositRate = calcDepositRate(e)
             e.tHDetailEx.floatPL = calcFloatpl(e)
-            e.tHDetailEx.riskRate = calRiskRate(e)
+            //e.tHDetailEx.riskRate = calRiskRate(e)
         })
         // 任务 #5753
         return state.orderList.filter((e) => e.tHDetailEx.holderQty > 0)

+ 18 - 23
src/types/model/goods.d.ts

@@ -10,9 +10,7 @@ declare namespace Model {
     interface GoodsRsp {
         agreeunit: number; // 合约单位
         areauserid: number; // 所属机构
-        auditaccountid: number; // 审核操作员账号
-        audittime: string; // 审核时间
-        bannerurls: string; // bannerurls
+        bannerurls: string; // Banner图片(2:1)(逗号分隔)
         buyotherfeealgorithm: number; // 买交收其它费用算法
         buyotherfeevalue: number; // 买交收其它费用值
         buypricemovealgorithm: number; // 买交收升贴水算法
@@ -21,16 +19,11 @@ declare namespace Model {
         buyshippingfeevalue: number; // 买交收运费值
         canautoadddeposit: number; // 是否允许自动追加定金: 0-否 1-是(52)
         canautorefunddeposit: number; // 是否允许自动退还定金: 0-否 1-是(52)
-        cancelaccountid: number; // 注销操作员账号
-        canceltime: string; // 注销时间
         closepricemode: number; // 强平价格方式 - 1:市价 2:最新价 3:涨跌停(未实现)
         closepriceparam: number; // 强平最新价浮动比例 - 方式为2时使用 (<1)买 上浮 (1+x)最新价卖 下浮 (1-x)最新价
-        createtime: string; // 创建时间
-        creatorid: number; // 创建人
         currencyid: number; // 报价货币ID
         cutmode: number; // 斩仓方式 - 1:不斩仓 2:自动斩仓 3:半自动斩仓
         decimalplace: number; // 报价小数位
-        delistingdate: string; // 商品退市时间(状态:退市) -- 已作废
         delistingmode: number; // 退市方式 - 1:退市平仓 2:退市交收 3:不处理(仅期权\币币兑换)
         deliveryflag: number; // 交割标志 - 0:不可交割 1:可交割
         enumdicname: string; // 单位名称
@@ -42,28 +35,24 @@ declare namespace Model {
         goodsgroupname: string; // 所属商品组名称
         goodsid: number; // 商品ID(自增ID SEQ_GOODS)
         goodsname: string; // 商品名称
+        goodsnameen: string; // 期货合约名称(英文)
+        goodsnameth: string; // 期货合约名称泰文)
+        goodsnametw: string; // 期货合约名称(繁体)
+        goodsnamevi: string; // 期货合约名称(越南语)
         goodsorder: string; // 商品显示顺序(99)
-        goodsquotetype: number; // 合约报价类型: 1-直接报价 2-间接报价
         goodsstatus: number; // 商品状态- 1:待审核 2:未上市 3:上市 4:已注销 5:审核拒绝 6:退市 7:待退市
         goodstradetype: number; // 商品交易权限类型 - 1:可建可平 3:不可建可平
         goodunitid: number; // 报价单位ID
-        hasquoter: number; // 是否有报价商 - 0:无报价商 1:有报价商
-        hqprotecttime: number; // 行情保护时间(秒)
-        innerdealmode: number; // 内部成交方式[通道交易] - 1:净头寸 2:开平 3:平今
         isbuylimited: number; // 是否限制建仓量 - 0:不限制 1:限制
         isvisible: number; // 游客是否可见 - 0:不可见 1:可见
-        lasttradedate: string; // 最后交易日期(状态:待退市)
-        listingdate: string; // 交易开始日期
+        marginalgorithm: number; // 持仓定金方式(49) - 1:比率 2.固定(52)
         marketid: number; // 所属市场ID
         marketmarginalgorithm: number; // 保证金计算方式
         marketmarginvalue: number; // 即市保证金值
         maxspread: number; // 点差上限(46)
         mindeliverylot: number; // 最小交收手数(50模式)
         minspread: number; // 点差下限(46)
-        modifierid: number; // 修改人
         modifystatus: number; // 变更状态 - 1:未变更 2:变更中 3:待审核 4:已审核
-        modifytime: string; // 修改时间
-        outerdealmode: number; // 外部成交方式[通道交易]- 1:净头寸 2:开平 3:平今
         outgoodscode: string; // 商品代码(外部)
         pictureurl: string; // 商品图片
         provideraccountid: number; // 发售方资金账户ID(49)\供货商资金账户ID(50)
@@ -71,23 +60,29 @@ declare namespace Model {
         qtydecimalplace: number; // 成交量小数位
         quotegear: number; // 行情档位(1-10)
         quoteminunit: number; // 行情最小变动单位 [整数,报价小数位一起使用]
-        quoteshowtype: number; // 行情报价类型: 1:成交价 2:买卖中间价 3:含买价 4:含卖价做市模式固定为3:含买价
-        quoteshowtypeinterval: number; // 行情报价间隔时间(秒)(成交价时为0)
         relatedgoodsid: number; // 关联参考商品ID
-        remark: string; // 备注
+        riskcontrolmode: number; // 风控方式(52、10模式) 1:按单风控 2:按账户风控
         sellotherfeealgorithm: number; // 卖交收其它费用算法
         sellotherfeevalue: number; // 卖交收其它费用值
         sellpricemovealgorithm: number; // 卖交收升贴水算法
         sellpricemovevalue: number; // 卖交收升贴水值
         sellshippingfeealgorithm: number; // 卖交收运费算法
-        sellshippingfeevalue: number;  // 卖交收运费值
+        sellshippingfeevalue: number; // 卖交收运费值
+        slratiodefault: number; // 止损默认比例
+        slratiodown: number; // 止损比例下限
+        slratioup: number; // 止损比例上限
         thumurls: string; // 缩略图片(1:1)(逗号分隔)
+        tpratiodefault: number; // 止盈默认比例
+        tpratiodown: number; // 止盈比例下限
+        tpratioup: number; // 止盈比例上限
+        tpslflag: number; // 是否开启止盈止损 - 0:不开启 1:开启
+        tpslforceflag: number; // 是否强制止盈止损 - 0:不强制 1:强制
         trademode: number; // 交易模式 - 10:做市 13:竞价 15:通道交易 16:挂牌点选 17:仓单贸易 18:期权 19:竞拍-降价式 20:竞拍-竞价式 21:竞拍-大宗式 22:受托竞价
         tradeproperty: number; // 交易属性 - 1:收益权(可做空) 2:所有权(不可做空) 3:期权 4:现货 5:参考行情 6:通道交易 7:币交易 8:场外期权
+        transferdepositratio: number; // 转让定金比例(49)\持仓定金(52)
+        marginalgorithm: number // 1(比率) 2(固定)
         traderules: Proto.TradeRuleInfoStruct['TradeRules'] // 交易规则
         tradefees: Proto.TradeFeeInfoStruct['TradeFees'] // 交易规则
-        transferdepositratio: number // 
-        marginalgorithm: number // 1(比率) 2(固定)
     }
 
     /** 现货商品详情 */

+ 9 - 1
src/types/model/market.d.ts

@@ -145,9 +145,17 @@ declare namespace Model {
         pictureurl: string; // 商品图片
         goodstradetype: number;//商品交易权限类型 - 1:可建可平 3:不可建可平
         currencyid: number;//报价货币ID
+        thumurls: string; // 缩略图片(1:1)(逗号分隔)
+        slratiodefault: number; // 止损默认比例
+        slratiodown: number; // 止损比例下限
+        slratioup: number; // 止损比例上限
+        tpratiodefault: number; // 止盈默认比例
+        tpratiodown: number; // 止盈比例下限
+        tpratioup: number; // 止盈比例上限
+        tpslflag: number; // 是否开启止盈止损 - 0:不开启 1:开启
+        tpslforceflag: number; // 是否强制止盈止损 - 0:不强制 1:强制
         traderules: Proto.TradeRuleInfoStruct['TradeRules'] // 交易规则
         tradefees: Proto.TradeFeeInfoStruct['TradeFees'] // 交易费用
-        thumurls: string; // 缩略图片(1:1)(逗号分隔)
     }
 
     /** 查询新板块设置 响应 */

+ 47 - 76
src/types/model/order.d.ts

@@ -1476,82 +1476,53 @@ declare namespace Model {
     }
 
     interface TradeHolderDetailEx {
-        /// 成交单号(101+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
-        tradeID: string;
-        /// 方向 - 0:买 1:卖
-        buyOrSell: number;
-        // 允许自动补定金 是(1),否(0)
-        canautoadddeposit?: number;
-        // 允许自动退定金 是(1),否(0)
-        canautorefunddeposit?: number;
-        // 到期剩余天数
-        closeddays: number;
-        // 追加定金率
-        adddepositrate?: number;
-        /// 交易日(yyyyMMdd)
-        tradeDate: string;
-        /// 市场ID
-        marketID: number;
-        /// 商品ID
-        goodsID: number;
-        /// 用户ID
-        userID: number;
-        /// 账号ID
-        accountID: number;
-        /// 对手用户ID
-        matchUserID: number;
-        /// 对手账号ID
-        matchAccountID: number;
-        /// 建仓数量
-        openQty: number;
-        /// 成交金额
-        tradeAmount: number;
-        /// 建仓价格
-        openPrice: number;
-        /// 持仓数量
-        holderQty: number;
-        /// 持仓金额
-        holderAmount: number;
-        /// 持仓价格
-        holderPrice: number;
-        /// 冻结数量
-        freezeQty: number;
-        /// 交收手数(已交收)
-        deliveryQty: number;
-        /// 持仓天数
-        holdDays: number;
-        /// 已付定金
-        payedDeposit: number;
-        /// 补充定金
-        restockDeposit: number;
-        /// 滞纳金起计天数
-        lateFeeDays: number;
-        /// 滞纳金收取方式 1:比率 2:固定
-        lateFeeAlgorithm: number;
-        /// 滞纳金收取值
-        lateFeeValue: number;
-        /// 已计滞纳金
-        callAteFee: number;
-        /// 提示定金率
-        promptDepositRate: number;
-        /// 斩仓定金率
-        cutDepositRate: number;
-        /// 提示价格
-        promptPrice: number;
-        /// 斩仓价格
-        cutPrice: number;
-        /// 平仓盈亏
-        closePL: number;
-        /// 浮动盈亏
-        floatPL: number;
-        /// 订单定金率
-        depositRate: number;
-        /// 风险率
-        riskRate: number;
-        /// 可退定金
-        refundableDeposit: number;
-        /// 交易时间
-        tradeTime: string;
+        TPFlag: number; // 止盈标识:0-未设置 1-设置
+        TPRatio: number; // 止盈比例
+        accountID: number; // 账号ID
+        adddepositrate: number; // 自动追加定金率(52) - 允许时显示
+        buyOrSell: number; // 方向 - 0:买 1:卖
+        callAteFee: number; // 已计滞纳金
+        canautoadddeposit: number; // 是否允许自动追加定金: 0-否 1-是(52)
+        canautorefunddeposit: number; // 是否允许自动退还定金: 0-否 1-是(52)
+        closePL: number; // 平仓盈亏
+        closeddays: number; // 剩余平仓天数(52) -1为不强平
+        cutDepositRate: number; // 斩仓定金率
+        cutPrice: number; // 斩仓价格
+        deliveryQty: number; // 交收手数(已交收)
+        depositRate: number; // 订单定金率
+        floatPL: number; // 浮动盈亏
+        freezeQty: number; // 冻结数量
+        goodsID: number; // 商品ID
+        holdDays: number; // 持仓天数
+        holderAmount: number; // 持仓金额
+        holderPrice: number; // 持仓价格
+        holderQty: number; // 持仓数量
+        lateFeeAlgorithm: number; // 滞纳金收取方式 1:比率 2:固定
+        lateFeeDays: number; // 滞纳金起计天数
+        lateFeeValue: number; // 滞纳金收取值
+        marketID: number; // 市场ID
+        matchAccountID: number; // 对手账号ID
+        matchUserID: number; // 对手用户ID
+        openPrice: number; // 建仓价格
+        openQty: number; // 建仓数量
+        oripayeddeposit: number; // 初始已付定金
+        orirestockdeposit: number; // 累计补充定金
+        payedDeposit: number; // 已付定金
+        promptDepositRate: number; // 提示定金率
+        promptPrice: number; // 提示价格
+        refundableDeposit: number; // 可退定金
+        restockDeposit: number; // 补充定金
+        sLFlag: number; // 止损标识:0-未设置 1-设置
+        sLLossValue: number; // 止损亏损值(负) = 占用止损比例-1
+        sLPrice: number; // 止损价格
+        sLRatio: number; // 止损比例
+        tPPrice: number; // 止盈价格
+        tPProfitValue: number; // 止盈盈利(正) = 占用*止盈比例
+        tradeAmount: number; // 成交金额
+        tradeDate: string; // 交易日(yyyyMMdd)
+        tradeID: string; // 成交单号(101+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
+        tradeTime: string; // 交易时间
+        userID: number; // 用户ID
     }
 
     /// 交易持仓扩展表记录

+ 46 - 42
src/types/proto/trade.d.ts

@@ -419,45 +419,49 @@ declare global {
         // 交易委托请求
         interface OrderReq {
             Header?: IMessageHead; // 消息头
-            ClientSerialNo?: string; // 客户端流水号
-            ClientOrderTime?: string; // 客户端委托时间
-            ClientType?: number; // 终端类型
-            LoginID?: number; // 登陆账号
-            AccountID?: number; // 交易账号
-            GoodsID?: number; // 商品ID
-            MarketID?: number; // 市场ID
-            ValidType?: number; // 校验类型
-            OperateType?: number; // 操作类型:
-            OrderSrc?: number; // 单据来源
-            OperatorID?: number; // 操作员账号ID
-            OrderPrice?: number; // 委托价格
-            MarketMaxSub?: number; // 市价允许最大偏差(做市)
-            OrderQty?: number; // 委托数量
-            BuyOrSell?: number; // 买卖方向
-            BuildType?: number; // 下单类型
-            CurtQuotePrice?: number; // 保留,计算冻结金额使用
-            SpPrice?: number; // 止盈价格
-            SlPrice?: number; // 止损价格
-            PriceMode?: number; // 取价方式
-            TimevalidType?: number; // 时间有效类型
-            TriggerType?: number; // 预埋单触发类型
-            TriggerPrice?: number; // 预埋单触发价格
-            ListingSelectType?: number; // 挂牌点选类型
-            DelistingType?: number; // 摘牌类型
-            RelatedID?: string | Long; // 关联单号
-            OptionType?: number; // 期权类型(1:认购(看涨)2:认沽(看跌))
-            Premium?: number; // 权利金
-            TriggerOperator?: number; // 触发条件(1:大于等于2:小于等于)
-            ServiceTime?: string; // 服务端时间
-            CouponTypeID?: number; // 优惠券类型ID(买方)
-            UsedQty?: number; // 使用数量
-            ValidTime?: string; // 指定有效日期
-            ReceiveInfoID?: number; // 收货地址ID
-            OrderFlag?: number; // 委托标识-1:按量
-            OrderAmount?: number; // 委托金额OrderFlag=2必填
-            IsAutoAddDeposit?: number; // 是否允许自动补定金
-            IsAutoRefundDeposit?: number; // 是否允许自动退定金
-            AddrInfo?: string; // 地址信息
+            ClientSerialNo: string; // 客户端流水号
+            ClientOrderTime: string; // 客户端委托时间
+            ClientType: number; // 终端类型
+            LoginID: number; // 登陆账号
+            AccountID: number; // 交易账号
+            GoodsID: number; // 商品ID
+            MarketID: number; // 市场ID
+            ValidType: number; // 校验类型
+            OperateType: number; // 操作类型:
+            OrderSrc: number; // 单据来源
+            OperatorID: number; // 操作员账号ID
+            OrderPrice: number; // 委托价格
+            MarketMaxSub: number; // 市价允许最大偏差(做市)
+            OrderQty: number; // 委托数量
+            BuyOrSell: number; // 买卖方向
+            BuildType: number; // 下单类型
+            CurtQuotePrice: number; // 保留,计算冻结金额使用
+            SpPrice: number; // 止盈价格
+            SlPrice: number; // 止损价格
+            PriceMode: number; // 取价方式
+            TimevalidType: number; // 时间有效类型
+            TriggerType: number; // 预埋单触发类型
+            TriggerPrice: number; // 预埋单触发价格
+            ListingSelectType: number; // 挂牌点选类型
+            DelistingType: number; // 摘牌类型
+            RelatedID: string | Long; // 关联单号
+            OptionType: number; // 期权类型(1:认购(看涨)2:认沽(看跌))
+            Premium: number; // 权利金
+            TriggerOperator: number; // 触发条件(1:大于等于2:小于等于)
+            ServiceTime: string; // 服务端时间
+            CouponTypeID: number; // 优惠券类型ID(买方)
+            UsedQty: number; // 使用数量
+            ValidTime: string; // 指定有效日期
+            ReceiveInfoID: number; // 收货地址ID
+            OrderFlag: number; // 委托标识-1:按量
+            OrderAmount: number; // 委托金额OrderFlag=2必填
+            IsAutoAddDeposit: number; // 是否允许自动补定金
+            IsAutoRefundDeposit: number; // 是否允许自动退定金
+            AddrInfo: string; // 地址信息
+            TPFlag: number; // 止盈标识:0-未设置1-设置
+            TPRatio: number; // 止盈比例
+            SLFlag: number; // 止损标识:0-未设置1-设置
+            SLRatio: number; // 止损比例
         }
 
         // 交易委托应答
@@ -479,7 +483,7 @@ declare global {
             IsAutoRefundDeposit?: number; //允许自动退定金
             ClientSerialNo?: string; // 客户端流水号
         }
-        
+
         // 修改订单接口响应
         interface ModifyOrderRsp {
             Header: IMessageHead; // 消息头
@@ -809,7 +813,7 @@ declare global {
         // 定金转让持仓操作请求
         interface DepositTransferOperateReq {
             Header: IMessageHead; // 消息头
-			UserID: number; // 用户ID,必填
+            UserID: number; // 用户ID,必填
             AccountID: number; // 交易账号,必填
             GoodsID: number; // 商品ID,必填
             Qty: number; // 头寸数量
@@ -818,7 +822,7 @@ declare global {
             OperatorID?: number; // 操作人ID
             ClientSerialNo: string; // 客户端流水号
         }
-        
+
         // 定金转让持仓操作响应
         interface DepositTransferOperateRsp {
             Header: IMessageHead; // 消息头