ccxt
Version:
1 lines • 96.8 kB
JavaScript
"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