market.v2.trade.proto 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. syntax = "proto3";
  2. package market.v2.trade;
  3. message Response {
  4. int32 code = 1;
  5. string msg = 2;
  6. string status = 3;
  7. int64 ts = 4;
  8. string ch = 5;
  9. KlineList klinelist = 21;
  10. TradeDepthVO tradedepthvo = 22;
  11. TradeDetailList tradedetaillist = 23;
  12. TradeAreaPair tradeareapair = 24;
  13. MainPair mainpair = 25;
  14. RecommendPair recommendpair = 26;
  15. UpPair uppair = 27;
  16. AmtPair amtpair = 28;
  17. StarPair starpair = 29;
  18. TradeTickerVO tradetickervo = 30;
  19. EntrustVO entrustvo = 31;
  20. UserAssetBalance userassetbalance = 32;
  21. MarketTickerList markettickerlist = 33;
  22. MarginCrossAssetVO margincrossassetvo = 35;
  23. MarginIsolatedAssetVO marginisolatedassetvo = 36;
  24. NewListingPair newlistingpair = 37;
  25. Chgdistributions chgdistributions = 38;
  26. MarketZones marketzones = 39;
  27. KlineOrders klineorders = 40;
  28. NotificationPush notificationpush = 41;
  29. TradeHotListing tradehotlisting = 42;
  30. CtcGoingOrderNum ctcgoingordernum = 43;
  31. MultiChange multichange = 44;
  32. Heatmap heatmap = 45;
  33. DownPair downpair = 46;
  34. HeatVol heatvol = 47;
  35. CurrencyRate currencyrate = 48;
  36. MarketMonit marketmonit = 34;
  37. }
  38. message KlineList {}
  39. message TradeDepthVO {
  40. // 买方深度信息
  41. message Bids {
  42. // Bids的具体字段未在提供的JavaScript代码中指定,需要根据实际序列化逻辑定义。
  43. }
  44. // 卖方深度信息
  45. message Asks {
  46. // 卖方深度数据
  47. message AskData {
  48. // AskData的具体字段未在提供的JavaScript代码中指定,需要根据实际序列化逻辑定义。
  49. }
  50. // 卖方深度数据列表
  51. repeated AskData askdataList = 1;
  52. }
  53. // 买方深度信息
  54. Bids bids = 1;
  55. // 卖方深度信息
  56. Asks asks = 2;
  57. // 最新成交价格
  58. string last = 3;
  59. // 开盘价格
  60. string open = 4;
  61. // CNY价格
  62. string cny = 5;
  63. // 净值
  64. string netvalue = 6;
  65. // 买入或卖出的CNY价格
  66. string buyorsellcnyprice = 7;
  67. // 是否转换为法定货币
  68. bool isfiatconvert = 8;
  69. // 是否显示风险提示
  70. bool isrisktip = 9;
  71. }
  72. message TradeDetailList {
  73. repeated TradeDetailInfo list = 1;
  74. }
  75. // 交易详情列表
  76. message TradeDetailInfo {
  77. int64 tradeid = 1; // 交易ID
  78. string amount = 2; // 数量
  79. string ts = 3; // 时间戳
  80. string price = 4; // 价格
  81. string direction = 5; // 方向
  82. }
  83. message TradeAreaPair {
  84. repeated TradeAreaPairInfo listList = 1;
  85. }
  86. message TradeAreaPairInfo {
  87. int32 tradeid = 1;
  88. string cny = 2;
  89. string buy = 3;
  90. string lever = 4;
  91. string sell = 5;
  92. string last = 6;
  93. string volume = 7;
  94. string change = 8;
  95. string high = 9;
  96. string low = 10;
  97. string isopen = 11;
  98. string open = 12;
  99. string amount = 13;
  100. bool isfiatconvert = 14;
  101. }
  102. // 定义mainpair中的消息类型
  103. message MainPair {
  104. repeated MainPairInfo listList = 1; // 使用repeated关键字表示数组
  105. }
  106. // 定义PairInfo消息类型
  107. message MainPairInfo {
  108. int32 tradeId = 1;
  109. string cny = 2;
  110. string totalamount = 3;
  111. string last = 4;
  112. string volume = 5;
  113. string change = 6;
  114. }
  115. message RecommendPair {
  116. repeated RecommendPairInfo listList = 1; // 使用repeated关键字表示数组
  117. }
  118. // 定义PairInfo消息类型
  119. message RecommendPairInfo {
  120. int32 tradeId = 1;
  121. string cny = 2; // 假设cny是浮点数
  122. string totalamount = 3; // 假设totalamount是浮点数
  123. string last = 4; // 假设last是浮点数
  124. string volume = 5; // 假设volume是浮点数
  125. string change = 6; // 假设change是浮点数
  126. }
  127. message UpPair {}
  128. message AmtPair {}
  129. message StarPair {}
  130. message TradeTickerVO {
  131. int32 tradeid = 1;
  132. string high = 2;
  133. string open = 3;
  134. string low = 4;
  135. string close = 5;
  136. string volume = 6;
  137. string change = 7;
  138. string cny = 8;
  139. string last = 9;
  140. string netvalue = 10;
  141. string amount = 11;
  142. bool isfiatconvert = 12;
  143. }
  144. message EntrustVO {
  145. int64 id = 1;
  146. int32 tradeid = 2;
  147. int64 entrusttime = 3;
  148. string buycoinshortname = 4;
  149. string sellcoinshortname = 5;
  150. int32 type = 6;
  151. int32 direction = 7;
  152. int32 matchtype = 8;
  153. string pricetype = 9;
  154. string entrustprice = 10;
  155. string count = 11;
  156. string successcount = 12;
  157. string averageprice = 13;
  158. int32 status = 14;
  159. bool history = 15;
  160. int64 pushversion = 16;
  161. bool remove = 17;
  162. string amount = 18;
  163. string marketunit = 19;
  164. string funds = 20;
  165. string leftfunds = 21;
  166. string triggerprice = 22;
  167. string marginmode = 23;
  168. string margintrademode = 24;
  169. bool forcedliquidation = 25;
  170. string remark = 26;
  171. string successamount = 27;
  172. int32 tradearea = 28;
  173. string fee = 29;
  174. string trailingdelta = 30;
  175. string activationprice = 31;
  176. int64 activationtime = 32;
  177. int32 triggersign = 33;
  178. string orderid = 34;
  179. }
  180. message UserAssetBalance {
  181. string usdtassets = 1;
  182. string usdtavailableassets = 2;
  183. string totalassets = 3;
  184. string btcassets = 4;
  185. repeated UserWallet userwalletlist = 5;
  186. }
  187. message UserWallet {
  188. repeated UserWalletPairInfo listList = 1;
  189. }
  190. message UserWalletPairInfo{
  191. int32 coinid = 1;
  192. string totalAmount = 2;
  193. string total = 3;
  194. string frozen = 4;
  195. string borrow = 5;
  196. string coinname = 6;
  197. string shortName = 7;
  198. bool withdraw = 8;
  199. bool recharge = 9;
  200. string usdtprice = 10;
  201. string price = 11;
  202. int32 sortid = 12;
  203. }
  204. message MarketTickerList {}
  205. message MarketMonit {
  206. int64 id = 1;
  207. string indexkey = 2;
  208. int32 scope = 3;
  209. int32 tradeid = 4;
  210. string tradecode = 5;
  211. string indexbase = 6;
  212. string quote = 7;
  213. string lever = 8;
  214. string chg = 9;
  215. string last = 10;
  216. string cny = 11;
  217. string createtime = 12;
  218. string biztype = 13;
  219. string contracttype = 14;
  220. int64 liquidationdate = 15;
  221. int64 movetime = 16;
  222. }
  223. message MarginCrossAssetVO {}
  224. message MarginIsolatedAssetVO {}
  225. message NewListingPair {}
  226. message Chgdistributions {
  227. int64 upnum = 1;
  228. int64 flatnum = 2;
  229. int64 downnum = 3;
  230. repeated DistributionPb list = 4;
  231. }
  232. message DistributionPb {
  233. string name = 1;
  234. int32 chgType = 2;
  235. int64 num = 3;
  236. }
  237. message MarketZones {}
  238. message KlineOrders {}
  239. message NotificationPush {
  240. int32 userid = 1;
  241. string title = 2;
  242. string body = 3;
  243. int32 badge = 4;
  244. string group = 5;
  245. map<string, string> extrasMap = 6;
  246. }
  247. message TradeHotListing {}
  248. message CtcGoingOrderNum {
  249. int32 ordernum = 1;
  250. }
  251. message MultiChange {}
  252. message Heatmap {}
  253. message DownPair {}
  254. message HeatVol {}
  255. message CurrencyRate {}