ccxt 4.5.5 → 4.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/README.md +4 -4
  2. package/dist/ccxt.browser.min.js +15 -15
  3. package/dist/cjs/ccxt.js +6 -6
  4. package/dist/cjs/src/abstract/toobit.js +11 -0
  5. package/dist/cjs/src/abstract/tradeogre.js +1 -1
  6. package/dist/cjs/src/apex.js +2 -2
  7. package/dist/cjs/src/backpack.js +1 -1
  8. package/dist/cjs/src/base/Exchange.js +129 -2
  9. package/dist/cjs/src/bigone.js +4 -4
  10. package/dist/cjs/src/binance.js +82 -20
  11. package/dist/cjs/src/bingx.js +5 -2
  12. package/dist/cjs/src/bitbank.js +1 -0
  13. package/dist/cjs/src/bitbns.js +1 -0
  14. package/dist/cjs/src/bitflyer.js +1 -0
  15. package/dist/cjs/src/bitget.js +16 -9
  16. package/dist/cjs/src/bithumb.js +1 -0
  17. package/dist/cjs/src/bitso.js +1 -0
  18. package/dist/cjs/src/bitvavo.js +26 -40
  19. package/dist/cjs/src/blockchaincom.js +1 -0
  20. package/dist/cjs/src/btcalpha.js +1 -0
  21. package/dist/cjs/src/btcbox.js +1 -0
  22. package/dist/cjs/src/btcmarkets.js +1 -0
  23. package/dist/cjs/src/btcturk.js +1 -0
  24. package/dist/cjs/src/bybit.js +186 -127
  25. package/dist/cjs/src/coinsph.js +4 -1
  26. package/dist/cjs/src/cryptocom.js +6 -3
  27. package/dist/cjs/src/deribit.js +3 -2
  28. package/dist/cjs/src/digifinex.js +1 -1
  29. package/dist/cjs/src/gate.js +9 -13
  30. package/dist/cjs/src/gemini.js +5 -5
  31. package/dist/cjs/src/htx.js +11 -1
  32. package/dist/cjs/src/hyperliquid.js +3 -0
  33. package/dist/cjs/src/independentreserve.js +1 -0
  34. package/dist/cjs/src/indodax.js +17 -6
  35. package/dist/cjs/src/kraken.js +31 -8
  36. package/dist/cjs/src/krakenfutures.js +1 -0
  37. package/dist/cjs/src/kucoin.js +1 -2
  38. package/dist/cjs/src/luno.js +4 -1
  39. package/dist/cjs/src/mercado.js +1 -0
  40. package/dist/cjs/src/mexc.js +84 -37
  41. package/dist/cjs/src/novadax.js +1 -0
  42. package/dist/cjs/src/oceanex.js +1 -0
  43. package/dist/cjs/src/okcoin.js +4 -1
  44. package/dist/cjs/src/okx.js +52 -8
  45. package/dist/cjs/src/phemex.js +1 -1
  46. package/dist/cjs/src/pro/apex.js +8 -4
  47. package/dist/cjs/src/pro/backpack.js +7 -5
  48. package/dist/cjs/src/pro/binance.js +150 -19
  49. package/dist/cjs/src/pro/bingx.js +206 -220
  50. package/dist/cjs/src/pro/bitget.js +332 -76
  51. package/dist/cjs/src/pro/cex.js +1 -0
  52. package/dist/cjs/src/pro/htx.js +1 -1
  53. package/dist/cjs/src/pro/independentreserve.js +1 -0
  54. package/dist/cjs/src/pro/mexc.js +23 -23
  55. package/dist/cjs/src/pro/okx.js +46 -10
  56. package/dist/cjs/src/pro/toobit.js +1163 -0
  57. package/dist/cjs/src/pro/tradeogre.js +1 -1
  58. package/dist/cjs/src/toobit.js +2999 -0
  59. package/dist/cjs/src/tradeogre.js +1 -1
  60. package/dist/cjs/src/upbit.js +1 -0
  61. package/dist/cjs/src/wavesexchange.js +1 -0
  62. package/dist/cjs/src/yobit.js +1 -0
  63. package/dist/cjs/src/zaif.js +1 -0
  64. package/dist/cjs/src/zonda.js +1 -0
  65. package/js/ccxt.d.ts +8 -8
  66. package/js/ccxt.js +6 -6
  67. package/js/src/abstract/mexc.d.ts +1 -0
  68. package/js/src/abstract/myokx.d.ts +1 -0
  69. package/js/src/abstract/okx.d.ts +1 -0
  70. package/js/src/abstract/okxus.d.ts +1 -0
  71. package/js/src/abstract/toobit.d.ts +66 -0
  72. package/js/src/apex.js +2 -2
  73. package/js/src/backpack.js +1 -1
  74. package/js/src/base/Exchange.d.ts +9 -0
  75. package/js/src/base/Exchange.js +129 -2
  76. package/js/src/bigone.js +4 -4
  77. package/js/src/binance.d.ts +9 -0
  78. package/js/src/binance.js +82 -20
  79. package/js/src/bingx.js +5 -2
  80. package/js/src/bitbank.js +1 -0
  81. package/js/src/bitbns.js +1 -0
  82. package/js/src/bitflyer.js +1 -0
  83. package/js/src/bitget.js +16 -9
  84. package/js/src/bithumb.js +1 -0
  85. package/js/src/bitso.js +1 -0
  86. package/js/src/bitvavo.d.ts +0 -2
  87. package/js/src/bitvavo.js +27 -41
  88. package/js/src/blockchaincom.js +1 -0
  89. package/js/src/btcalpha.js +1 -0
  90. package/js/src/btcbox.js +1 -0
  91. package/js/src/btcmarkets.js +1 -0
  92. package/js/src/btcturk.js +1 -0
  93. package/js/src/bybit.d.ts +8 -0
  94. package/js/src/bybit.js +186 -127
  95. package/js/src/coinsph.js +4 -1
  96. package/js/src/cryptocom.js +6 -3
  97. package/js/src/deribit.js +3 -2
  98. package/js/src/digifinex.js +1 -1
  99. package/js/src/gate.d.ts +2 -2
  100. package/js/src/gate.js +9 -13
  101. package/js/src/gemini.js +5 -5
  102. package/js/src/htx.js +11 -1
  103. package/js/src/hyperliquid.js +3 -0
  104. package/js/src/independentreserve.js +1 -0
  105. package/js/src/indodax.js +17 -6
  106. package/js/src/kraken.d.ts +2 -2
  107. package/js/src/kraken.js +31 -8
  108. package/js/src/krakenfutures.js +1 -0
  109. package/js/src/kucoin.js +1 -2
  110. package/js/src/luno.js +4 -1
  111. package/js/src/mercado.js +1 -0
  112. package/js/src/mexc.d.ts +4 -1
  113. package/js/src/mexc.js +84 -37
  114. package/js/src/novadax.js +1 -0
  115. package/js/src/oceanex.js +1 -0
  116. package/js/src/okcoin.js +4 -1
  117. package/js/src/okx.js +52 -8
  118. package/js/src/phemex.js +1 -1
  119. package/js/src/pro/apex.js +8 -4
  120. package/js/src/pro/backpack.d.ts +1 -1
  121. package/js/src/pro/backpack.js +7 -5
  122. package/js/src/pro/binance.d.ts +24 -0
  123. package/js/src/pro/binance.js +150 -19
  124. package/js/src/pro/bingx.d.ts +53 -33
  125. package/js/src/pro/bingx.js +207 -221
  126. package/js/src/pro/bitget.d.ts +6 -0
  127. package/js/src/pro/bitget.js +332 -76
  128. package/js/src/pro/cex.js +1 -0
  129. package/js/src/pro/htx.js +1 -1
  130. package/js/src/pro/independentreserve.js +1 -0
  131. package/js/src/pro/mexc.js +23 -23
  132. package/js/src/pro/okx.d.ts +7 -1
  133. package/js/src/pro/okx.js +46 -10
  134. package/js/src/pro/toobit.d.ts +174 -0
  135. package/js/src/pro/toobit.js +1162 -0
  136. package/js/src/toobit.d.ts +456 -0
  137. package/js/src/toobit.js +2992 -0
  138. package/js/src/upbit.js +1 -0
  139. package/js/src/wavesexchange.js +1 -0
  140. package/js/src/yobit.js +1 -0
  141. package/js/src/zaif.js +1 -0
  142. package/js/src/zonda.js +1 -0
  143. package/package.json +1 -1
  144. package/dist/373.ccxt.browser.js +0 -7630
  145. package/dist/373.ccxt.browser.min.js +0 -1
  146. package/js/src/abstract/tradeogre.d.ts +0 -21
  147. package/js/src/pro/tradeogre.d.ts +0 -49
  148. package/js/src/pro/tradeogre.js +0 -278
  149. package/js/src/tradeogre.d.ts +0 -149
  150. package/js/src/tradeogre.js +0 -872
  151. /package/js/src/abstract/{tradeogre.js → toobit.js} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkccxt=self.webpackChunkccxt||[]).push([[373],{2373:(e,t,r)=>{var i=r(Object(function(){var e=new Error("Cannot find module 'protobufjs/minimal'");throw e.code="MODULE_NOT_FOUND",e}())),n=i.Reader,o=i.Writer,l=i.util,a=i.roots.default||(i.roots.default={});a.PrivateAccountV3Api=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.vcoinName="",e.prototype.coinId="",e.prototype.balanceAmount="",e.prototype.balanceAmountChange="",e.prototype.frozenAmount="",e.prototype.frozenAmountChange="",e.prototype.type="",e.prototype.time=l.Long?l.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=o.create()),null!=e.vcoinName&&Object.hasOwnProperty.call(e,"vcoinName")&&t.uint32(10).string(e.vcoinName),null!=e.coinId&&Object.hasOwnProperty.call(e,"coinId")&&t.uint32(18).string(e.coinId),null!=e.balanceAmount&&Object.hasOwnProperty.call(e,"balanceAmount")&&t.uint32(26).string(e.balanceAmount),null!=e.balanceAmountChange&&Object.hasOwnProperty.call(e,"balanceAmountChange")&&t.uint32(34).string(e.balanceAmountChange),null!=e.frozenAmount&&Object.hasOwnProperty.call(e,"frozenAmount")&&t.uint32(42).string(e.frozenAmount),null!=e.frozenAmountChange&&Object.hasOwnProperty.call(e,"frozenAmountChange")&&t.uint32(50).string(e.frozenAmountChange),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(58).string(e.type),null!=e.time&&Object.hasOwnProperty.call(e,"time")&&t.uint32(64).int64(e.time),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t,r){e instanceof n||(e=n.create(e));for(var i=void 0===t?e.len:e.pos+t,o=new a.PrivateAccountV3Api;e.pos<i;){var l=e.uint32();if(l===r)break;switch(l>>>3){case 1:o.vcoinName=e.string();break;case 2:o.coinId=e.string();break;case 3:o.balanceAmount=e.string();break;case 4:o.balanceAmountChange=e.string();break;case 5:o.frozenAmount=e.string();break;case 6:o.frozenAmountChange=e.string();break;case 7:o.type=e.string();break;case 8:o.time=e.int64();break;default:e.skipType(7&l)}}return o},e.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.vcoinName&&e.hasOwnProperty("vcoinName")&&!l.isString(e.vcoinName)?"vcoinName: string expected":null!=e.coinId&&e.hasOwnProperty("coinId")&&!l.isString(e.coinId)?"coinId: string expected":null!=e.balanceAmount&&e.hasOwnProperty("balanceAmount")&&!l.isString(e.balanceAmount)?"balanceAmount: string expected":null!=e.balanceAmountChange&&e.hasOwnProperty("balanceAmountChange")&&!l.isString(e.balanceAmountChange)?"balanceAmountChange: string expected":null!=e.frozenAmount&&e.hasOwnProperty("frozenAmount")&&!l.isString(e.frozenAmount)?"frozenAmount: string expected":null!=e.frozenAmountChange&&e.hasOwnProperty("frozenAmountChange")&&!l.isString(e.frozenAmountChange)?"frozenAmountChange: string expected":null!=e.type&&e.hasOwnProperty("type")&&!l.isString(e.type)?"type: string expected":null!=e.time&&e.hasOwnProperty("time")&&!(l.isInteger(e.time)||e.time&&l.isInteger(e.time.low)&&l.isInteger(e.time.high))?"time: integer|Long expected":null},e.fromObject=function(e){if(e instanceof a.PrivateAccountV3Api)return e;var t=new a.PrivateAccountV3Api;return null!=e.vcoinName&&(t.vcoinName=String(e.vcoinName)),null!=e.coinId&&(t.coinId=String(e.coinId)),null!=e.balanceAmount&&(t.balanceAmount=String(e.balanceAmount)),null!=e.balanceAmountChange&&(t.balanceAmountChange=String(e.balanceAmountChange)),null!=e.frozenAmount&&(t.frozenAmount=String(e.frozenAmount)),null!=e.frozenAmountChange&&(t.frozenAmountChange=String(e.frozenAmountChange)),null!=e.type&&(t.type=String(e.type)),null!=e.time&&(l.Long?(t.time=l.Long.fromValue(e.time)).unsigned=!1:"string"==typeof e.time?t.time=parseInt(e.time,10):"number"==typeof e.time?t.time=e.time:"object"==typeof e.time&&(t.time=new l.LongBits(e.time.low>>>0,e.time.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var r={};if(t.defaults)if(r.vcoinName="",r.coinId="",r.balanceAmount="",r.balanceAmountChange="",r.frozenAmount="",r.frozenAmountChange="",r.type="",l.Long){var i=new l.Long(0,0,!1);r.time=t.longs===String?i.toString():t.longs===Number?i.toNumber():i}else r.time=t.longs===String?"0":0;return null!=e.vcoinName&&e.hasOwnProperty("vcoinName")&&(r.vcoinName=e.vcoinName),null!=e.coinId&&e.hasOwnProperty("coinId")&&(r.coinId=e.coinId),null!=e.balanceAmount&&e.hasOwnProperty("balanceAmount")&&(r.balanceAmount=e.balanceAmount),null!=e.balanceAmountChange&&e.hasOwnProperty("balanceAmountChange")&&(r.balanceAmountChange=e.balanceAmountChange),null!=e.frozenAmount&&e.hasOwnProperty("frozenAmount")&&(r.frozenAmount=e.frozenAmount),null!=e.frozenAmountChange&&e.hasOwnProperty("frozenAmountChange")&&(r.frozenAmountChange=e.frozenAmountChange),null!=e.type&&e.hasOwnProperty("type")&&(r.type=e.type),null!=e.time&&e.hasOwnProperty("time")&&("number"==typeof e.time?r.time=t.longs===String?String(e.time):e.time:r.time=t.longs===String?l.Long.prototype.toString.call(e.time):t.longs===Number?new l.LongBits(e.time.low>>>0,e.time.high>>>0).toNumber():e.time),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,i.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/PrivateAccountV3Api"},e}(),a.PrivateDealsV3Api=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.price="",e.prototype.quantity="",e.prototype.amount="",e.prototype.tradeType=0,e.prototype.isMaker=!1,e.prototype.isSelfTrade=!1,e.prototype.tradeId="",e.prototype.clientOrderId="",e.prototype.orderId="",e.prototype.feeAmount="",e.prototype.feeCurrency="",e.prototype.time=l.Long?l.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=o.create()),null!=e.price&&Object.hasOwnProperty.call(e,"price")&&t.uint32(10).string(e.price),null!=e.quantity&&Object.hasOwnProperty.call(e,"quantity")&&t.uint32(18).string(e.quantity),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&t.uint32(26).string(e.amount),null!=e.tradeType&&Object.hasOwnProperty.call(e,"tradeType")&&t.uint32(32).int32(e.tradeType),null!=e.isMaker&&Object.hasOwnProperty.call(e,"isMaker")&&t.uint32(40).bool(e.isMaker),null!=e.isSelfTrade&&Object.hasOwnProperty.call(e,"isSelfTrade")&&t.uint32(48).bool(e.isSelfTrade),null!=e.tradeId&&Object.hasOwnProperty.call(e,"tradeId")&&t.uint32(58).string(e.tradeId),null!=e.clientOrderId&&Object.hasOwnProperty.call(e,"clientOrderId")&&t.uint32(66).string(e.clientOrderId),null!=e.orderId&&Object.hasOwnProperty.call(e,"orderId")&&t.uint32(74).string(e.orderId),null!=e.feeAmount&&Object.hasOwnProperty.call(e,"feeAmount")&&t.uint32(82).string(e.feeAmount),null!=e.feeCurrency&&Object.hasOwnProperty.call(e,"feeCurrency")&&t.uint32(90).string(e.feeCurrency),null!=e.time&&Object.hasOwnProperty.call(e,"time")&&t.uint32(96).int64(e.time),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t,r){e instanceof n||(e=n.create(e));for(var i=void 0===t?e.len:e.pos+t,o=new a.PrivateDealsV3Api;e.pos<i;){var l=e.uint32();if(l===r)break;switch(l>>>3){case 1:o.price=e.string();break;case 2:o.quantity=e.string();break;case 3:o.amount=e.string();break;case 4:o.tradeType=e.int32();break;case 5:o.isMaker=e.bool();break;case 6:o.isSelfTrade=e.bool();break;case 7:o.tradeId=e.string();break;case 8:o.clientOrderId=e.string();break;case 9:o.orderId=e.string();break;case 10:o.feeAmount=e.string();break;case 11:o.feeCurrency=e.string();break;case 12:o.time=e.int64();break;default:e.skipType(7&l)}}return o},e.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.price&&e.hasOwnProperty("price")&&!l.isString(e.price)?"price: string expected":null!=e.quantity&&e.hasOwnProperty("quantity")&&!l.isString(e.quantity)?"quantity: string expected":null!=e.amount&&e.hasOwnProperty("amount")&&!l.isString(e.amount)?"amount: string expected":null!=e.tradeType&&e.hasOwnProperty("tradeType")&&!l.isInteger(e.tradeType)?"tradeType: integer expected":null!=e.isMaker&&e.hasOwnProperty("isMaker")&&"boolean"!=typeof e.isMaker?"isMaker: boolean expected":null!=e.isSelfTrade&&e.hasOwnProperty("isSelfTrade")&&"boolean"!=typeof e.isSelfTrade?"isSelfTrade: boolean expected":null!=e.tradeId&&e.hasOwnProperty("tradeId")&&!l.isString(e.tradeId)?"tradeId: string expected":null!=e.clientOrderId&&e.hasOwnProperty("clientOrderId")&&!l.isString(e.clientOrderId)?"clientOrderId: string expected":null!=e.orderId&&e.hasOwnProperty("orderId")&&!l.isString(e.orderId)?"orderId: string expected":null!=e.feeAmount&&e.hasOwnProperty("feeAmount")&&!l.isString(e.feeAmount)?"feeAmount: string expected":null!=e.feeCurrency&&e.hasOwnProperty("feeCurrency")&&!l.isString(e.feeCurrency)?"feeCurrency: string expected":null!=e.time&&e.hasOwnProperty("time")&&!(l.isInteger(e.time)||e.time&&l.isInteger(e.time.low)&&l.isInteger(e.time.high))?"time: integer|Long expected":null},e.fromObject=function(e){if(e instanceof a.PrivateDealsV3Api)return e;var t=new a.PrivateDealsV3Api;return null!=e.price&&(t.price=String(e.price)),null!=e.quantity&&(t.quantity=String(e.quantity)),null!=e.amount&&(t.amount=String(e.amount)),null!=e.tradeType&&(t.tradeType=0|e.tradeType),null!=e.isMaker&&(t.isMaker=Boolean(e.isMaker)),null!=e.isSelfTrade&&(t.isSelfTrade=Boolean(e.isSelfTrade)),null!=e.tradeId&&(t.tradeId=String(e.tradeId)),null!=e.clientOrderId&&(t.clientOrderId=String(e.clientOrderId)),null!=e.orderId&&(t.orderId=String(e.orderId)),null!=e.feeAmount&&(t.feeAmount=String(e.feeAmount)),null!=e.feeCurrency&&(t.feeCurrency=String(e.feeCurrency)),null!=e.time&&(l.Long?(t.time=l.Long.fromValue(e.time)).unsigned=!1:"string"==typeof e.time?t.time=parseInt(e.time,10):"number"==typeof e.time?t.time=e.time:"object"==typeof e.time&&(t.time=new l.LongBits(e.time.low>>>0,e.time.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var r={};if(t.defaults)if(r.price="",r.quantity="",r.amount="",r.tradeType=0,r.isMaker=!1,r.isSelfTrade=!1,r.tradeId="",r.clientOrderId="",r.orderId="",r.feeAmount="",r.feeCurrency="",l.Long){var i=new l.Long(0,0,!1);r.time=t.longs===String?i.toString():t.longs===Number?i.toNumber():i}else r.time=t.longs===String?"0":0;return null!=e.price&&e.hasOwnProperty("price")&&(r.price=e.price),null!=e.quantity&&e.hasOwnProperty("quantity")&&(r.quantity=e.quantity),null!=e.amount&&e.hasOwnProperty("amount")&&(r.amount=e.amount),null!=e.tradeType&&e.hasOwnProperty("tradeType")&&(r.tradeType=e.tradeType),null!=e.isMaker&&e.hasOwnProperty("isMaker")&&(r.isMaker=e.isMaker),null!=e.isSelfTrade&&e.hasOwnProperty("isSelfTrade")&&(r.isSelfTrade=e.isSelfTrade),null!=e.tradeId&&e.hasOwnProperty("tradeId")&&(r.tradeId=e.tradeId),null!=e.clientOrderId&&e.hasOwnProperty("clientOrderId")&&(r.clientOrderId=e.clientOrderId),null!=e.orderId&&e.hasOwnProperty("orderId")&&(r.orderId=e.orderId),null!=e.feeAmount&&e.hasOwnProperty("feeAmount")&&(r.feeAmount=e.feeAmount),null!=e.feeCurrency&&e.hasOwnProperty("feeCurrency")&&(r.feeCurrency=e.feeCurrency),null!=e.time&&e.hasOwnProperty("time")&&("number"==typeof e.time?r.time=t.longs===String?String(e.time):e.time:r.time=t.longs===String?l.Long.prototype.toString.call(e.time):t.longs===Number?new l.LongBits(e.time.low>>>0,e.time.high>>>0).toNumber():e.time),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,i.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/PrivateDealsV3Api"},e}(),a.PrivateOrdersV3Api=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var t;return e.prototype.id="",e.prototype.clientId="",e.prototype.price="",e.prototype.quantity="",e.prototype.amount="",e.prototype.avgPrice="",e.prototype.orderType=0,e.prototype.tradeType=0,e.prototype.isMaker=!1,e.prototype.remainAmount="",e.prototype.remainQuantity="",e.prototype.lastDealQuantity=null,e.prototype.cumulativeQuantity="",e.prototype.cumulativeAmount="",e.prototype.status=0,e.prototype.createTime=l.Long?l.Long.fromBits(0,0,!1):0,e.prototype.market=null,e.prototype.triggerType=null,e.prototype.triggerPrice=null,e.prototype.state=null,e.prototype.ocoId=null,e.prototype.routeFactor=null,e.prototype.symbolId=null,e.prototype.marketId=null,e.prototype.marketCurrencyId=null,e.prototype.currencyId=null,Object.defineProperty(e.prototype,"_lastDealQuantity",{get:l.oneOfGetter(t=["lastDealQuantity"]),set:l.oneOfSetter(t)}),Object.defineProperty(e.prototype,"_market",{get:l.oneOfGetter(t=["market"]),set:l.oneOfSetter(t)}),Object.defineProperty(e.prototype,"_triggerType",{get:l.oneOfGetter(t=["triggerType"]),set:l.oneOfSetter(t)}),Object.defineProperty(e.prototype,"_triggerPrice",{get:l.oneOfGetter(t=["triggerPrice"]),set:l.oneOfSetter(t)}),Object.defineProperty(e.prototype,"_state",{get:l.oneOfGetter(t=["state"]),set:l.oneOfSetter(t)}),Object.defineProperty(e.prototype,"_ocoId",{get:l.oneOfGetter(t=["ocoId"]),set:l.oneOfSetter(t)}),Object.defineProperty(e.prototype,"_routeFactor",{get:l.oneOfGetter(t=["routeFactor"]),set:l.oneOfSetter(t)}),Object.defineProperty(e.prototype,"_symbolId",{get:l.oneOfGetter(t=["symbolId"]),set:l.oneOfSetter(t)}),Object.defineProperty(e.prototype,"_marketId",{get:l.oneOfGetter(t=["marketId"]),set:l.oneOfSetter(t)}),Object.defineProperty(e.prototype,"_marketCurrencyId",{get:l.oneOfGetter(t=["marketCurrencyId"]),set:l.oneOfSetter(t)}),Object.defineProperty(e.prototype,"_currencyId",{get:l.oneOfGetter(t=["currencyId"]),set:l.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=o.create()),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),null!=e.clientId&&Object.hasOwnProperty.call(e,"clientId")&&t.uint32(18).string(e.clientId),null!=e.price&&Object.hasOwnProperty.call(e,"price")&&t.uint32(26).string(e.price),null!=e.quantity&&Object.hasOwnProperty.call(e,"quantity")&&t.uint32(34).string(e.quantity),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&t.uint32(42).string(e.amount),null!=e.avgPrice&&Object.hasOwnProperty.call(e,"avgPrice")&&t.uint32(50).string(e.avgPrice),null!=e.orderType&&Object.hasOwnProperty.call(e,"orderType")&&t.uint32(56).int32(e.orderType),null!=e.tradeType&&Object.hasOwnProperty.call(e,"tradeType")&&t.uint32(64).int32(e.tradeType),null!=e.isMaker&&Object.hasOwnProperty.call(e,"isMaker")&&t.uint32(72).bool(e.isMaker),null!=e.remainAmount&&Object.hasOwnProperty.call(e,"remainAmount")&&t.uint32(82).string(e.remainAmount),null!=e.remainQuantity&&Object.hasOwnProperty.call(e,"remainQuantity")&&t.uint32(90).string(e.remainQuantity),null!=e.lastDealQuantity&&Object.hasOwnProperty.call(e,"lastDealQuantity")&&t.uint32(98).string(e.lastDealQuantity),null!=e.cumulativeQuantity&&Object.hasOwnProperty.call(e,"cumulativeQuantity")&&t.uint32(106).string(e.cumulativeQuantity),null!=e.cumulativeAmount&&Object.hasOwnProperty.call(e,"cumulativeAmount")&&t.uint32(114).string(e.cumulativeAmount),null!=e.status&&Object.hasOwnProperty.call(e,"status")&&t.uint32(120).int32(e.status),null!=e.createTime&&Object.hasOwnProperty.call(e,"createTime")&&t.uint32(128).int64(e.createTime),null!=e.market&&Object.hasOwnProperty.call(e,"market")&&t.uint32(138).string(e.market),null!=e.triggerType&&Object.hasOwnProperty.call(e,"triggerType")&&t.uint32(144).int32(e.triggerType),null!=e.triggerPrice&&Object.hasOwnProperty.call(e,"triggerPrice")&&t.uint32(154).string(e.triggerPrice),null!=e.state&&Object.hasOwnProperty.call(e,"state")&&t.uint32(160).int32(e.state),null!=e.ocoId&&Object.hasOwnProperty.call(e,"ocoId")&&t.uint32(170).string(e.ocoId),null!=e.routeFactor&&Object.hasOwnProperty.call(e,"routeFactor")&&t.uint32(178).string(e.routeFactor),null!=e.symbolId&&Object.hasOwnProperty.call(e,"symbolId")&&t.uint32(186).string(e.symbolId),null!=e.marketId&&Object.hasOwnProperty.call(e,"marketId")&&t.uint32(194).string(e.marketId),null!=e.marketCurrencyId&&Object.hasOwnProperty.call(e,"marketCurrencyId")&&t.uint32(202).string(e.marketCurrencyId),null!=e.currencyId&&Object.hasOwnProperty.call(e,"currencyId")&&t.uint32(210).string(e.currencyId),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t,r){e instanceof n||(e=n.create(e));for(var i=void 0===t?e.len:e.pos+t,o=new a.PrivateOrdersV3Api;e.pos<i;){var l=e.uint32();if(l===r)break;switch(l>>>3){case 1:o.id=e.string();break;case 2:o.clientId=e.string();break;case 3:o.price=e.string();break;case 4:o.quantity=e.string();break;case 5:o.amount=e.string();break;case 6:o.avgPrice=e.string();break;case 7:o.orderType=e.int32();break;case 8:o.tradeType=e.int32();break;case 9:o.isMaker=e.bool();break;case 10:o.remainAmount=e.string();break;case 11:o.remainQuantity=e.string();break;case 12:o.lastDealQuantity=e.string();break;case 13:o.cumulativeQuantity=e.string();break;case 14:o.cumulativeAmount=e.string();break;case 15:o.status=e.int32();break;case 16:o.createTime=e.int64();break;case 17:o.market=e.string();break;case 18:o.triggerType=e.int32();break;case 19:o.triggerPrice=e.string();break;case 20:o.state=e.int32();break;case 21:o.ocoId=e.string();break;case 22:o.routeFactor=e.string();break;case 23:o.symbolId=e.string();break;case 24:o.marketId=e.string();break;case 25:o.marketCurrencyId=e.string();break;case 26:o.currencyId=e.string();break;default:e.skipType(7&l)}}return o},e.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};return null!=e.id&&e.hasOwnProperty("id")&&!l.isString(e.id)?"id: string expected":null!=e.clientId&&e.hasOwnProperty("clientId")&&!l.isString(e.clientId)?"clientId: string expected":null!=e.price&&e.hasOwnProperty("price")&&!l.isString(e.price)?"price: string expected":null!=e.quantity&&e.hasOwnProperty("quantity")&&!l.isString(e.quantity)?"quantity: string expected":null!=e.amount&&e.hasOwnProperty("amount")&&!l.isString(e.amount)?"amount: string expected":null!=e.avgPrice&&e.hasOwnProperty("avgPrice")&&!l.isString(e.avgPrice)?"avgPrice: string expected":null!=e.orderType&&e.hasOwnProperty("orderType")&&!l.isInteger(e.orderType)?"orderType: integer expected":null!=e.tradeType&&e.hasOwnProperty("tradeType")&&!l.isInteger(e.tradeType)?"tradeType: integer expected":null!=e.isMaker&&e.hasOwnProperty("isMaker")&&"boolean"!=typeof e.isMaker?"isMaker: boolean expected":null!=e.remainAmount&&e.hasOwnProperty("remainAmount")&&!l.isString(e.remainAmount)?"remainAmount: string expected":null!=e.remainQuantity&&e.hasOwnProperty("remainQuantity")&&!l.isString(e.remainQuantity)?"remainQuantity: string expected":null!=e.lastDealQuantity&&e.hasOwnProperty("lastDealQuantity")&&(t._lastDealQuantity=1,!l.isString(e.lastDealQuantity))?"lastDealQuantity: string expected":null!=e.cumulativeQuantity&&e.hasOwnProperty("cumulativeQuantity")&&!l.isString(e.cumulativeQuantity)?"cumulativeQuantity: string expected":null!=e.cumulativeAmount&&e.hasOwnProperty("cumulativeAmount")&&!l.isString(e.cumulativeAmount)?"cumulativeAmount: string expected":null!=e.status&&e.hasOwnProperty("status")&&!l.isInteger(e.status)?"status: integer expected":null!=e.createTime&&e.hasOwnProperty("createTime")&&!(l.isInteger(e.createTime)||e.createTime&&l.isInteger(e.createTime.low)&&l.isInteger(e.createTime.high))?"createTime: integer|Long expected":null!=e.market&&e.hasOwnProperty("market")&&(t._market=1,!l.isString(e.market))?"market: string expected":null!=e.triggerType&&e.hasOwnProperty("triggerType")&&(t._triggerType=1,!l.isInteger(e.triggerType))?"triggerType: integer expected":null!=e.triggerPrice&&e.hasOwnProperty("triggerPrice")&&(t._triggerPrice=1,!l.isString(e.triggerPrice))?"triggerPrice: string expected":null!=e.state&&e.hasOwnProperty("state")&&(t._state=1,!l.isInteger(e.state))?"state: integer expected":null!=e.ocoId&&e.hasOwnProperty("ocoId")&&(t._ocoId=1,!l.isString(e.ocoId))?"ocoId: string expected":null!=e.routeFactor&&e.hasOwnProperty("routeFactor")&&(t._routeFactor=1,!l.isString(e.routeFactor))?"routeFactor: string expected":null!=e.symbolId&&e.hasOwnProperty("symbolId")&&(t._symbolId=1,!l.isString(e.symbolId))?"symbolId: string expected":null!=e.marketId&&e.hasOwnProperty("marketId")&&(t._marketId=1,!l.isString(e.marketId))?"marketId: string expected":null!=e.marketCurrencyId&&e.hasOwnProperty("marketCurrencyId")&&(t._marketCurrencyId=1,!l.isString(e.marketCurrencyId))?"marketCurrencyId: string expected":null!=e.currencyId&&e.hasOwnProperty("currencyId")&&(t._currencyId=1,!l.isString(e.currencyId))?"currencyId: string expected":null},e.fromObject=function(e){if(e instanceof a.PrivateOrdersV3Api)return e;var t=new a.PrivateOrdersV3Api;return null!=e.id&&(t.id=String(e.id)),null!=e.clientId&&(t.clientId=String(e.clientId)),null!=e.price&&(t.price=String(e.price)),null!=e.quantity&&(t.quantity=String(e.quantity)),null!=e.amount&&(t.amount=String(e.amount)),null!=e.avgPrice&&(t.avgPrice=String(e.avgPrice)),null!=e.orderType&&(t.orderType=0|e.orderType),null!=e.tradeType&&(t.tradeType=0|e.tradeType),null!=e.isMaker&&(t.isMaker=Boolean(e.isMaker)),null!=e.remainAmount&&(t.remainAmount=String(e.remainAmount)),null!=e.remainQuantity&&(t.remainQuantity=String(e.remainQuantity)),null!=e.lastDealQuantity&&(t.lastDealQuantity=String(e.lastDealQuantity)),null!=e.cumulativeQuantity&&(t.cumulativeQuantity=String(e.cumulativeQuantity)),null!=e.cumulativeAmount&&(t.cumulativeAmount=String(e.cumulativeAmount)),null!=e.status&&(t.status=0|e.status),null!=e.createTime&&(l.Long?(t.createTime=l.Long.fromValue(e.createTime)).unsigned=!1:"string"==typeof e.createTime?t.createTime=parseInt(e.createTime,10):"number"==typeof e.createTime?t.createTime=e.createTime:"object"==typeof e.createTime&&(t.createTime=new l.LongBits(e.createTime.low>>>0,e.createTime.high>>>0).toNumber())),null!=e.market&&(t.market=String(e.market)),null!=e.triggerType&&(t.triggerType=0|e.triggerType),null!=e.triggerPrice&&(t.triggerPrice=String(e.triggerPrice)),null!=e.state&&(t.state=0|e.state),null!=e.ocoId&&(t.ocoId=String(e.ocoId)),null!=e.routeFactor&&(t.routeFactor=String(e.routeFactor)),null!=e.symbolId&&(t.symbolId=String(e.symbolId)),null!=e.marketId&&(t.marketId=String(e.marketId)),null!=e.marketCurrencyId&&(t.marketCurrencyId=String(e.marketCurrencyId)),null!=e.currencyId&&(t.currencyId=String(e.currencyId)),t},e.toObject=function(e,t){t||(t={});var r={};if(t.defaults)if(r.id="",r.clientId="",r.price="",r.quantity="",r.amount="",r.avgPrice="",r.orderType=0,r.tradeType=0,r.isMaker=!1,r.remainAmount="",r.remainQuantity="",r.cumulativeQuantity="",r.cumulativeAmount="",r.status=0,l.Long){var i=new l.Long(0,0,!1);r.createTime=t.longs===String?i.toString():t.longs===Number?i.toNumber():i}else r.createTime=t.longs===String?"0":0;return null!=e.id&&e.hasOwnProperty("id")&&(r.id=e.id),null!=e.clientId&&e.hasOwnProperty("clientId")&&(r.clientId=e.clientId),null!=e.price&&e.hasOwnProperty("price")&&(r.price=e.price),null!=e.quantity&&e.hasOwnProperty("quantity")&&(r.quantity=e.quantity),null!=e.amount&&e.hasOwnProperty("amount")&&(r.amount=e.amount),null!=e.avgPrice&&e.hasOwnProperty("avgPrice")&&(r.avgPrice=e.avgPrice),null!=e.orderType&&e.hasOwnProperty("orderType")&&(r.orderType=e.orderType),null!=e.tradeType&&e.hasOwnProperty("tradeType")&&(r.tradeType=e.tradeType),null!=e.isMaker&&e.hasOwnProperty("isMaker")&&(r.isMaker=e.isMaker),null!=e.remainAmount&&e.hasOwnProperty("remainAmount")&&(r.remainAmount=e.remainAmount),null!=e.remainQuantity&&e.hasOwnProperty("remainQuantity")&&(r.remainQuantity=e.remainQuantity),null!=e.lastDealQuantity&&e.hasOwnProperty("lastDealQuantity")&&(r.lastDealQuantity=e.lastDealQuantity,t.oneofs&&(r._lastDealQuantity="lastDealQuantity")),null!=e.cumulativeQuantity&&e.hasOwnProperty("cumulativeQuantity")&&(r.cumulativeQuantity=e.cumulativeQuantity),null!=e.cumulativeAmount&&e.hasOwnProperty("cumulativeAmount")&&(r.cumulativeAmount=e.cumulativeAmount),null!=e.status&&e.hasOwnProperty("status")&&(r.status=e.status),null!=e.createTime&&e.hasOwnProperty("createTime")&&("number"==typeof e.createTime?r.createTime=t.longs===String?String(e.createTime):e.createTime:r.createTime=t.longs===String?l.Long.prototype.toString.call(e.createTime):t.longs===Number?new l.LongBits(e.createTime.low>>>0,e.createTime.high>>>0).toNumber():e.createTime),null!=e.market&&e.hasOwnProperty("market")&&(r.market=e.market,t.oneofs&&(r._market="market")),null!=e.triggerType&&e.hasOwnProperty("triggerType")&&(r.triggerType=e.triggerType,t.oneofs&&(r._triggerType="triggerType")),null!=e.triggerPrice&&e.hasOwnProperty("triggerPrice")&&(r.triggerPrice=e.triggerPrice,t.oneofs&&(r._triggerPrice="triggerPrice")),null!=e.state&&e.hasOwnProperty("state")&&(r.state=e.state,t.oneofs&&(r._state="state")),null!=e.ocoId&&e.hasOwnProperty("ocoId")&&(r.ocoId=e.ocoId,t.oneofs&&(r._ocoId="ocoId")),null!=e.routeFactor&&e.hasOwnProperty("routeFactor")&&(r.routeFactor=e.routeFactor,t.oneofs&&(r._routeFactor="routeFactor")),null!=e.symbolId&&e.hasOwnProperty("symbolId")&&(r.symbolId=e.symbolId,t.oneofs&&(r._symbolId="symbolId")),null!=e.marketId&&e.hasOwnProperty("marketId")&&(r.marketId=e.marketId,t.oneofs&&(r._marketId="marketId")),null!=e.marketCurrencyId&&e.hasOwnProperty("marketCurrencyId")&&(r.marketCurrencyId=e.marketCurrencyId,t.oneofs&&(r._marketCurrencyId="marketCurrencyId")),null!=e.currencyId&&e.hasOwnProperty("currencyId")&&(r.currencyId=e.currencyId,t.oneofs&&(r._currencyId="currencyId")),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,i.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/PrivateOrdersV3Api"},e}(),a.PublicAggreBookTickerV3Api=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.bidPrice="",e.prototype.bidQuantity="",e.prototype.askPrice="",e.prototype.askQuantity="",e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=o.create()),null!=e.bidPrice&&Object.hasOwnProperty.call(e,"bidPrice")&&t.uint32(10).string(e.bidPrice),null!=e.bidQuantity&&Object.hasOwnProperty.call(e,"bidQuantity")&&t.uint32(18).string(e.bidQuantity),null!=e.askPrice&&Object.hasOwnProperty.call(e,"askPrice")&&t.uint32(26).string(e.askPrice),null!=e.askQuantity&&Object.hasOwnProperty.call(e,"askQuantity")&&t.uint32(34).string(e.askQuantity),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t,r){e instanceof n||(e=n.create(e));for(var i=void 0===t?e.len:e.pos+t,o=new a.PublicAggreBookTickerV3Api;e.pos<i;){var l=e.uint32();if(l===r)break;switch(l>>>3){case 1:o.bidPrice=e.string();break;case 2:o.bidQuantity=e.string();break;case 3:o.askPrice=e.string();break;case 4:o.askQuantity=e.string();break;default:e.skipType(7&l)}}return o},e.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.bidPrice&&e.hasOwnProperty("bidPrice")&&!l.isString(e.bidPrice)?"bidPrice: string expected":null!=e.bidQuantity&&e.hasOwnProperty("bidQuantity")&&!l.isString(e.bidQuantity)?"bidQuantity: string expected":null!=e.askPrice&&e.hasOwnProperty("askPrice")&&!l.isString(e.askPrice)?"askPrice: string expected":null!=e.askQuantity&&e.hasOwnProperty("askQuantity")&&!l.isString(e.askQuantity)?"askQuantity: string expected":null},e.fromObject=function(e){if(e instanceof a.PublicAggreBookTickerV3Api)return e;var t=new a.PublicAggreBookTickerV3Api;return null!=e.bidPrice&&(t.bidPrice=String(e.bidPrice)),null!=e.bidQuantity&&(t.bidQuantity=String(e.bidQuantity)),null!=e.askPrice&&(t.askPrice=String(e.askPrice)),null!=e.askQuantity&&(t.askQuantity=String(e.askQuantity)),t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.bidPrice="",r.bidQuantity="",r.askPrice="",r.askQuantity=""),null!=e.bidPrice&&e.hasOwnProperty("bidPrice")&&(r.bidPrice=e.bidPrice),null!=e.bidQuantity&&e.hasOwnProperty("bidQuantity")&&(r.bidQuantity=e.bidQuantity),null!=e.askPrice&&e.hasOwnProperty("askPrice")&&(r.askPrice=e.askPrice),null!=e.askQuantity&&e.hasOwnProperty("askQuantity")&&(r.askQuantity=e.askQuantity),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,i.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/PublicAggreBookTickerV3Api"},e}(),a.PublicAggreDealsV3Api=function(){function e(e){if(this.deals=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.deals=l.emptyArray,e.prototype.eventType="",e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=o.create()),null!=e.deals&&e.deals.length)for(var r=0;r<e.deals.length;++r)a.PublicAggreDealsV3ApiItem.encode(e.deals[r],t.uint32(10).fork()).ldelim();return null!=e.eventType&&Object.hasOwnProperty.call(e,"eventType")&&t.uint32(18).string(e.eventType),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t,r){e instanceof n||(e=n.create(e));for(var i=void 0===t?e.len:e.pos+t,o=new a.PublicAggreDealsV3Api;e.pos<i;){var l=e.uint32();if(l===r)break;switch(l>>>3){case 1:o.deals&&o.deals.length||(o.deals=[]),o.deals.push(a.PublicAggreDealsV3ApiItem.decode(e,e.uint32()));break;case 2:o.eventType=e.string();break;default:e.skipType(7&l)}}return o},e.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.deals&&e.hasOwnProperty("deals")){if(!Array.isArray(e.deals))return"deals: array expected";for(var t=0;t<e.deals.length;++t){var r=a.PublicAggreDealsV3ApiItem.verify(e.deals[t]);if(r)return"deals."+r}}return null!=e.eventType&&e.hasOwnProperty("eventType")&&!l.isString(e.eventType)?"eventType: string expected":null},e.fromObject=function(e){if(e instanceof a.PublicAggreDealsV3Api)return e;var t=new a.PublicAggreDealsV3Api;if(e.deals){if(!Array.isArray(e.deals))throw TypeError(".PublicAggreDealsV3Api.deals: array expected");t.deals=[];for(var r=0;r<e.deals.length;++r){if("object"!=typeof e.deals[r])throw TypeError(".PublicAggreDealsV3Api.deals: object expected");t.deals[r]=a.PublicAggreDealsV3ApiItem.fromObject(e.deals[r])}}return null!=e.eventType&&(t.eventType=String(e.eventType)),t},e.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.deals=[]),t.defaults&&(r.eventType=""),e.deals&&e.deals.length){r.deals=[];for(var i=0;i<e.deals.length;++i)r.deals[i]=a.PublicAggreDealsV3ApiItem.toObject(e.deals[i],t)}return null!=e.eventType&&e.hasOwnProperty("eventType")&&(r.eventType=e.eventType),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,i.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/PublicAggreDealsV3Api"},e}(),a.PublicAggreDealsV3ApiItem=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.price="",e.prototype.quantity="",e.prototype.tradeType=0,e.prototype.time=l.Long?l.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=o.create()),null!=e.price&&Object.hasOwnProperty.call(e,"price")&&t.uint32(10).string(e.price),null!=e.quantity&&Object.hasOwnProperty.call(e,"quantity")&&t.uint32(18).string(e.quantity),null!=e.tradeType&&Object.hasOwnProperty.call(e,"tradeType")&&t.uint32(24).int32(e.tradeType),null!=e.time&&Object.hasOwnProperty.call(e,"time")&&t.uint32(32).int64(e.time),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t,r){e instanceof n||(e=n.create(e));for(var i=void 0===t?e.len:e.pos+t,o=new a.PublicAggreDealsV3ApiItem;e.pos<i;){var l=e.uint32();if(l===r)break;switch(l>>>3){case 1:o.price=e.string();break;case 2:o.quantity=e.string();break;case 3:o.tradeType=e.int32();break;case 4:o.time=e.int64();break;default:e.skipType(7&l)}}return o},e.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.price&&e.hasOwnProperty("price")&&!l.isString(e.price)?"price: string expected":null!=e.quantity&&e.hasOwnProperty("quantity")&&!l.isString(e.quantity)?"quantity: string expected":null!=e.tradeType&&e.hasOwnProperty("tradeType")&&!l.isInteger(e.tradeType)?"tradeType: integer expected":null!=e.time&&e.hasOwnProperty("time")&&!(l.isInteger(e.time)||e.time&&l.isInteger(e.time.low)&&l.isInteger(e.time.high))?"time: integer|Long expected":null},e.fromObject=function(e){if(e instanceof a.PublicAggreDealsV3ApiItem)return e;var t=new a.PublicAggreDealsV3ApiItem;return null!=e.price&&(t.price=String(e.price)),null!=e.quantity&&(t.quantity=String(e.quantity)),null!=e.tradeType&&(t.tradeType=0|e.tradeType),null!=e.time&&(l.Long?(t.time=l.Long.fromValue(e.time)).unsigned=!1:"string"==typeof e.time?t.time=parseInt(e.time,10):"number"==typeof e.time?t.time=e.time:"object"==typeof e.time&&(t.time=new l.LongBits(e.time.low>>>0,e.time.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var r={};if(t.defaults)if(r.price="",r.quantity="",r.tradeType=0,l.Long){var i=new l.Long(0,0,!1);r.time=t.longs===String?i.toString():t.longs===Number?i.toNumber():i}else r.time=t.longs===String?"0":0;return null!=e.price&&e.hasOwnProperty("price")&&(r.price=e.price),null!=e.quantity&&e.hasOwnProperty("quantity")&&(r.quantity=e.quantity),null!=e.tradeType&&e.hasOwnProperty("tradeType")&&(r.tradeType=e.tradeType),null!=e.time&&e.hasOwnProperty("time")&&("number"==typeof e.time?r.time=t.longs===String?String(e.time):e.time:r.time=t.longs===String?l.Long.prototype.toString.call(e.time):t.longs===Number?new l.LongBits(e.time.low>>>0,e.time.high>>>0).toNumber():e.time),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,i.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/PublicAggreDealsV3ApiItem"},e}(),a.PublicAggreDepthsV3Api=function(){function e(e){if(this.asks=[],this.bids=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.asks=l.emptyArray,e.prototype.bids=l.emptyArray,e.prototype.eventType="",e.prototype.fromVersion="",e.prototype.toVersion="",e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=o.create()),null!=e.asks&&e.asks.length)for(var r=0;r<e.asks.length;++r)a.PublicAggreDepthV3ApiItem.encode(e.asks[r],t.uint32(10).fork()).ldelim();if(null!=e.bids&&e.bids.length)for(r=0;r<e.bids.length;++r)a.PublicAggreDepthV3ApiItem.encode(e.bids[r],t.uint32(18).fork()).ldelim();return null!=e.eventType&&Object.hasOwnProperty.call(e,"eventType")&&t.uint32(26).string(e.eventType),null!=e.fromVersion&&Object.hasOwnProperty.call(e,"fromVersion")&&t.uint32(34).string(e.fromVersion),null!=e.toVersion&&Object.hasOwnProperty.call(e,"toVersion")&&t.uint32(42).string(e.toVersion),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t,r){e instanceof n||(e=n.create(e));for(var i=void 0===t?e.len:e.pos+t,o=new a.PublicAggreDepthsV3Api;e.pos<i;){var l=e.uint32();if(l===r)break;switch(l>>>3){case 1:o.asks&&o.asks.length||(o.asks=[]),o.asks.push(a.PublicAggreDepthV3ApiItem.decode(e,e.uint32()));break;case 2:o.bids&&o.bids.length||(o.bids=[]),o.bids.push(a.PublicAggreDepthV3ApiItem.decode(e,e.uint32()));break;case 3:o.eventType=e.string();break;case 4:o.fromVersion=e.string();break;case 5:o.toVersion=e.string();break;default:e.skipType(7&l)}}return o},e.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.asks&&e.hasOwnProperty("asks")){if(!Array.isArray(e.asks))return"asks: array expected";for(var t=0;t<e.asks.length;++t){if(r=a.PublicAggreDepthV3ApiItem.verify(e.asks[t]))return"asks."+r}}if(null!=e.bids&&e.hasOwnProperty("bids")){if(!Array.isArray(e.bids))return"bids: array expected";for(t=0;t<e.bids.length;++t){var r;if(r=a.PublicAggreDepthV3ApiItem.verify(e.bids[t]))return"bids."+r}}return null!=e.eventType&&e.hasOwnProperty("eventType")&&!l.isString(e.eventType)?"eventType: string expected":null!=e.fromVersion&&e.hasOwnProperty("fromVersion")&&!l.isString(e.fromVersion)?"fromVersion: string expected":null!=e.toVersion&&e.hasOwnProperty("toVersion")&&!l.isString(e.toVersion)?"toVersion: string expected":null},e.fromObject=function(e){if(e instanceof a.PublicAggreDepthsV3Api)return e;var t=new a.PublicAggreDepthsV3Api;if(e.asks){if(!Array.isArray(e.asks))throw TypeError(".PublicAggreDepthsV3Api.asks: array expected");t.asks=[];for(var r=0;r<e.asks.length;++r){if("object"!=typeof e.asks[r])throw TypeError(".PublicAggreDepthsV3Api.asks: object expected");t.asks[r]=a.PublicAggreDepthV3ApiItem.fromObject(e.asks[r])}}if(e.bids){if(!Array.isArray(e.bids))throw TypeError(".PublicAggreDepthsV3Api.bids: array expected");t.bids=[];for(r=0;r<e.bids.length;++r){if("object"!=typeof e.bids[r])throw TypeError(".PublicAggreDepthsV3Api.bids: object expected");t.bids[r]=a.PublicAggreDepthV3ApiItem.fromObject(e.bids[r])}}return null!=e.eventType&&(t.eventType=String(e.eventType)),null!=e.fromVersion&&(t.fromVersion=String(e.fromVersion)),null!=e.toVersion&&(t.toVersion=String(e.toVersion)),t},e.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.asks=[],r.bids=[]),t.defaults&&(r.eventType="",r.fromVersion="",r.toVersion=""),e.asks&&e.asks.length){r.asks=[];for(var i=0;i<e.asks.length;++i)r.asks[i]=a.PublicAggreDepthV3ApiItem.toObject(e.asks[i],t)}if(e.bids&&e.bids.length){r.bids=[];for(i=0;i<e.bids.length;++i)r.bids[i]=a.PublicAggreDepthV3ApiItem.toObject(e.bids[i],t)}return null!=e.eventType&&e.hasOwnProperty("eventType")&&(r.eventType=e.eventType),null!=e.fromVersion&&e.hasOwnProperty("fromVersion")&&(r.fromVersion=e.fromVersion),null!=e.toVersion&&e.hasOwnProperty("toVersion")&&(r.toVersion=e.toVersion),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,i.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/PublicAggreDepthsV3Api"},e}(),a.PublicAggreDepthV3ApiItem=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.price="",e.prototype.quantity="",e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=o.create()),null!=e.price&&Object.hasOwnProperty.call(e,"price")&&t.uint32(10).string(e.price),null!=e.quantity&&Object.hasOwnProperty.call(e,"quantity")&&t.uint32(18).string(e.quantity),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t,r){e instanceof n||(e=n.create(e));for(var i=void 0===t?e.len:e.pos+t,o=new a.PublicAggreDepthV3ApiItem;e.pos<i;){var l=e.uint32();if(l===r)break;switch(l>>>3){case 1:o.price=e.string();break;case 2:o.quantity=e.string();break;default:e.skipType(7&l)}}return o},e.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.price&&e.hasOwnProperty("price")&&!l.isString(e.price)?"price: string expected":null!=e.quantity&&e.hasOwnProperty("quantity")&&!l.isString(e.quantity)?"quantity: string expected":null},e.fromObject=function(e){if(e instanceof a.PublicAggreDepthV3ApiItem)return e;var t=new a.PublicAggreDepthV3ApiItem;return null!=e.price&&(t.price=String(e.price)),null!=e.quantity&&(t.quantity=String(e.quantity)),t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.price="",r.quantity=""),null!=e.price&&e.hasOwnProperty("price")&&(r.price=e.price),null!=e.quantity&&e.hasOwnProperty("quantity")&&(r.quantity=e.quantity),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,i.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/PublicAggreDepthV3ApiItem"},e}(),a.PublicBookTickerBatchV3Api=function(){function e(e){if(this.items=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.items=l.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=o.create()),null!=e.items&&e.items.length)for(var r=0;r<e.items.length;++r)a.PublicBookTickerV3Api.encode(e.items[r],t.uint32(10).fork()).ldelim();return t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t,r){e instanceof n||(e=n.create(e));for(var i=void 0===t?e.len:e.pos+t,o=new a.PublicBookTickerBatchV3Api;e.pos<i;){var l=e.uint32();if(l===r)break;if(l>>>3==1)o.items&&o.items.length||(o.items=[]),o.items.push(a.PublicBookTickerV3Api.decode(e,e.uint32()));else e.skipType(7&l)}return o},e.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.items&&e.hasOwnProperty("items")){if(!Array.isArray(e.items))return"items: array expected";for(var t=0;t<e.items.length;++t){var r=a.PublicBookTickerV3Api.verify(e.items[t]);if(r)return"items."+r}}return null},e.fromObject=function(e){if(e instanceof a.PublicBookTickerBatchV3Api)return e;var t=new a.PublicBookTickerBatchV3Api;if(e.items){if(!Array.isArray(e.items))throw TypeError(".PublicBookTickerBatchV3Api.items: array expected");t.items=[];for(var r=0;r<e.items.length;++r){if("object"!=typeof e.items[r])throw TypeError(".PublicBookTickerBatchV3Api.items: object expected");t.items[r]=a.PublicBookTickerV3Api.fromObject(e.items[r])}}return t},e.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.items=[]),e.items&&e.items.length){r.items=[];for(var i=0;i<e.items.length;++i)r.items[i]=a.PublicBookTickerV3Api.toObject(e.items[i],t)}return r},e.prototype.toJSON=function(){return this.constructor.toObject(this,i.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/PublicBookTickerBatchV3Api"},e}(),a.PublicBookTickerV3Api=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.bidPrice="",e.prototype.bidQuantity="",e.prototype.askPrice="",e.prototype.askQuantity="",e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=o.create()),null!=e.bidPrice&&Object.hasOwnProperty.call(e,"bidPrice")&&t.uint32(10).string(e.bidPrice),null!=e.bidQuantity&&Object.hasOwnProperty.call(e,"bidQuantity")&&t.uint32(18).string(e.bidQuantity),null!=e.askPrice&&Object.hasOwnProperty.call(e,"askPrice")&&t.uint32(26).string(e.askPrice),null!=e.askQuantity&&Object.hasOwnProperty.call(e,"askQuantity")&&t.uint32(34).string(e.askQuantity),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t,r){e instanceof n||(e=n.create(e));for(var i=void 0===t?e.len:e.pos+t,o=new a.PublicBookTickerV3Api;e.pos<i;){var l=e.uint32();if(l===r)break;switch(l>>>3){case 1:o.bidPrice=e.string();break;case 2:o.bidQuantity=e.string();break;case 3:o.askPrice=e.string();break;case 4:o.askQuantity=e.string();break;default:e.skipType(7&l)}}return o},e.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.bidPrice&&e.hasOwnProperty("bidPrice")&&!l.isString(e.bidPrice)?"bidPrice: string expected":null!=e.bidQuantity&&e.hasOwnProperty("bidQuantity")&&!l.isString(e.bidQuantity)?"bidQuantity: string expected":null!=e.askPrice&&e.hasOwnProperty("askPrice")&&!l.isString(e.askPrice)?"askPrice: string expected":null!=e.askQuantity&&e.hasOwnProperty("askQuantity")&&!l.isString(e.askQuantity)?"askQuantity: string expected":null},e.fromObject=function(e){if(e instanceof a.PublicBookTickerV3Api)return e;var t=new a.PublicBookTickerV3Api;return null!=e.bidPrice&&(t.bidPrice=String(e.bidPrice)),null!=e.bidQuantity&&(t.bidQuantity=String(e.bidQuantity)),null!=e.askPrice&&(t.askPrice=String(e.askPrice)),null!=e.askQuantity&&(t.askQuantity=String(e.askQuantity)),t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.bidPrice="",r.bidQuantity="",r.askPrice="",r.askQuantity=""),null!=e.bidPrice&&e.hasOwnProperty("bidPrice")&&(r.bidPrice=e.bidPrice),null!=e.bidQuantity&&e.hasOwnProperty("bidQuantity")&&(r.bidQuantity=e.bidQuantity),null!=e.askPrice&&e.hasOwnProperty("askPrice")&&(r.askPrice=e.askPrice),null!=e.askQuantity&&e.hasOwnProperty("askQuantity")&&(r.askQuantity=e.askQuantity),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,i.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/PublicBookTickerV3Api"},e}(),a.PublicDealsV3Api=function(){function e(e){if(this.deals=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.deals=l.emptyArray,e.prototype.eventType="",e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=o.create()),null!=e.deals&&e.deals.length)for(var r=0;r<e.deals.length;++r)a.PublicDealsV3ApiItem.encode(e.deals[r],t.uint32(10).fork()).ldelim();return null!=e.eventType&&Object.hasOwnProperty.call(e,"eventType")&&t.uint32(18).string(e.eventType),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t,r){e instanceof n||(e=n.create(e));for(var i=void 0===t?e.len:e.pos+t,o=new a.PublicDealsV3Api;e.pos<i;){var l=e.uint32();if(l===r)break;switch(l>>>3){case 1:o.deals&&o.deals.length||(o.deals=[]),o.deals.push(a.PublicDealsV3ApiItem.decode(e,e.uint32()));break;case 2:o.eventType=e.string();break;default:e.skipType(7&l)}}return o},e.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.deals&&e.hasOwnProperty("deals")){if(!Array.isArray(e.deals))return"deals: array expected";for(var t=0;t<e.deals.length;++t){var r=a.PublicDealsV3ApiItem.verify(e.deals[t]);if(r)return"deals."+r}}return null!=e.eventType&&e.hasOwnProperty("eventType")&&!l.isString(e.eventType)?"eventType: string expected":null},e.fromObject=function(e){if(e instanceof a.PublicDealsV3Api)return e;var t=new a.PublicDealsV3Api;if(e.deals){if(!Array.isArray(e.deals))throw TypeError(".PublicDealsV3Api.deals: array expected");t.deals=[];for(var r=0;r<e.deals.length;++r){if("object"!=typeof e.deals[r])throw TypeError(".PublicDealsV3Api.deals: object expected");t.deals[r]=a.PublicDealsV3ApiItem.fromObject(e.deals[r])}}return null!=e.eventType&&(t.eventType=String(e.eventType)),t},e.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.deals=[]),t.defaults&&(r.eventType=""),e.deals&&e.deals.length){r.deals=[];for(var i=0;i<e.deals.length;++i)r.deals[i]=a.PublicDealsV3ApiItem.toObject(e.deals[i],t)}return null!=e.eventType&&e.hasOwnProperty("eventType")&&(r.eventType=e.eventType),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,i.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/PublicDealsV3Api"},e}(),a.PublicDealsV3ApiItem=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.price="",e.prototype.quantity="",e.prototype.tradeType=0,e.prototype.time=l.Long?l.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=o.create()),null!=e.price&&Object.hasOwnProperty.call(e,"price")&&t.uint32(10).string(e.price),null!=e.quantity&&Object.hasOwnProperty.call(e,"quantity")&&t.uint32(18).string(e.quantity),null!=e.tradeType&&Object.hasOwnProperty.call(e,"tradeType")&&t.uint32(24).int32(e.tradeType),null!=e.time&&Object.hasOwnProperty.call(e,"time")&&t.uint32(32).int64(e.time),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t,r){e instanceof n||(e=n.create(e));for(var i=void 0===t?e.len:e.pos+t,o=new a.PublicDealsV3ApiItem;e.pos<i;){var l=e.uint32();if(l===r)break;switch(l>>>3){case 1:o.price=e.string();break;case 2:o.quantity=e.string();break;case 3:o.tradeType=e.int32();break;case 4:o.time=e.int64();break;default:e.skipType(7&l)}}return o},e.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.price&&e.hasOwnProperty("price")&&!l.isString(e.price)?"price: string expected":null!=e.quantity&&e.hasOwnProperty("quantity")&&!l.isString(e.quantity)?"quantity: string expected":null!=e.tradeType&&e.hasOwnProperty("tradeType")&&!l.isInteger(e.tradeType)?"tradeType: integer expected":null!=e.time&&e.hasOwnProperty("time")&&!(l.isInteger(e.time)||e.time&&l.isInteger(e.time.low)&&l.isInteger(e.time.high))?"time: integer|Long expected":null},e.fromObject=function(e){if(e instanceof a.PublicDealsV3ApiItem)return e;var t=new a.PublicDealsV3ApiItem;return null!=e.price&&(t.price=String(e.price)),null!=e.quantity&&(t.quantity=String(e.quantity)),null!=e.tradeType&&(t.tradeType=0|e.tradeType),null!=e.time&&(l.Long?(t.time=l.Long.fromValue(e.time)).unsigned=!1:"string"==typeof e.time?t.time=parseInt(e.time,10):"number"==typeof e.time?t.time=e.time:"object"==typeof e.time&&(t.time=new l.LongBits(e.time.low>>>0,e.time.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var r={};if(t.defaults)if(r.price="",r.quantity="",r.tradeType=0,l.Long){var i=new l.Long(0,0,!1);r.time=t.longs===String?i.toString():t.longs===Number?i.toNumber():i}else r.time=t.longs===String?"0":0;return null!=e.price&&e.hasOwnProperty("price")&&(r.price=e.price),null!=e.quantity&&e.hasOwnProperty("quantity")&&(r.quantity=e.quantity),null!=e.tradeType&&e.hasOwnProperty("tradeType")&&(r.tradeType=e.tradeType),null!=e.time&&e.hasOwnProperty("time")&&("number"==typeof e.time?r.time=t.longs===String?String(e.time):e.time:r.time=t.longs===String?l.Long.prototype.toString.call(e.time):t.longs===Number?new l.LongBits(e.time.low>>>0,e.time.high>>>0).toNumber():e.time),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,i.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/PublicDealsV3ApiItem"},e}(),a.PublicIncreaseDepthsBatchV3Api=function(){function e(e){if(this.items=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.items=l.emptyArray,e.prototype.eventType="",e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=o.create()),null!=e.items&&e.items.length)for(var r=0;r<e.items.length;++r)a.PublicIncreaseDepthsV3Api.encode(e.items[r],t.uint32(10).fork()).ldelim();return null!=e.eventType&&Object.hasOwnProperty.call(e,"eventType")&&t.uint32(18).string(e.eventType),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t,r){e instanceof n||(e=n.create(e));for(var i=void 0===t?e.len:e.pos+t,o=new a.PublicIncreaseDepthsBatchV3Api;e.pos<i;){var l=e.uint32();if(l===r)break;switch(l>>>3){case 1:o.items&&o.items.length||(o.items=[]),o.items.push(a.PublicIncreaseDepthsV3Api.decode(e,e.uint32()));break;case 2:o.eventType=e.string();break;default:e.skipType(7&l)}}return o},e.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.items&&e.hasOwnProperty("items")){if(!Array.isArray(e.items))return"items: array expected";for(var t=0;t<e.items.length;++t){var r=a.PublicIncreaseDepthsV3Api.verify(e.items[t]);if(r)return"items."+r}}return null!=e.eventType&&e.hasOwnProperty("eventType")&&!l.isString(e.eventType)?"eventType: string expected":null},e.fromObject=function(e){if(e instanceof a.PublicIncreaseDepthsBatchV3Api)return e;var t=new a.PublicIncreaseDepthsBatchV3Api;if(e.items){if(!Array.isArray(e.items))throw TypeError(".PublicIncreaseDepthsBatchV3Api.items: array expected");t.items=[];for(var r=0;r<e.items.length;++r){if("object"!=typeof e.items[r])throw TypeError(".PublicIncreaseDepthsBatchV3Api.items: object expected");t.items[r]=a.PublicIncreaseDepthsV3Api.fromObject(e.items[r])}}return null!=e.eventType&&(t.eventType=String(e.eventType)),t},e.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.items=[]),t.defaults&&(r.eventType=""),e.items&&e.items.length){r.items=[];for(var i=0;i<e.items.length;++i)r.items[i]=a.PublicIncreaseDepthsV3Api.toObject(e.items[i],t)}return null!=e.eventType&&e.hasOwnProperty("eventType")&&(r.eventType=e.eventType),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,i.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/PublicIncreaseDepthsBatchV3Api"},e}(),a.PublicIncreaseDepthsV3Api=function(){function e(e){if(this.asks=[],this.bids=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.asks=l.emptyArray,e.prototype.bids=l.emptyArray,e.prototype.eventType="",e.prototype.version="",e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=o.create()),null!=e.asks&&e.asks.length)for(var r=0;r<e.asks.length;++r)a.PublicIncreaseDepthV3ApiItem.encode(e.asks[r],t.uint32(10).fork()).ldelim();if(null!=e.bids&&e.bids.length)for(r=0;r<e.bids.length;++r)a.PublicIncreaseDepthV3ApiItem.encode(e.bids[r],t.uint32(18).fork()).ldelim();return null!=e.eventType&&Object.hasOwnProperty.call(e,"eventType")&&t.uint32(26).string(e.eventType),null!=e.version&&Object.hasOwnProperty.call(e,"version")&&t.uint32(34).string(e.version),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t,r){e instanceof n||(e=n.create(e));for(var i=void 0===t?e.len:e.pos+t,o=new a.PublicIncreaseDepthsV3Api;e.pos<i;){var l=e.uint32();if(l===r)break;switch(l>>>3){case 1:o.asks&&o.asks.length||(o.asks=[]),o.asks.push(a.PublicIncreaseDepthV3ApiItem.decode(e,e.uint32()));break;case 2:o.bids&&o.bids.length||(o.bids=[]),o.bids.push(a.PublicIncreaseDepthV3ApiItem.decode(e,e.uint32()));break;case 3:o.eventType=e.string();break;case 4:o.version=e.string();break;default:e.skipType(7&l)}}return o},e.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.asks&&e.hasOwnProperty("asks")){if(!Array.isArray(e.asks))return"asks: array expected";for(var t=0;t<e.asks.length;++t){if(r=a.PublicIncreaseDepthV3ApiItem.verify(e.asks[t]))return"asks."+r}}if(null!=e.bids&&e.hasOwnProperty("bids")){if(!Array.isArray(e.bids))return"bids: array expected";for(t=0;t<e.bids.length;++t){var r;if(r=a.PublicIncreaseDepthV3ApiItem.verify(e.bids[t]))return"bids."+r}}return null!=e.eventType&&e.hasOwnProperty("eventType")&&!l.isString(e.eventType)?"eventType: string expected":null!=e.version&&e.hasOwnProperty("version")&&!l.isString(e.version)?"version: string expected":null},e.fromObject=function(e){if(e instanceof a.PublicIncreaseDepthsV3Api)return e;var t=new a.PublicIncreaseDepthsV3Api;if(e.asks){if(!Array.isArray(e.asks))throw TypeError(".PublicIncreaseDepthsV3Api.asks: array expected");t.asks=[];for(var r=0;r<e.asks.length;++r){if("object"!=typeof e.asks[r])throw TypeError(".PublicIncreaseDepthsV3Api.asks: object expected");t.asks[r]=a.PublicIncreaseDepthV3ApiItem.fromObject(e.asks[r])}}if(e.bids){if(!Array.isArray(e.bids))throw TypeError(".PublicIncreaseDepthsV3Api.bids: array expected");t.bids=[];for(r=0;r<e.bids.length;++r){if("object"!=typeof e.bids[r])throw TypeError(".PublicIncreaseDepthsV3Api.bids: object expected");t.bids[r]=a.PublicIncreaseDepthV3ApiItem.fromObject(e.bids[r])}}return null!=e.eventType&&(t.eventType=String(e.eventType)),null!=e.version&&(t.version=String(e.version)),t},e.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.asks=[],r.bids=[]),t.defaults&&(r.eventType="",r.version=""),e.asks&&e.asks.length){r.asks=[];for(var i=0;i<e.asks.length;++i)r.asks[i]=a.PublicIncreaseDepthV3ApiItem.toObject(e.asks[i],t)}if(e.bids&&e.bids.length){r.bids=[];for(i=0;i<e.bids.length;++i)r.bids[i]=a.PublicIncreaseDepthV3ApiItem.toObject(e.bids[i],t)}return null!=e.eventType&&e.hasOwnProperty("eventType")&&(r.eventType=e.eventType),null!=e.version&&e.hasOwnProperty("version")&&(r.version=e.version),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,i.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/PublicIncreaseDepthsV3Api"},e}(),a.PublicIncreaseDepthV3ApiItem=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.price="",e.prototype.quantity="",e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=o.create()),null!=e.price&&Object.hasOwnProperty.call(e,"price")&&t.uint32(10).string(e.price),null!=e.quantity&&Object.hasOwnProperty.call(e,"quantity")&&t.uint32(18).string(e.quantity),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t,r){e instanceof n||(e=n.create(e));for(var i=void 0===t?e.len:e.pos+t,o=new a.PublicIncreaseDepthV3ApiItem;e.pos<i;){var l=e.uint32();if(l===r)break;switch(l>>>3){case 1:o.price=e.string();break;case 2:o.quantity=e.string();break;default:e.skipType(7&l)}}return o},e.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.price&&e.hasOwnProperty("price")&&!l.isString(e.price)?"price: string expected":null!=e.quantity&&e.hasOwnProperty("quantity")&&!l.isString(e.quantity)?"quantity: string expected":null},e.fromObject=function(e){if(e instanceof a.PublicIncreaseDepthV3ApiItem)return e;var t=new a.PublicIncreaseDepthV3ApiItem;return null!=e.price&&(t.price=String(e.price)),null!=e.quantity&&(t.quantity=String(e.quantity)),t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.price="",r.quantity=""),null!=e.price&&e.hasOwnProperty("price")&&(r.price=e.price),null!=e.quantity&&e.hasOwnProperty("quantity")&&(r.quantity=e.quantity),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,i.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/PublicIncreaseDepthV3ApiItem"},e}(),a.PublicLimitDepthsV3Api=function(){function e(e){if(this.asks=[],this.bids=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.asks=l.emptyArray,e.prototype.bids=l.emptyArray,e.prototype.eventType="",e.prototype.version="",e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=o.create()),null!=e.asks&&e.asks.length)for(var r=0;r<e.asks.length;++r)a.PublicLimitDepthV3ApiItem.encode(e.asks[r],t.uint32(10).fork()).ldelim();if(null!=e.bids&&e.bids.length)for(r=0;r<e.bids.length;++r)a.PublicLimitDepthV3ApiItem.encode(e.bids[r],t.uint32(18).fork()).ldelim();return null!=e.eventType&&Object.hasOwnProperty.call(e,"eventType")&&t.uint32(26).string(e.eventType),null!=e.version&&Object.hasOwnProperty.call(e,"version")&&t.uint32(34).string(e.version),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t,r){e instanceof n||(e=n.create(e));for(var i=void 0===t?e.len:e.pos+t,o=new a.PublicLimitDepthsV3Api;e.pos<i;){var l=e.uint32();if(l===r)break;switch(l>>>3){case 1:o.asks&&o.asks.length||(o.asks=[]),o.asks.push(a.PublicLimitDepthV3ApiItem.decode(e,e.uint32()));break;case 2:o.bids&&o.bids.length||(o.bids=[]),o.bids.push(a.PublicLimitDepthV3ApiItem.decode(e,e.uint32()));break;case 3:o.eventType=e.string();break;case 4:o.version=e.string();break;default:e.skipType(7&l)}}return o},e.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.asks&&e.hasOwnProperty("asks")){if(!Array.isArray(e.asks))return"asks: array expected";for(var t=0;t<e.asks.length;++t){if(r=a.PublicLimitDepthV3ApiItem.verify(e.asks[t]))return"asks."+r}}if(null!=e.bids&&e.hasOwnProperty("bids")){if(!Array.isArray(e.bids))return"bids: array expected";for(t=0;t<e.bids.length;++t){var r;if(r=a.PublicLimitDepthV3ApiItem.verify(e.bids[t]))return"bids."+r}}return null!=e.eventType&&e.hasOwnProperty("eventType")&&!l.isString(e.eventType)?"eventType: string expected":null!=e.version&&e.hasOwnProperty("version")&&!l.isString(e.version)?"version: string expected":null},e.fromObject=function(e){if(e instanceof a.PublicLimitDepthsV3Api)return e;var t=new a.PublicLimitDepthsV3Api;if(e.asks){if(!Array.isArray(e.asks))throw TypeError(".PublicLimitDepthsV3Api.asks: array expected");t.asks=[];for(var r=0;r<e.asks.length;++r){if("object"!=typeof e.asks[r])throw TypeError(".PublicLimitDepthsV3Api.asks: object expected");t.asks[r]=a.PublicLimitDepthV3ApiItem.fromObject(e.asks[r])}}if(e.bids){if(!Array.isArray(e.bids))throw TypeError(".PublicLimitDepthsV3Api.bids: array expected");t.bids=[];for(r=0;r<e.bids.length;++r){if("object"!=typeof e.bids[r])throw TypeError(".PublicLimitDepthsV3Api.bids: object expected");t.bids[r]=a.PublicLimitDepthV3ApiItem.fromObject(e.bids[r])}}return null!=e.eventType&&(t.eventType=String(e.eventType)),null!=e.version&&(t.version=String(e.version)),t},e.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.asks=[],r.bids=[]),t.defaults&&(r.eventType="",r.version=""),e.asks&&e.asks.length){r.asks=[];for(var i=0;i<e.asks.length;++i)r.asks[i]=a.PublicLimitDepthV3ApiItem.toObject(e.asks[i],t)}if(e.bids&&e.bids.length){r.bids=[];for(i=0;i<e.bids.length;++i)r.bids[i]=a.PublicLimitDepthV3ApiItem.toObject(e.bids[i],t)}return null!=e.eventType&&e.hasOwnProperty("eventType")&&(r.eventType=e.eventType),null!=e.version&&e.hasOwnProperty("version")&&(r.version=e.version),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,i.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/PublicLimitDepthsV3Api"},e}(),a.PublicLimitDepthV3ApiItem=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.price="",e.prototype.quantity="",e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=o.create()),null!=e.price&&Object.hasOwnProperty.call(e,"price")&&t.uint32(10).string(e.price),null!=e.quantity&&Object.hasOwnProperty.call(e,"quantity")&&t.uint32(18).string(e.quantity),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t,r){e instanceof n||(e=n.create(e));for(var i=void 0===t?e.len:e.pos+t,o=new a.PublicLimitDepthV3ApiItem;e.pos<i;){var l=e.uint32();if(l===r)break;switch(l>>>3){case 1:o.price=e.string();break;case 2:o.quantity=e.string();break;default:e.skipType(7&l)}}return o},e.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.price&&e.hasOwnProperty("price")&&!l.isString(e.price)?"price: string expected":null!=e.quantity&&e.hasOwnProperty("quantity")&&!l.isString(e.quantity)?"quantity: string expected":null},e.fromObject=function(e){if(e instanceof a.PublicLimitDepthV3ApiItem)return e;var t=new a.PublicLimitDepthV3ApiItem;return null!=e.price&&(t.price=String(e.price)),null!=e.quantity&&(t.quantity=String(e.quantity)),t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.price="",r.quantity=""),null!=e.price&&e.hasOwnProperty("price")&&(r.price=e.price),null!=e.quantity&&e.hasOwnProperty("quantity")&&(r.quantity=e.quantity),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,i.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/PublicLimitDepthV3ApiItem"},e}(),a.PublicMiniTickerV3Api=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.symbol="",e.prototype.price="",e.prototype.rate="",e.prototype.zonedRate="",e.prototype.high="",e.prototype.low="",e.prototype.volume="",e.prototype.quantity="",e.prototype.lastCloseRate="",e.prototype.lastCloseZonedRate="",e.prototype.lastCloseHigh="",e.prototype.lastCloseLow="",e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=o.create()),null!=e.symbol&&Object.hasOwnProperty.call(e,"symbol")&&t.uint32(10).string(e.symbol),null!=e.price&&Object.hasOwnProperty.call(e,"price")&&t.uint32(18).string(e.price),null!=e.rate&&Object.hasOwnProperty.call(e,"rate")&&t.uint32(26).string(e.rate),null!=e.zonedRate&&Object.hasOwnProperty.call(e,"zonedRate")&&t.uint32(34).string(e.zonedRate),null!=e.high&&Object.hasOwnProperty.call(e,"high")&&t.uint32(42).string(e.high),null!=e.low&&Object.hasOwnProperty.call(e,"low")&&t.uint32(50).string(e.low),null!=e.volume&&Object.hasOwnProperty.call(e,"volume")&&t.uint32(58).string(e.volume),null!=e.quantity&&Object.hasOwnProperty.call(e,"quantity")&&t.uint32(66).string(e.quantity),null!=e.lastCloseRate&&Object.hasOwnProperty.call(e,"lastCloseRate")&&t.uint32(74).string(e.lastCloseRate),null!=e.lastCloseZonedRate&&Object.hasOwnProperty.call(e,"lastCloseZonedRate")&&t.uint32(82).string(e.lastCloseZonedRate),null!=e.lastCloseHigh&&Object.hasOwnProperty.call(e,"lastCloseHigh")&&t.uint32(90).string(e.lastCloseHigh),null!=e.lastCloseLow&&Object.hasOwnProperty.call(e,"lastCloseLow")&&t.uint32(98).string(e.lastCloseLow),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t,r){e instanceof n||(e=n.create(e));for(var i=void 0===t?e.len:e.pos+t,o=new a.PublicMiniTickerV3Api;e.pos<i;){var l=e.uint32();if(l===r)break;switch(l>>>3){case 1:o.symbol=e.string();break;case 2:o.price=e.string();break;case 3:o.rate=e.string();break;case 4:o.zonedRate=e.string();break;case 5:o.high=e.string();break;case 6:o.low=e.string();break;case 7:o.volume=e.string();break;case 8:o.quantity=e.string();break;case 9:o.lastCloseRate=e.string();break;case 10:o.lastCloseZonedRate=e.string();break;case 11:o.lastCloseHigh=e.string();break;case 12:o.lastCloseLow=e.string();break;default:e.skipType(7&l)}}return o},e.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.symbol&&e.hasOwnProperty("symbol")&&!l.isString(e.symbol)?"symbol: string expected":null!=e.price&&e.hasOwnProperty("price")&&!l.isString(e.price)?"price: string expected":null!=e.rate&&e.hasOwnProperty("rate")&&!l.isString(e.rate)?"rate: string expected":null!=e.zonedRate&&e.hasOwnProperty("zonedRate")&&!l.isString(e.zonedRate)?"zonedRate: string expected":null!=e.high&&e.hasOwnProperty("high")&&!l.isString(e.high)?"high: string expected":null!=e.low&&e.hasOwnProperty("low")&&!l.isString(e.low)?"low: string expected":null!=e.volume&&e.hasOwnProperty("volume")&&!l.isString(e.volume)?"volume: string expected":null!=e.quantity&&e.hasOwnProperty("quantity")&&!l.isString(e.quantity)?"quantity: string expected":null!=e.lastCloseRate&&e.hasOwnProperty("lastCloseRate")&&!l.isString(e.lastCloseRate)?"lastCloseRate: string expected":null!=e.lastCloseZonedRate&&e.hasOwnProperty("lastCloseZonedRate")&&!l.isString(e.lastCloseZonedRate)?"lastCloseZonedRate: string expected":null!=e.lastCloseHigh&&e.hasOwnProperty("lastCloseHigh")&&!l.isString(e.lastCloseHigh)?"lastCloseHigh: string expected":null!=e.lastCloseLow&&e.hasOwnProperty("lastCloseLow")&&!l.isString(e.lastCloseLow)?"lastCloseLow: string expected":null},e.fromObject=function(e){if(e instanceof a.PublicMiniTickerV3Api)return e;var t=new a.PublicMiniTickerV3Api;return null!=e.symbol&&(t.symbol=String(e.symbol)),null!=e.price&&(t.price=String(e.price)),null!=e.rate&&(t.rate=String(e.rate)),null!=e.zonedRate&&(t.zonedRate=String(e.zonedRate)),null!=e.high&&(t.high=String(e.high)),null!=e.low&&(t.low=String(e.low)),null!=e.volume&&(t.volume=String(e.volume)),null!=e.quantity&&(t.quantity=String(e.quantity)),null!=e.lastCloseRate&&(t.lastCloseRate=String(e.lastCloseRate)),null!=e.lastCloseZonedRate&&(t.lastCloseZonedRate=String(e.lastCloseZonedRate)),null!=e.lastCloseHigh&&(t.lastCloseHigh=String(e.lastCloseHigh)),null!=e.lastCloseLow&&(t.lastCloseLow=String(e.lastCloseLow)),t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.symbol="",r.price="",r.rate="",r.zonedRate="",r.high="",r.low="",r.volume="",r.quantity="",r.lastCloseRate="",r.lastCloseZonedRate="",r.lastCloseHigh="",r.lastCloseLow=""),null!=e.symbol&&e.hasOwnProperty("symbol")&&(r.symbol=e.symbol),null!=e.price&&e.hasOwnProperty("price")&&(r.price=e.price),null!=e.rate&&e.hasOwnProperty("rate")&&(r.rate=e.rate),null!=e.zonedRate&&e.hasOwnProperty("zonedRate")&&(r.zonedRate=e.zonedRate),null!=e.high&&e.hasOwnProperty("high")&&(r.high=e.high),null!=e.low&&e.hasOwnProperty("low")&&(r.low=e.low),null!=e.volume&&e.hasOwnProperty("volume")&&(r.volume=e.volume),null!=e.quantity&&e.hasOwnProperty("quantity")&&(r.quantity=e.quantity),null!=e.lastCloseRate&&e.hasOwnProperty("lastCloseRate")&&(r.lastCloseRate=e.lastCloseRate),null!=e.lastCloseZonedRate&&e.hasOwnProperty("lastCloseZonedRate")&&(r.lastCloseZonedRate=e.lastCloseZonedRate),null!=e.lastCloseHigh&&e.hasOwnProperty("lastCloseHigh")&&(r.lastCloseHigh=e.lastCloseHigh),null!=e.lastCloseLow&&e.hasOwnProperty("lastCloseLow")&&(r.lastCloseLow=e.lastCloseLow),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,i.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/PublicMiniTickerV3Api"},e}(),a.PublicMiniTickersV3Api=function(){function e(e){if(this.items=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.items=l.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=o.create()),null!=e.items&&e.items.length)for(var r=0;r<e.items.length;++r)a.PublicMiniTickerV3Api.encode(e.items[r],t.uint32(10).fork()).ldelim();return t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t,r){e instanceof n||(e=n.create(e));for(var i=void 0===t?e.len:e.pos+t,o=new a.PublicMiniTickersV3Api;e.pos<i;){var l=e.uint32();if(l===r)break;if(l>>>3==1)o.items&&o.items.length||(o.items=[]),o.items.push(a.PublicMiniTickerV3Api.decode(e,e.uint32()));else e.skipType(7&l)}return o},e.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.items&&e.hasOwnProperty("items")){if(!Array.isArray(e.items))return"items: array expected";for(var t=0;t<e.items.length;++t){var r=a.PublicMiniTickerV3Api.verify(e.items[t]);if(r)return"items."+r}}return null},e.fromObject=function(e){if(e instanceof a.PublicMiniTickersV3Api)return e;var t=new a.PublicMiniTickersV3Api;if(e.items){if(!Array.isArray(e.items))throw TypeError(".PublicMiniTickersV3Api.items: array expected");t.items=[];for(var r=0;r<e.items.length;++r){if("object"!=typeof e.items[r])throw TypeError(".PublicMiniTickersV3Api.items: object expected");t.items[r]=a.PublicMiniTickerV3Api.fromObject(e.items[r])}}return t},e.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.items=[]),e.items&&e.items.length){r.items=[];for(var i=0;i<e.items.length;++i)r.items[i]=a.PublicMiniTickerV3Api.toObject(e.items[i],t)}return r},e.prototype.toJSON=function(){return this.constructor.toObject(this,i.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/PublicMiniTickersV3Api"},e}(),a.PublicSpotKlineV3Api=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.interval="",e.prototype.windowStart=l.Long?l.Long.fromBits(0,0,!1):0,e.prototype.openingPrice="",e.prototype.closingPrice="",e.prototype.highestPrice="",e.prototype.lowestPrice="",e.prototype.volume="",e.prototype.amount="",e.prototype.windowEnd=l.Long?l.Long.fromBits(0,0,!1):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=o.create()),null!=e.interval&&Object.hasOwnProperty.call(e,"interval")&&t.uint32(10).string(e.interval),null!=e.windowStart&&Object.hasOwnProperty.call(e,"windowStart")&&t.uint32(16).int64(e.windowStart),null!=e.openingPrice&&Object.hasOwnProperty.call(e,"openingPrice")&&t.uint32(26).string(e.openingPrice),null!=e.closingPrice&&Object.hasOwnProperty.call(e,"closingPrice")&&t.uint32(34).string(e.closingPrice),null!=e.highestPrice&&Object.hasOwnProperty.call(e,"highestPrice")&&t.uint32(42).string(e.highestPrice),null!=e.lowestPrice&&Object.hasOwnProperty.call(e,"lowestPrice")&&t.uint32(50).string(e.lowestPrice),null!=e.volume&&Object.hasOwnProperty.call(e,"volume")&&t.uint32(58).string(e.volume),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&t.uint32(66).string(e.amount),null!=e.windowEnd&&Object.hasOwnProperty.call(e,"windowEnd")&&t.uint32(72).int64(e.windowEnd),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t,r){e instanceof n||(e=n.create(e));for(var i=void 0===t?e.len:e.pos+t,o=new a.PublicSpotKlineV3Api;e.pos<i;){var l=e.uint32();if(l===r)break;switch(l>>>3){case 1:o.interval=e.string();break;case 2:o.windowStart=e.int64();break;case 3:o.openingPrice=e.string();break;case 4:o.closingPrice=e.string();break;case 5:o.highestPrice=e.string();break;case 6:o.lowestPrice=e.string();break;case 7:o.volume=e.string();break;case 8:o.amount=e.string();break;case 9:o.windowEnd=e.int64();break;default:e.skipType(7&l)}}return o},e.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.interval&&e.hasOwnProperty("interval")&&!l.isString(e.interval)?"interval: string expected":null!=e.windowStart&&e.hasOwnProperty("windowStart")&&!(l.isInteger(e.windowStart)||e.windowStart&&l.isInteger(e.windowStart.low)&&l.isInteger(e.windowStart.high))?"windowStart: integer|Long expected":null!=e.openingPrice&&e.hasOwnProperty("openingPrice")&&!l.isString(e.openingPrice)?"openingPrice: string expected":null!=e.closingPrice&&e.hasOwnProperty("closingPrice")&&!l.isString(e.closingPrice)?"closingPrice: string expected":null!=e.highestPrice&&e.hasOwnProperty("highestPrice")&&!l.isString(e.highestPrice)?"highestPrice: string expected":null!=e.lowestPrice&&e.hasOwnProperty("lowestPrice")&&!l.isString(e.lowestPrice)?"lowestPrice: string expected":null!=e.volume&&e.hasOwnProperty("volume")&&!l.isString(e.volume)?"volume: string expected":null!=e.amount&&e.hasOwnProperty("amount")&&!l.isString(e.amount)?"amount: string expected":null!=e.windowEnd&&e.hasOwnProperty("windowEnd")&&!(l.isInteger(e.windowEnd)||e.windowEnd&&l.isInteger(e.windowEnd.low)&&l.isInteger(e.windowEnd.high))?"windowEnd: integer|Long expected":null},e.fromObject=function(e){if(e instanceof a.PublicSpotKlineV3Api)return e;var t=new a.PublicSpotKlineV3Api;return null!=e.interval&&(t.interval=String(e.interval)),null!=e.windowStart&&(l.Long?(t.windowStart=l.Long.fromValue(e.windowStart)).unsigned=!1:"string"==typeof e.windowStart?t.windowStart=parseInt(e.windowStart,10):"number"==typeof e.windowStart?t.windowStart=e.windowStart:"object"==typeof e.windowStart&&(t.windowStart=new l.LongBits(e.windowStart.low>>>0,e.windowStart.high>>>0).toNumber())),null!=e.openingPrice&&(t.openingPrice=String(e.openingPrice)),null!=e.closingPrice&&(t.closingPrice=String(e.closingPrice)),null!=e.highestPrice&&(t.highestPrice=String(e.highestPrice)),null!=e.lowestPrice&&(t.lowestPrice=String(e.lowestPrice)),null!=e.volume&&(t.volume=String(e.volume)),null!=e.amount&&(t.amount=String(e.amount)),null!=e.windowEnd&&(l.Long?(t.windowEnd=l.Long.fromValue(e.windowEnd)).unsigned=!1:"string"==typeof e.windowEnd?t.windowEnd=parseInt(e.windowEnd,10):"number"==typeof e.windowEnd?t.windowEnd=e.windowEnd:"object"==typeof e.windowEnd&&(t.windowEnd=new l.LongBits(e.windowEnd.low>>>0,e.windowEnd.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var r={};if(t.defaults){if(r.interval="",l.Long){var i=new l.Long(0,0,!1);r.windowStart=t.longs===String?i.toString():t.longs===Number?i.toNumber():i}else r.windowStart=t.longs===String?"0":0;if(r.openingPrice="",r.closingPrice="",r.highestPrice="",r.lowestPrice="",r.volume="",r.amount="",l.Long){i=new l.Long(0,0,!1);r.windowEnd=t.longs===String?i.toString():t.longs===Number?i.toNumber():i}else r.windowEnd=t.longs===String?"0":0}return null!=e.interval&&e.hasOwnProperty("interval")&&(r.interval=e.interval),null!=e.windowStart&&e.hasOwnProperty("windowStart")&&("number"==typeof e.windowStart?r.windowStart=t.longs===String?String(e.windowStart):e.windowStart:r.windowStart=t.longs===String?l.Long.prototype.toString.call(e.windowStart):t.longs===Number?new l.LongBits(e.windowStart.low>>>0,e.windowStart.high>>>0).toNumber():e.windowStart),null!=e.openingPrice&&e.hasOwnProperty("openingPrice")&&(r.openingPrice=e.openingPrice),null!=e.closingPrice&&e.hasOwnProperty("closingPrice")&&(r.closingPrice=e.closingPrice),null!=e.highestPrice&&e.hasOwnProperty("highestPrice")&&(r.highestPrice=e.highestPrice),null!=e.lowestPrice&&e.hasOwnProperty("lowestPrice")&&(r.lowestPrice=e.lowestPrice),null!=e.volume&&e.hasOwnProperty("volume")&&(r.volume=e.volume),null!=e.amount&&e.hasOwnProperty("amount")&&(r.amount=e.amount),null!=e.windowEnd&&e.hasOwnProperty("windowEnd")&&("number"==typeof e.windowEnd?r.windowEnd=t.longs===String?String(e.windowEnd):e.windowEnd:r.windowEnd=t.longs===String?l.Long.prototype.toString.call(e.windowEnd):t.longs===Number?new l.LongBits(e.windowEnd.low>>>0,e.windowEnd.high>>>0).toNumber():e.windowEnd),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,i.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/PublicSpotKlineV3Api"},e}(),a.PushDataV3ApiWrapper=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var t;return e.prototype.channel="",e.prototype.publicDeals=null,e.prototype.publicIncreaseDepths=null,e.prototype.publicLimitDepths=null,e.prototype.privateOrders=null,e.prototype.publicBookTicker=null,e.prototype.privateDeals=null,e.prototype.privateAccount=null,e.prototype.publicSpotKline=null,e.prototype.publicMiniTicker=null,e.prototype.publicMiniTickers=null,e.prototype.publicBookTickerBatch=null,e.prototype.publicIncreaseDepthsBatch=null,e.prototype.publicAggreDepths=null,e.prototype.publicAggreDeals=null,e.prototype.publicAggreBookTicker=null,e.prototype.symbol=null,e.prototype.symbolId=null,e.prototype.createTime=null,e.prototype.sendTime=null,Object.defineProperty(e.prototype,"body",{get:l.oneOfGetter(t=["publicDeals","publicIncreaseDepths","publicLimitDepths","privateOrders","publicBookTicker","privateDeals","privateAccount","publicSpotKline","publicMiniTicker","publicMiniTickers","publicBookTickerBatch","publicIncreaseDepthsBatch","publicAggreDepths","publicAggreDeals","publicAggreBookTicker"]),set:l.oneOfSetter(t)}),Object.defineProperty(e.prototype,"_symbol",{get:l.oneOfGetter(t=["symbol"]),set:l.oneOfSetter(t)}),Object.defineProperty(e.prototype,"_symbolId",{get:l.oneOfGetter(t=["symbolId"]),set:l.oneOfSetter(t)}),Object.defineProperty(e.prototype,"_createTime",{get:l.oneOfGetter(t=["createTime"]),set:l.oneOfSetter(t)}),Object.defineProperty(e.prototype,"_sendTime",{get:l.oneOfGetter(t=["sendTime"]),set:l.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=o.create()),null!=e.channel&&Object.hasOwnProperty.call(e,"channel")&&t.uint32(10).string(e.channel),null!=e.symbol&&Object.hasOwnProperty.call(e,"symbol")&&t.uint32(26).string(e.symbol),null!=e.symbolId&&Object.hasOwnProperty.call(e,"symbolId")&&t.uint32(34).string(e.symbolId),null!=e.createTime&&Object.hasOwnProperty.call(e,"createTime")&&t.uint32(40).int64(e.createTime),null!=e.sendTime&&Object.hasOwnProperty.call(e,"sendTime")&&t.uint32(48).int64(e.sendTime),null!=e.publicDeals&&Object.hasOwnProperty.call(e,"publicDeals")&&a.PublicDealsV3Api.encode(e.publicDeals,t.uint32(2410).fork()).ldelim(),null!=e.publicIncreaseDepths&&Object.hasOwnProperty.call(e,"publicIncreaseDepths")&&a.PublicIncreaseDepthsV3Api.encode(e.publicIncreaseDepths,t.uint32(2418).fork()).ldelim(),null!=e.publicLimitDepths&&Object.hasOwnProperty.call(e,"publicLimitDepths")&&a.PublicLimitDepthsV3Api.encode(e.publicLimitDepths,t.uint32(2426).fork()).ldelim(),null!=e.privateOrders&&Object.hasOwnProperty.call(e,"privateOrders")&&a.PrivateOrdersV3Api.encode(e.privateOrders,t.uint32(2434).fork()).ldelim(),null!=e.publicBookTicker&&Object.hasOwnProperty.call(e,"publicBookTicker")&&a.PublicBookTickerV3Api.encode(e.publicBookTicker,t.uint32(2442).fork()).ldelim(),null!=e.privateDeals&&Object.hasOwnProperty.call(e,"privateDeals")&&a.PrivateDealsV3Api.encode(e.privateDeals,t.uint32(2450).fork()).ldelim(),null!=e.privateAccount&&Object.hasOwnProperty.call(e,"privateAccount")&&a.PrivateAccountV3Api.encode(e.privateAccount,t.uint32(2458).fork()).ldelim(),null!=e.publicSpotKline&&Object.hasOwnProperty.call(e,"publicSpotKline")&&a.PublicSpotKlineV3Api.encode(e.publicSpotKline,t.uint32(2466).fork()).ldelim(),null!=e.publicMiniTicker&&Object.hasOwnProperty.call(e,"publicMiniTicker")&&a.PublicMiniTickerV3Api.encode(e.publicMiniTicker,t.uint32(2474).fork()).ldelim(),null!=e.publicMiniTickers&&Object.hasOwnProperty.call(e,"publicMiniTickers")&&a.PublicMiniTickersV3Api.encode(e.publicMiniTickers,t.uint32(2482).fork()).ldelim(),null!=e.publicBookTickerBatch&&Object.hasOwnProperty.call(e,"publicBookTickerBatch")&&a.PublicBookTickerBatchV3Api.encode(e.publicBookTickerBatch,t.uint32(2490).fork()).ldelim(),null!=e.publicIncreaseDepthsBatch&&Object.hasOwnProperty.call(e,"publicIncreaseDepthsBatch")&&a.PublicIncreaseDepthsBatchV3Api.encode(e.publicIncreaseDepthsBatch,t.uint32(2498).fork()).ldelim(),null!=e.publicAggreDepths&&Object.hasOwnProperty.call(e,"publicAggreDepths")&&a.PublicAggreDepthsV3Api.encode(e.publicAggreDepths,t.uint32(2506).fork()).ldelim(),null!=e.publicAggreDeals&&Object.hasOwnProperty.call(e,"publicAggreDeals")&&a.PublicAggreDealsV3Api.encode(e.publicAggreDeals,t.uint32(2514).fork()).ldelim(),null!=e.publicAggreBookTicker&&Object.hasOwnProperty.call(e,"publicAggreBookTicker")&&a.PublicAggreBookTickerV3Api.encode(e.publicAggreBookTicker,t.uint32(2522).fork()).ldelim(),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t,r){e instanceof n||(e=n.create(e));for(var i=void 0===t?e.len:e.pos+t,o=new a.PushDataV3ApiWrapper;e.pos<i;){var l=e.uint32();if(l===r)break;switch(l>>>3){case 1:o.channel=e.string();break;case 301:o.publicDeals=a.PublicDealsV3Api.decode(e,e.uint32());break;case 302:o.publicIncreaseDepths=a.PublicIncreaseDepthsV3Api.decode(e,e.uint32());break;case 303:o.publicLimitDepths=a.PublicLimitDepthsV3Api.decode(e,e.uint32());break;case 304:o.privateOrders=a.PrivateOrdersV3Api.decode(e,e.uint32());break;case 305:o.publicBookTicker=a.PublicBookTickerV3Api.decode(e,e.uint32());break;case 306:o.privateDeals=a.PrivateDealsV3Api.decode(e,e.uint32());break;case 307:o.privateAccount=a.PrivateAccountV3Api.decode(e,e.uint32());break;case 308:o.publicSpotKline=a.PublicSpotKlineV3Api.decode(e,e.uint32());break;case 309:o.publicMiniTicker=a.PublicMiniTickerV3Api.decode(e,e.uint32());break;case 310:o.publicMiniTickers=a.PublicMiniTickersV3Api.decode(e,e.uint32());break;case 311:o.publicBookTickerBatch=a.PublicBookTickerBatchV3Api.decode(e,e.uint32());break;case 312:o.publicIncreaseDepthsBatch=a.PublicIncreaseDepthsBatchV3Api.decode(e,e.uint32());break;case 313:o.publicAggreDepths=a.PublicAggreDepthsV3Api.decode(e,e.uint32());break;case 314:o.publicAggreDeals=a.PublicAggreDealsV3Api.decode(e,e.uint32());break;case 315:o.publicAggreBookTicker=a.PublicAggreBookTickerV3Api.decode(e,e.uint32());break;case 3:o.symbol=e.string();break;case 4:o.symbolId=e.string();break;case 5:o.createTime=e.int64();break;case 6:o.sendTime=e.int64();break;default:e.skipType(7&l)}}return o},e.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.channel&&e.hasOwnProperty("channel")&&!l.isString(e.channel))return"channel: string expected";if(null!=e.publicDeals&&e.hasOwnProperty("publicDeals")&&(t.body=1,r=a.PublicDealsV3Api.verify(e.publicDeals)))return"publicDeals."+r;if(null!=e.publicIncreaseDepths&&e.hasOwnProperty("publicIncreaseDepths")){if(1===t.body)return"body: multiple values";if(t.body=1,r=a.PublicIncreaseDepthsV3Api.verify(e.publicIncreaseDepths))return"publicIncreaseDepths."+r}if(null!=e.publicLimitDepths&&e.hasOwnProperty("publicLimitDepths")){if(1===t.body)return"body: multiple values";if(t.body=1,r=a.PublicLimitDepthsV3Api.verify(e.publicLimitDepths))return"publicLimitDepths."+r}if(null!=e.privateOrders&&e.hasOwnProperty("privateOrders")){if(1===t.body)return"body: multiple values";if(t.body=1,r=a.PrivateOrdersV3Api.verify(e.privateOrders))return"privateOrders."+r}if(null!=e.publicBookTicker&&e.hasOwnProperty("publicBookTicker")){if(1===t.body)return"body: multiple values";if(t.body=1,r=a.PublicBookTickerV3Api.verify(e.publicBookTicker))return"publicBookTicker."+r}if(null!=e.privateDeals&&e.hasOwnProperty("privateDeals")){if(1===t.body)return"body: multiple values";if(t.body=1,r=a.PrivateDealsV3Api.verify(e.privateDeals))return"privateDeals."+r}if(null!=e.privateAccount&&e.hasOwnProperty("privateAccount")){if(1===t.body)return"body: multiple values";if(t.body=1,r=a.PrivateAccountV3Api.verify(e.privateAccount))return"privateAccount."+r}if(null!=e.publicSpotKline&&e.hasOwnProperty("publicSpotKline")){if(1===t.body)return"body: multiple values";if(t.body=1,r=a.PublicSpotKlineV3Api.verify(e.publicSpotKline))return"publicSpotKline."+r}if(null!=e.publicMiniTicker&&e.hasOwnProperty("publicMiniTicker")){if(1===t.body)return"body: multiple values";if(t.body=1,r=a.PublicMiniTickerV3Api.verify(e.publicMiniTicker))return"publicMiniTicker."+r}if(null!=e.publicMiniTickers&&e.hasOwnProperty("publicMiniTickers")){if(1===t.body)return"body: multiple values";if(t.body=1,r=a.PublicMiniTickersV3Api.verify(e.publicMiniTickers))return"publicMiniTickers."+r}if(null!=e.publicBookTickerBatch&&e.hasOwnProperty("publicBookTickerBatch")){if(1===t.body)return"body: multiple values";if(t.body=1,r=a.PublicBookTickerBatchV3Api.verify(e.publicBookTickerBatch))return"publicBookTickerBatch."+r}if(null!=e.publicIncreaseDepthsBatch&&e.hasOwnProperty("publicIncreaseDepthsBatch")){if(1===t.body)return"body: multiple values";if(t.body=1,r=a.PublicIncreaseDepthsBatchV3Api.verify(e.publicIncreaseDepthsBatch))return"publicIncreaseDepthsBatch."+r}if(null!=e.publicAggreDepths&&e.hasOwnProperty("publicAggreDepths")){if(1===t.body)return"body: multiple values";if(t.body=1,r=a.PublicAggreDepthsV3Api.verify(e.publicAggreDepths))return"publicAggreDepths."+r}if(null!=e.publicAggreDeals&&e.hasOwnProperty("publicAggreDeals")){if(1===t.body)return"body: multiple values";if(t.body=1,r=a.PublicAggreDealsV3Api.verify(e.publicAggreDeals))return"publicAggreDeals."+r}if(null!=e.publicAggreBookTicker&&e.hasOwnProperty("publicAggreBookTicker")){if(1===t.body)return"body: multiple values";var r;if(t.body=1,r=a.PublicAggreBookTickerV3Api.verify(e.publicAggreBookTicker))return"publicAggreBookTicker."+r}return null!=e.symbol&&e.hasOwnProperty("symbol")&&(t._symbol=1,!l.isString(e.symbol))?"symbol: string expected":null!=e.symbolId&&e.hasOwnProperty("symbolId")&&(t._symbolId=1,!l.isString(e.symbolId))?"symbolId: string expected":null==e.createTime||!e.hasOwnProperty("createTime")||(t._createTime=1,l.isInteger(e.createTime)||e.createTime&&l.isInteger(e.createTime.low)&&l.isInteger(e.createTime.high))?null==e.sendTime||!e.hasOwnProperty("sendTime")||(t._sendTime=1,l.isInteger(e.sendTime)||e.sendTime&&l.isInteger(e.sendTime.low)&&l.isInteger(e.sendTime.high))?null:"sendTime: integer|Long expected":"createTime: integer|Long expected"},e.fromObject=function(e){if(e instanceof a.PushDataV3ApiWrapper)return e;var t=new a.PushDataV3ApiWrapper;if(null!=e.channel&&(t.channel=String(e.channel)),null!=e.publicDeals){if("object"!=typeof e.publicDeals)throw TypeError(".PushDataV3ApiWrapper.publicDeals: object expected");t.publicDeals=a.PublicDealsV3Api.fromObject(e.publicDeals)}if(null!=e.publicIncreaseDepths){if("object"!=typeof e.publicIncreaseDepths)throw TypeError(".PushDataV3ApiWrapper.publicIncreaseDepths: object expected");t.publicIncreaseDepths=a.PublicIncreaseDepthsV3Api.fromObject(e.publicIncreaseDepths)}if(null!=e.publicLimitDepths){if("object"!=typeof e.publicLimitDepths)throw TypeError(".PushDataV3ApiWrapper.publicLimitDepths: object expected");t.publicLimitDepths=a.PublicLimitDepthsV3Api.fromObject(e.publicLimitDepths)}if(null!=e.privateOrders){if("object"!=typeof e.privateOrders)throw TypeError(".PushDataV3ApiWrapper.privateOrders: object expected");t.privateOrders=a.PrivateOrdersV3Api.fromObject(e.privateOrders)}if(null!=e.publicBookTicker){if("object"!=typeof e.publicBookTicker)throw TypeError(".PushDataV3ApiWrapper.publicBookTicker: object expected");t.publicBookTicker=a.PublicBookTickerV3Api.fromObject(e.publicBookTicker)}if(null!=e.privateDeals){if("object"!=typeof e.privateDeals)throw TypeError(".PushDataV3ApiWrapper.privateDeals: object expected");t.privateDeals=a.PrivateDealsV3Api.fromObject(e.privateDeals)}if(null!=e.privateAccount){if("object"!=typeof e.privateAccount)throw TypeError(".PushDataV3ApiWrapper.privateAccount: object expected");t.privateAccount=a.PrivateAccountV3Api.fromObject(e.privateAccount)}if(null!=e.publicSpotKline){if("object"!=typeof e.publicSpotKline)throw TypeError(".PushDataV3ApiWrapper.publicSpotKline: object expected");t.publicSpotKline=a.PublicSpotKlineV3Api.fromObject(e.publicSpotKline)}if(null!=e.publicMiniTicker){if("object"!=typeof e.publicMiniTicker)throw TypeError(".PushDataV3ApiWrapper.publicMiniTicker: object expected");t.publicMiniTicker=a.PublicMiniTickerV3Api.fromObject(e.publicMiniTicker)}if(null!=e.publicMiniTickers){if("object"!=typeof e.publicMiniTickers)throw TypeError(".PushDataV3ApiWrapper.publicMiniTickers: object expected");t.publicMiniTickers=a.PublicMiniTickersV3Api.fromObject(e.publicMiniTickers)}if(null!=e.publicBookTickerBatch){if("object"!=typeof e.publicBookTickerBatch)throw TypeError(".PushDataV3ApiWrapper.publicBookTickerBatch: object expected");t.publicBookTickerBatch=a.PublicBookTickerBatchV3Api.fromObject(e.publicBookTickerBatch)}if(null!=e.publicIncreaseDepthsBatch){if("object"!=typeof e.publicIncreaseDepthsBatch)throw TypeError(".PushDataV3ApiWrapper.publicIncreaseDepthsBatch: object expected");t.publicIncreaseDepthsBatch=a.PublicIncreaseDepthsBatchV3Api.fromObject(e.publicIncreaseDepthsBatch)}if(null!=e.publicAggreDepths){if("object"!=typeof e.publicAggreDepths)throw TypeError(".PushDataV3ApiWrapper.publicAggreDepths: object expected");t.publicAggreDepths=a.PublicAggreDepthsV3Api.fromObject(e.publicAggreDepths)}if(null!=e.publicAggreDeals){if("object"!=typeof e.publicAggreDeals)throw TypeError(".PushDataV3ApiWrapper.publicAggreDeals: object expected");t.publicAggreDeals=a.PublicAggreDealsV3Api.fromObject(e.publicAggreDeals)}if(null!=e.publicAggreBookTicker){if("object"!=typeof e.publicAggreBookTicker)throw TypeError(".PushDataV3ApiWrapper.publicAggreBookTicker: object expected");t.publicAggreBookTicker=a.PublicAggreBookTickerV3Api.fromObject(e.publicAggreBookTicker)}return null!=e.symbol&&(t.symbol=String(e.symbol)),null!=e.symbolId&&(t.symbolId=String(e.symbolId)),null!=e.createTime&&(l.Long?(t.createTime=l.Long.fromValue(e.createTime)).unsigned=!1:"string"==typeof e.createTime?t.createTime=parseInt(e.createTime,10):"number"==typeof e.createTime?t.createTime=e.createTime:"object"==typeof e.createTime&&(t.createTime=new l.LongBits(e.createTime.low>>>0,e.createTime.high>>>0).toNumber())),null!=e.sendTime&&(l.Long?(t.sendTime=l.Long.fromValue(e.sendTime)).unsigned=!1:"string"==typeof e.sendTime?t.sendTime=parseInt(e.sendTime,10):"number"==typeof e.sendTime?t.sendTime=e.sendTime:"object"==typeof e.sendTime&&(t.sendTime=new l.LongBits(e.sendTime.low>>>0,e.sendTime.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.channel=""),null!=e.channel&&e.hasOwnProperty("channel")&&(r.channel=e.channel),null!=e.symbol&&e.hasOwnProperty("symbol")&&(r.symbol=e.symbol,t.oneofs&&(r._symbol="symbol")),null!=e.symbolId&&e.hasOwnProperty("symbolId")&&(r.symbolId=e.symbolId,t.oneofs&&(r._symbolId="symbolId")),null!=e.createTime&&e.hasOwnProperty("createTime")&&("number"==typeof e.createTime?r.createTime=t.longs===String?String(e.createTime):e.createTime:r.createTime=t.longs===String?l.Long.prototype.toString.call(e.createTime):t.longs===Number?new l.LongBits(e.createTime.low>>>0,e.createTime.high>>>0).toNumber():e.createTime,t.oneofs&&(r._createTime="createTime")),null!=e.sendTime&&e.hasOwnProperty("sendTime")&&("number"==typeof e.sendTime?r.sendTime=t.longs===String?String(e.sendTime):e.sendTime:r.sendTime=t.longs===String?l.Long.prototype.toString.call(e.sendTime):t.longs===Number?new l.LongBits(e.sendTime.low>>>0,e.sendTime.high>>>0).toNumber():e.sendTime,t.oneofs&&(r._sendTime="sendTime")),null!=e.publicDeals&&e.hasOwnProperty("publicDeals")&&(r.publicDeals=a.PublicDealsV3Api.toObject(e.publicDeals,t),t.oneofs&&(r.body="publicDeals")),null!=e.publicIncreaseDepths&&e.hasOwnProperty("publicIncreaseDepths")&&(r.publicIncreaseDepths=a.PublicIncreaseDepthsV3Api.toObject(e.publicIncreaseDepths,t),t.oneofs&&(r.body="publicIncreaseDepths")),null!=e.publicLimitDepths&&e.hasOwnProperty("publicLimitDepths")&&(r.publicLimitDepths=a.PublicLimitDepthsV3Api.toObject(e.publicLimitDepths,t),t.oneofs&&(r.body="publicLimitDepths")),null!=e.privateOrders&&e.hasOwnProperty("privateOrders")&&(r.privateOrders=a.PrivateOrdersV3Api.toObject(e.privateOrders,t),t.oneofs&&(r.body="privateOrders")),null!=e.publicBookTicker&&e.hasOwnProperty("publicBookTicker")&&(r.publicBookTicker=a.PublicBookTickerV3Api.toObject(e.publicBookTicker,t),t.oneofs&&(r.body="publicBookTicker")),null!=e.privateDeals&&e.hasOwnProperty("privateDeals")&&(r.privateDeals=a.PrivateDealsV3Api.toObject(e.privateDeals,t),t.oneofs&&(r.body="privateDeals")),null!=e.privateAccount&&e.hasOwnProperty("privateAccount")&&(r.privateAccount=a.PrivateAccountV3Api.toObject(e.privateAccount,t),t.oneofs&&(r.body="privateAccount")),null!=e.publicSpotKline&&e.hasOwnProperty("publicSpotKline")&&(r.publicSpotKline=a.PublicSpotKlineV3Api.toObject(e.publicSpotKline,t),t.oneofs&&(r.body="publicSpotKline")),null!=e.publicMiniTicker&&e.hasOwnProperty("publicMiniTicker")&&(r.publicMiniTicker=a.PublicMiniTickerV3Api.toObject(e.publicMiniTicker,t),t.oneofs&&(r.body="publicMiniTicker")),null!=e.publicMiniTickers&&e.hasOwnProperty("publicMiniTickers")&&(r.publicMiniTickers=a.PublicMiniTickersV3Api.toObject(e.publicMiniTickers,t),t.oneofs&&(r.body="publicMiniTickers")),null!=e.publicBookTickerBatch&&e.hasOwnProperty("publicBookTickerBatch")&&(r.publicBookTickerBatch=a.PublicBookTickerBatchV3Api.toObject(e.publicBookTickerBatch,t),t.oneofs&&(r.body="publicBookTickerBatch")),null!=e.publicIncreaseDepthsBatch&&e.hasOwnProperty("publicIncreaseDepthsBatch")&&(r.publicIncreaseDepthsBatch=a.PublicIncreaseDepthsBatchV3Api.toObject(e.publicIncreaseDepthsBatch,t),t.oneofs&&(r.body="publicIncreaseDepthsBatch")),null!=e.publicAggreDepths&&e.hasOwnProperty("publicAggreDepths")&&(r.publicAggreDepths=a.PublicAggreDepthsV3Api.toObject(e.publicAggreDepths,t),t.oneofs&&(r.body="publicAggreDepths")),null!=e.publicAggreDeals&&e.hasOwnProperty("publicAggreDeals")&&(r.publicAggreDeals=a.PublicAggreDealsV3Api.toObject(e.publicAggreDeals,t),t.oneofs&&(r.body="publicAggreDeals")),null!=e.publicAggreBookTicker&&e.hasOwnProperty("publicAggreBookTicker")&&(r.publicAggreBookTicker=a.PublicAggreBookTickerV3Api.toObject(e.publicAggreBookTicker,t),t.oneofs&&(r.body="publicAggreBookTicker")),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,i.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/PushDataV3ApiWrapper"},e}(),e.exports=a}}]);
@@ -1,21 +0,0 @@
1
- import { implicitReturnType } from '../base/types.js';
2
- import { Exchange as _Exchange } from '../base/Exchange.js';
3
- interface Exchange {
4
- publicGetMarkets(params?: {}): Promise<implicitReturnType>;
5
- publicGetOrdersMarket(params?: {}): Promise<implicitReturnType>;
6
- publicGetTickerMarket(params?: {}): Promise<implicitReturnType>;
7
- publicGetHistoryMarket(params?: {}): Promise<implicitReturnType>;
8
- publicGetChartIntervalMarketTimestamp(params?: {}): Promise<implicitReturnType>;
9
- publicGetChartIntervalMarket(params?: {}): Promise<implicitReturnType>;
10
- privateGetAccountBalances(params?: {}): Promise<implicitReturnType>;
11
- privateGetAccountOrderUuid(params?: {}): Promise<implicitReturnType>;
12
- privatePostOrderBuy(params?: {}): Promise<implicitReturnType>;
13
- privatePostOrderSell(params?: {}): Promise<implicitReturnType>;
14
- privatePostOrderCancel(params?: {}): Promise<implicitReturnType>;
15
- privatePostOrders(params?: {}): Promise<implicitReturnType>;
16
- privatePostAccountOrders(params?: {}): Promise<implicitReturnType>;
17
- privatePostAccountBalance(params?: {}): Promise<implicitReturnType>;
18
- }
19
- declare abstract class Exchange extends _Exchange {
20
- }
21
- export default Exchange;
@@ -1,49 +0,0 @@
1
- import tradeogreRest from '../tradeogre.js';
2
- import type { Int, OrderBook, Trade } from '../base/types.js';
3
- import Client from '../base/ws/Client.js';
4
- export default class tradeogre extends tradeogreRest {
5
- describe(): any;
6
- /**
7
- * @method
8
- * @name tradeogre#watchOrderBook
9
- * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
10
- * @see https://tradeogre.com/help/api
11
- * @param {string} symbol unified symbol of the market to fetch the order book for
12
- * @param {int} [limit] the maximum amount of order book entries to return (not used by the exchange)
13
- * @param {object} [params] extra parameters specific to the exchange API endpoint
14
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
15
- */
16
- watchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
17
- handleOrderBook(client: Client, message: any): void;
18
- handleDelta(orderbook: any, delta: any): void;
19
- handleBidAsks(bookSide: any, bidAsks: any): void;
20
- getCacheIndex(orderbook: any, deltas: any): any;
21
- /**
22
- * @method
23
- * @name tradeogre#watchTrades
24
- * @description watches information on multiple trades made in a market
25
- * @see https://tradeogre.com/help/api
26
- * @param {string} symbol unified market symbol of the market trades were made in
27
- * @param {int} [since] the earliest time in ms to fetch trades for
28
- * @param {int} [limit] the maximum number of trade structures to retrieve
29
- * @param {object} [params] extra parameters specific to the exchange API endpoint
30
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
31
- */
32
- watchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
33
- /**
34
- * @method
35
- * @name tradeogre#watchTradesForSymbols
36
- * @see https://tradeogre.com/help/api
37
- * @description get the list of most recent trades for a list of symbols
38
- * @param {string[]} symbols unified symbol of the market to fetch trades for (empty array means all markets)
39
- * @param {int} [since] timestamp in ms of the earliest trade to fetch
40
- * @param {int} [limit] the maximum amount of trades to fetch
41
- * @param {object} [params] extra parameters specific to the exchange API endpoint
42
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
43
- */
44
- watchTradesForSymbols(symbols: string[], since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
45
- handleTrade(client: Client, message: any): void;
46
- parseWsTrade(trade: any, market?: any): Trade;
47
- parseWsTradeSide(side: any): string;
48
- handleMessage(client: Client, message: any): void;
49
- }
@@ -1,278 +0,0 @@
1
- // ---------------------------------------------------------------------------
2
- import tradeogreRest from '../tradeogre.js';
3
- import { ArrayCache } from '../base/ws/Cache.js';
4
- // ---------------------------------------------------------------------------
5
- export default class tradeogre extends tradeogreRest {
6
- describe() {
7
- return this.deepExtend(super.describe(), {
8
- 'has': {
9
- 'ws': true,
10
- 'watchTrades': true,
11
- 'watchTradesForSymbols': true,
12
- 'watchOrderBook': true,
13
- 'watchOrderBookForSymbols': false,
14
- 'watchOHLCV': false,
15
- 'watchOHLCVForSymbols': false,
16
- 'watchOrders': false,
17
- 'watchMyTrades': false,
18
- 'watchTicker': false,
19
- 'watchTickers': false,
20
- 'watchBidsAsks': false,
21
- 'watchBalance': false,
22
- 'createOrderWs': false,
23
- 'editOrderWs': false,
24
- 'cancelOrderWs': false,
25
- 'cancelOrdersWs': false,
26
- },
27
- 'urls': {
28
- 'api': {
29
- 'ws': 'wss://tradeogre.com:8443',
30
- },
31
- },
32
- 'options': {},
33
- 'streaming': {},
34
- });
35
- }
36
- /**
37
- * @method
38
- * @name tradeogre#watchOrderBook
39
- * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
40
- * @see https://tradeogre.com/help/api
41
- * @param {string} symbol unified symbol of the market to fetch the order book for
42
- * @param {int} [limit] the maximum amount of order book entries to return (not used by the exchange)
43
- * @param {object} [params] extra parameters specific to the exchange API endpoint
44
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
45
- */
46
- async watchOrderBook(symbol, limit = undefined, params = {}) {
47
- await this.loadMarkets();
48
- const market = this.market(symbol);
49
- const url = this.urls['api']['ws'];
50
- const messageHash = 'orderbook' + ':' + market['symbol'];
51
- const request = {
52
- 'a': 'subscribe',
53
- 'e': 'book',
54
- 't': market['id'],
55
- };
56
- const orderbook = await this.watch(url, messageHash, this.extend(request, params), messageHash);
57
- return orderbook.limit();
58
- }
59
- handleOrderBook(client, message) {
60
- //
61
- // initial snapshot is fetched with ccxt's fetchOrderBook
62
- // the feed does not include a snapshot, just the deltas
63
- //
64
- // {
65
- // "e": "book",
66
- // "t": "ETH-USDT",
67
- // "s": "10752324",
68
- // "d": {
69
- // "bids": { "1787.02497915": "0" },
70
- // "asks": {}
71
- // }
72
- // }
73
- //
74
- const marketId = this.safeString(message, 't');
75
- const symbol = this.safeSymbol(marketId);
76
- if (!(symbol in this.orderbooks)) {
77
- this.orderbooks[symbol] = this.orderBook({});
78
- }
79
- const storedOrderBook = this.orderbooks[symbol];
80
- const nonce = this.safeInteger(storedOrderBook, 'nonce');
81
- const deltaNonce = this.safeInteger(message, 's');
82
- const messageHash = 'orderbook:' + symbol;
83
- if (nonce === undefined) {
84
- const cacheLength = storedOrderBook.cache.length;
85
- const snapshotDelay = this.handleOption('watchOrderBook', 'snapshotDelay', 6);
86
- if (cacheLength === snapshotDelay) {
87
- this.spawn(this.loadOrderBook, client, messageHash, symbol, null, {});
88
- }
89
- storedOrderBook.cache.push(message);
90
- return;
91
- }
92
- else if (nonce >= deltaNonce) {
93
- return;
94
- }
95
- this.handleDelta(storedOrderBook, message);
96
- client.resolve(storedOrderBook, messageHash);
97
- }
98
- handleDelta(orderbook, delta) {
99
- // const timestamp = this.milliseconds (); // todo check if this is correct
100
- // orderbook['timestamp'] = timestamp;
101
- // orderbook['datetime'] = this.iso8601 (timestamp);
102
- orderbook['nonce'] = this.safeInteger(delta, 's');
103
- const data = this.safeDict(delta, 'd', {});
104
- const bids = this.safeDict(data, 'bids', {});
105
- const asks = this.safeDict(data, 'asks', {});
106
- const storedBids = orderbook['bids'];
107
- const storedAsks = orderbook['asks'];
108
- this.handleBidAsks(storedBids, bids);
109
- this.handleBidAsks(storedAsks, asks);
110
- }
111
- handleBidAsks(bookSide, bidAsks) {
112
- const keys = Object.keys(bidAsks);
113
- for (let i = 0; i < keys.length; i++) {
114
- const price = this.safeString(keys, i);
115
- const amount = this.safeNumber(bidAsks, price);
116
- const bidAsk = [this.parseNumber(price), amount];
117
- bookSide.storeArray(bidAsk);
118
- // for (let i = 0; i < bidAsks.length; i++) {
119
- // const bidAsk = this.parseBidAsk (bidAsks[i]);
120
- // bookSide.storeArray (bidAsk);
121
- // }
122
- }
123
- }
124
- getCacheIndex(orderbook, deltas) {
125
- const firstElement = deltas[0];
126
- const firstElementNonce = this.safeInteger(firstElement, 's');
127
- const nonce = this.safeInteger(orderbook, 'nonce');
128
- if (nonce < firstElementNonce) {
129
- return -1;
130
- }
131
- for (let i = 0; i < deltas.length; i++) {
132
- const delta = deltas[i];
133
- const deltaNonce = this.safeInteger(delta, 's');
134
- if (deltaNonce === nonce) {
135
- return i + 1;
136
- }
137
- }
138
- return deltas.length;
139
- }
140
- /**
141
- * @method
142
- * @name tradeogre#watchTrades
143
- * @description watches information on multiple trades made in a market
144
- * @see https://tradeogre.com/help/api
145
- * @param {string} symbol unified market symbol of the market trades were made in
146
- * @param {int} [since] the earliest time in ms to fetch trades for
147
- * @param {int} [limit] the maximum number of trade structures to retrieve
148
- * @param {object} [params] extra parameters specific to the exchange API endpoint
149
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
150
- */
151
- async watchTrades(symbol, since = undefined, limit = undefined, params = {}) {
152
- await this.loadMarkets();
153
- const market = this.market(symbol);
154
- symbol = market['symbol'];
155
- return await this.watchTradesForSymbols([symbol], since, limit, params);
156
- }
157
- /**
158
- * @method
159
- * @name tradeogre#watchTradesForSymbols
160
- * @see https://tradeogre.com/help/api
161
- * @description get the list of most recent trades for a list of symbols
162
- * @param {string[]} symbols unified symbol of the market to fetch trades for (empty array means all markets)
163
- * @param {int} [since] timestamp in ms of the earliest trade to fetch
164
- * @param {int} [limit] the maximum amount of trades to fetch
165
- * @param {object} [params] extra parameters specific to the exchange API endpoint
166
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
167
- */
168
- async watchTradesForSymbols(symbols, since = undefined, limit = undefined, params = {}) {
169
- await this.loadMarkets();
170
- symbols = this.marketSymbols(symbols, undefined, true);
171
- const messageHashes = [];
172
- let symbolsLength = 0;
173
- if (symbols !== undefined) {
174
- symbolsLength = symbols.length;
175
- }
176
- if (symbolsLength > 0) {
177
- for (let i = 0; i < symbols.length; i++) {
178
- const symbol = symbols[i];
179
- const messageHash = 'trades:' + symbol;
180
- messageHashes.push(messageHash);
181
- }
182
- }
183
- else {
184
- const messageHash = 'trades';
185
- messageHashes.push(messageHash);
186
- }
187
- const request = {
188
- 'a': 'subscribe',
189
- 'e': 'trade',
190
- 't': '*',
191
- };
192
- const url = this.urls['api']['ws'];
193
- const trades = await this.watchMultiple(url, messageHashes, this.extend(request, params), ['trades']);
194
- if (this.newUpdates) {
195
- const first = this.safeDict(trades, 0);
196
- const tradeSymbol = this.safeString(first, 'symbol');
197
- limit = trades.getLimit(tradeSymbol, limit);
198
- }
199
- return this.filterBySinceLimit(trades, since, limit, 'timestamp', true);
200
- }
201
- handleTrade(client, message) {
202
- //
203
- // {
204
- // "e": "trade",
205
- // "t": "LTC-USDT",
206
- // "d": {
207
- // "t": 0,
208
- // "p": "84.50000000",
209
- // "q": "1.28471270",
210
- // "d": "1745392002"
211
- // }
212
- // }
213
- //
214
- const marketId = this.safeString(message, 't');
215
- const market = this.safeMarket(marketId);
216
- const data = this.safeDict(message, 'd', {});
217
- const symbol = market['symbol'];
218
- if (!(symbol in this.trades)) {
219
- const limit = this.safeInteger(this.options, 'tradesLimit', 1000);
220
- const stored = new ArrayCache(limit);
221
- this.trades[symbol] = stored;
222
- }
223
- const cache = this.trades[symbol];
224
- const trade = this.parseWsTrade(data, market);
225
- cache.append(trade);
226
- const messageHash = 'trades:' + symbol;
227
- client.resolve(cache, messageHash);
228
- client.resolve(cache, 'trades');
229
- }
230
- parseWsTrade(trade, market = undefined) {
231
- //
232
- // {
233
- // "t": 0,
234
- // "p": "84.50000000",
235
- // "q": "1.28471270",
236
- // "d": "1745392002"
237
- // }
238
- //
239
- const timestamp = this.safeIntegerProduct(trade, 'd', 1000);
240
- const sideEnum = this.safeString(trade, 't');
241
- return this.safeTrade({
242
- 'info': trade,
243
- 'id': undefined,
244
- 'timestamp': timestamp,
245
- 'datetime': this.iso8601(timestamp),
246
- 'symbol': this.safeString(market, 'symbol'),
247
- 'order': undefined,
248
- 'type': undefined,
249
- 'side': this.parseWsTradeSide(sideEnum),
250
- 'takerOrMaker': undefined,
251
- 'price': this.safeString(trade, 'p'),
252
- 'amount': this.safeString(trade, 'q'),
253
- 'cost': undefined,
254
- 'fee': {
255
- 'currency': undefined,
256
- 'cost': undefined,
257
- },
258
- }, market);
259
- }
260
- parseWsTradeSide(side) {
261
- const sides = {
262
- '0': 'buy',
263
- '1': 'sell',
264
- };
265
- return this.safeString(sides, side, side);
266
- }
267
- handleMessage(client, message) {
268
- const methods = {
269
- 'book': this.handleOrderBook,
270
- 'trade': this.handleTrade,
271
- };
272
- const event = this.safeString(message, 'e');
273
- const method = this.safeValue(methods, event);
274
- if (method !== undefined) {
275
- method.call(this, client, message);
276
- }
277
- }
278
- }