|
@@ -0,0 +1,1137 @@
|
|
|
|
|
+/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
|
|
|
|
|
+"use strict";
|
|
|
|
|
+
|
|
|
|
|
+var $protobuf = require("protobufjs/minimal");
|
|
|
|
|
+
|
|
|
|
|
+// Common aliases
|
|
|
|
|
+var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;
|
|
|
|
|
+
|
|
|
|
|
+// Exported root namespace
|
|
|
|
|
+var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
|
|
|
|
|
+
|
|
|
|
|
+$root.market = (function() {
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Namespace market.
|
|
|
|
|
+ * @exports market
|
|
|
|
|
+ * @namespace
|
|
|
|
|
+ */
|
|
|
|
|
+ var market = {};
|
|
|
|
|
+
|
|
|
|
|
+ market.v2 = (function() {
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Namespace v2.
|
|
|
|
|
+ * @memberof market
|
|
|
|
|
+ * @namespace
|
|
|
|
|
+ */
|
|
|
|
|
+ var v2 = {};
|
|
|
|
|
+
|
|
|
|
|
+ v2.trade = (function() {
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Namespace trade.
|
|
|
|
|
+ * @memberof market.v2
|
|
|
|
|
+ * @namespace
|
|
|
|
|
+ */
|
|
|
|
|
+ var trade = {};
|
|
|
|
|
+
|
|
|
|
|
+ trade.area = (function() {
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Namespace area.
|
|
|
|
|
+ * @memberof market.v2.trade
|
|
|
|
|
+ * @namespace
|
|
|
|
|
+ */
|
|
|
|
|
+ var area = {};
|
|
|
|
|
+
|
|
|
|
|
+ area.tickers = (function() {
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Namespace tickers.
|
|
|
|
|
+ * @memberof market.v2.trade.area
|
|
|
|
|
+ * @namespace
|
|
|
|
|
+ */
|
|
|
|
|
+ var tickers = {};
|
|
|
|
|
+
|
|
|
|
|
+ tickers.Response = (function() {
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Properties of a Response.
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers
|
|
|
|
|
+ * @interface IResponse
|
|
|
|
|
+ * @property {number|null} [code] Response code
|
|
|
|
|
+ * @property {string|null} [msg] Response msg
|
|
|
|
|
+ * @property {string|null} [status] Response status
|
|
|
|
|
+ * @property {number|Long|null} [ts] Response ts
|
|
|
|
|
+ * @property {string|null} [ch] Response ch
|
|
|
|
|
+ * @property {market.v2.trade.area.tickers.ITradeAreaPair|null} [tradeareapair] Response tradeareapair
|
|
|
|
|
+ */
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Constructs a new Response.
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers
|
|
|
|
|
+ * @classdesc Represents a Response.
|
|
|
|
|
+ * @implements IResponse
|
|
|
|
|
+ * @constructor
|
|
|
|
|
+ * @param {market.v2.trade.area.tickers.IResponse=} [properties] Properties to set
|
|
|
|
|
+ */
|
|
|
|
|
+ function Response(properties) {
|
|
|
|
|
+ if (properties)
|
|
|
|
|
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
|
|
|
+ if (properties[keys[i]] != null)
|
|
|
|
|
+ this[keys[i]] = properties[keys[i]];
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Response code.
|
|
|
|
|
+ * @member {number} code
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.Response
|
|
|
|
|
+ * @instance
|
|
|
|
|
+ */
|
|
|
|
|
+ Response.prototype.code = 0;
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Response msg.
|
|
|
|
|
+ * @member {string} msg
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.Response
|
|
|
|
|
+ * @instance
|
|
|
|
|
+ */
|
|
|
|
|
+ Response.prototype.msg = "";
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Response status.
|
|
|
|
|
+ * @member {string} status
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.Response
|
|
|
|
|
+ * @instance
|
|
|
|
|
+ */
|
|
|
|
|
+ Response.prototype.status = "";
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Response ts.
|
|
|
|
|
+ * @member {number|Long} ts
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.Response
|
|
|
|
|
+ * @instance
|
|
|
|
|
+ */
|
|
|
|
|
+ Response.prototype.ts = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Response ch.
|
|
|
|
|
+ * @member {string} ch
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.Response
|
|
|
|
|
+ * @instance
|
|
|
|
|
+ */
|
|
|
|
|
+ Response.prototype.ch = "";
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Response tradeareapair.
|
|
|
|
|
+ * @member {market.v2.trade.area.tickers.ITradeAreaPair|null|undefined} tradeareapair
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.Response
|
|
|
|
|
+ * @instance
|
|
|
|
|
+ */
|
|
|
|
|
+ Response.prototype.tradeareapair = null;
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Creates a new Response instance using the specified properties.
|
|
|
|
|
+ * @function create
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.Response
|
|
|
|
|
+ * @static
|
|
|
|
|
+ * @param {market.v2.trade.area.tickers.IResponse=} [properties] Properties to set
|
|
|
|
|
+ * @returns {market.v2.trade.area.tickers.Response} Response instance
|
|
|
|
|
+ */
|
|
|
|
|
+ Response.create = function create(properties) {
|
|
|
|
|
+ return new Response(properties);
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Encodes the specified Response message. Does not implicitly {@link market.v2.trade.area.tickers.Response.verify|verify} messages.
|
|
|
|
|
+ * @function encode
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.Response
|
|
|
|
|
+ * @static
|
|
|
|
|
+ * @param {market.v2.trade.area.tickers.IResponse} message Response message or plain object to encode
|
|
|
|
|
+ * @param {$protobuf.Writer} [writer] Writer to encode to
|
|
|
|
|
+ * @returns {$protobuf.Writer} Writer
|
|
|
|
|
+ */
|
|
|
|
|
+ Response.encode = function encode(message, writer) {
|
|
|
|
|
+ if (!writer)
|
|
|
|
|
+ writer = $Writer.create();
|
|
|
|
|
+ if (message.code != null && Object.hasOwnProperty.call(message, "code"))
|
|
|
|
|
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code);
|
|
|
|
|
+ if (message.msg != null && Object.hasOwnProperty.call(message, "msg"))
|
|
|
|
|
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.msg);
|
|
|
|
|
+ if (message.status != null && Object.hasOwnProperty.call(message, "status"))
|
|
|
|
|
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.status);
|
|
|
|
|
+ if (message.ts != null && Object.hasOwnProperty.call(message, "ts"))
|
|
|
|
|
+ writer.uint32(/* id 4, wireType 0 =*/32).int64(message.ts);
|
|
|
|
|
+ if (message.ch != null && Object.hasOwnProperty.call(message, "ch"))
|
|
|
|
|
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.ch);
|
|
|
|
|
+ if (message.tradeareapair != null && Object.hasOwnProperty.call(message, "tradeareapair"))
|
|
|
|
|
+ $root.market.v2.trade.area.tickers.TradeAreaPair.encode(message.tradeareapair, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
|
|
|
|
+ return writer;
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Encodes the specified Response message, length delimited. Does not implicitly {@link market.v2.trade.area.tickers.Response.verify|verify} messages.
|
|
|
|
|
+ * @function encodeDelimited
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.Response
|
|
|
|
|
+ * @static
|
|
|
|
|
+ * @param {market.v2.trade.area.tickers.IResponse} message Response message or plain object to encode
|
|
|
|
|
+ * @param {$protobuf.Writer} [writer] Writer to encode to
|
|
|
|
|
+ * @returns {$protobuf.Writer} Writer
|
|
|
|
|
+ */
|
|
|
|
|
+ Response.encodeDelimited = function encodeDelimited(message, writer) {
|
|
|
|
|
+ return this.encode(message, writer).ldelim();
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Decodes a Response message from the specified reader or buffer.
|
|
|
|
|
+ * @function decode
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.Response
|
|
|
|
|
+ * @static
|
|
|
|
|
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
|
|
|
+ * @param {number} [length] Message length if known beforehand
|
|
|
|
|
+ * @returns {market.v2.trade.area.tickers.Response} Response
|
|
|
|
|
+ * @throws {Error} If the payload is not a reader or valid buffer
|
|
|
|
|
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
|
|
|
+ */
|
|
|
|
|
+ Response.decode = function decode(reader, length) {
|
|
|
|
|
+ if (!(reader instanceof $Reader))
|
|
|
|
|
+ reader = $Reader.create(reader);
|
|
|
|
|
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.market.v2.trade.area.tickers.Response();
|
|
|
|
|
+ while (reader.pos < end) {
|
|
|
|
|
+ var tag = reader.uint32();
|
|
|
|
|
+ switch (tag >>> 3) {
|
|
|
|
|
+ case 1: {
|
|
|
|
|
+ message.code = reader.int32();
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ case 2: {
|
|
|
|
|
+ message.msg = reader.string();
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ case 3: {
|
|
|
|
|
+ message.status = reader.string();
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ case 4: {
|
|
|
|
|
+ message.ts = reader.int64();
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ case 5: {
|
|
|
|
|
+ message.ch = reader.string();
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ case 6: {
|
|
|
|
|
+ message.tradeareapair = $root.market.v2.trade.area.tickers.TradeAreaPair.decode(reader, reader.uint32());
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ default:
|
|
|
|
|
+ reader.skipType(tag & 7);
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return message;
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Decodes a Response message from the specified reader or buffer, length delimited.
|
|
|
|
|
+ * @function decodeDelimited
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.Response
|
|
|
|
|
+ * @static
|
|
|
|
|
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
|
|
|
+ * @returns {market.v2.trade.area.tickers.Response} Response
|
|
|
|
|
+ * @throws {Error} If the payload is not a reader or valid buffer
|
|
|
|
|
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
|
|
|
+ */
|
|
|
|
|
+ Response.decodeDelimited = function decodeDelimited(reader) {
|
|
|
|
|
+ if (!(reader instanceof $Reader))
|
|
|
|
|
+ reader = new $Reader(reader);
|
|
|
|
|
+ return this.decode(reader, reader.uint32());
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Verifies a Response message.
|
|
|
|
|
+ * @function verify
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.Response
|
|
|
|
|
+ * @static
|
|
|
|
|
+ * @param {Object.<string,*>} message Plain object to verify
|
|
|
|
|
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
|
|
|
+ */
|
|
|
|
|
+ Response.verify = function verify(message) {
|
|
|
|
|
+ if (typeof message !== "object" || message === null)
|
|
|
|
|
+ return "object expected";
|
|
|
|
|
+ if (message.code != null && message.hasOwnProperty("code"))
|
|
|
|
|
+ if (!$util.isInteger(message.code))
|
|
|
|
|
+ return "code: integer expected";
|
|
|
|
|
+ if (message.msg != null && message.hasOwnProperty("msg"))
|
|
|
|
|
+ if (!$util.isString(message.msg))
|
|
|
|
|
+ return "msg: string expected";
|
|
|
|
|
+ if (message.status != null && message.hasOwnProperty("status"))
|
|
|
|
|
+ if (!$util.isString(message.status))
|
|
|
|
|
+ return "status: string expected";
|
|
|
|
|
+ if (message.ts != null && message.hasOwnProperty("ts"))
|
|
|
|
|
+ if (!$util.isInteger(message.ts) && !(message.ts && $util.isInteger(message.ts.low) && $util.isInteger(message.ts.high)))
|
|
|
|
|
+ return "ts: integer|Long expected";
|
|
|
|
|
+ if (message.ch != null && message.hasOwnProperty("ch"))
|
|
|
|
|
+ if (!$util.isString(message.ch))
|
|
|
|
|
+ return "ch: string expected";
|
|
|
|
|
+ if (message.tradeareapair != null && message.hasOwnProperty("tradeareapair")) {
|
|
|
|
|
+ var error = $root.market.v2.trade.area.tickers.TradeAreaPair.verify(message.tradeareapair);
|
|
|
|
|
+ if (error)
|
|
|
|
|
+ return "tradeareapair." + error;
|
|
|
|
|
+ }
|
|
|
|
|
+ return null;
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Creates a Response message from a plain object. Also converts values to their respective internal types.
|
|
|
|
|
+ * @function fromObject
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.Response
|
|
|
|
|
+ * @static
|
|
|
|
|
+ * @param {Object.<string,*>} object Plain object
|
|
|
|
|
+ * @returns {market.v2.trade.area.tickers.Response} Response
|
|
|
|
|
+ */
|
|
|
|
|
+ Response.fromObject = function fromObject(object) {
|
|
|
|
|
+ if (object instanceof $root.market.v2.trade.area.tickers.Response)
|
|
|
|
|
+ return object;
|
|
|
|
|
+ var message = new $root.market.v2.trade.area.tickers.Response();
|
|
|
|
|
+ if (object.code != null)
|
|
|
|
|
+ message.code = object.code | 0;
|
|
|
|
|
+ if (object.msg != null)
|
|
|
|
|
+ message.msg = String(object.msg);
|
|
|
|
|
+ if (object.status != null)
|
|
|
|
|
+ message.status = String(object.status);
|
|
|
|
|
+ if (object.ts != null)
|
|
|
|
|
+ if ($util.Long)
|
|
|
|
|
+ (message.ts = $util.Long.fromValue(object.ts)).unsigned = false;
|
|
|
|
|
+ else if (typeof object.ts === "string")
|
|
|
|
|
+ message.ts = parseInt(object.ts, 10);
|
|
|
|
|
+ else if (typeof object.ts === "number")
|
|
|
|
|
+ message.ts = object.ts;
|
|
|
|
|
+ else if (typeof object.ts === "object")
|
|
|
|
|
+ message.ts = new $util.LongBits(object.ts.low >>> 0, object.ts.high >>> 0).toNumber();
|
|
|
|
|
+ if (object.ch != null)
|
|
|
|
|
+ message.ch = String(object.ch);
|
|
|
|
|
+ if (object.tradeareapair != null) {
|
|
|
|
|
+ if (typeof object.tradeareapair !== "object")
|
|
|
|
|
+ throw TypeError(".market.v2.trade.area.tickers.Response.tradeareapair: object expected");
|
|
|
|
|
+ message.tradeareapair = $root.market.v2.trade.area.tickers.TradeAreaPair.fromObject(object.tradeareapair);
|
|
|
|
|
+ }
|
|
|
|
|
+ return message;
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Creates a plain object from a Response message. Also converts values to other types if specified.
|
|
|
|
|
+ * @function toObject
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.Response
|
|
|
|
|
+ * @static
|
|
|
|
|
+ * @param {market.v2.trade.area.tickers.Response} message Response
|
|
|
|
|
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
|
|
|
+ * @returns {Object.<string,*>} Plain object
|
|
|
|
|
+ */
|
|
|
|
|
+ Response.toObject = function toObject(message, options) {
|
|
|
|
|
+ if (!options)
|
|
|
|
|
+ options = {};
|
|
|
|
|
+ var object = {};
|
|
|
|
|
+ if (options.defaults) {
|
|
|
|
|
+ object.code = 0;
|
|
|
|
|
+ object.msg = "";
|
|
|
|
|
+ object.status = "";
|
|
|
|
|
+ if ($util.Long) {
|
|
|
|
|
+ var long = new $util.Long(0, 0, false);
|
|
|
|
|
+ object.ts = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
|
|
|
+ } else
|
|
|
|
|
+ object.ts = options.longs === String ? "0" : 0;
|
|
|
|
|
+ object.ch = "";
|
|
|
|
|
+ object.tradeareapair = null;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (message.code != null && message.hasOwnProperty("code"))
|
|
|
|
|
+ object.code = message.code;
|
|
|
|
|
+ if (message.msg != null && message.hasOwnProperty("msg"))
|
|
|
|
|
+ object.msg = message.msg;
|
|
|
|
|
+ if (message.status != null && message.hasOwnProperty("status"))
|
|
|
|
|
+ object.status = message.status;
|
|
|
|
|
+ if (message.ts != null && message.hasOwnProperty("ts"))
|
|
|
|
|
+ if (typeof message.ts === "number")
|
|
|
|
|
+ object.ts = options.longs === String ? String(message.ts) : message.ts;
|
|
|
|
|
+ else
|
|
|
|
|
+ object.ts = options.longs === String ? $util.Long.prototype.toString.call(message.ts) : options.longs === Number ? new $util.LongBits(message.ts.low >>> 0, message.ts.high >>> 0).toNumber() : message.ts;
|
|
|
|
|
+ if (message.ch != null && message.hasOwnProperty("ch"))
|
|
|
|
|
+ object.ch = message.ch;
|
|
|
|
|
+ if (message.tradeareapair != null && message.hasOwnProperty("tradeareapair"))
|
|
|
|
|
+ object.tradeareapair = $root.market.v2.trade.area.tickers.TradeAreaPair.toObject(message.tradeareapair, options);
|
|
|
|
|
+ return object;
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Converts this Response to JSON.
|
|
|
|
|
+ * @function toJSON
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.Response
|
|
|
|
|
+ * @instance
|
|
|
|
|
+ * @returns {Object.<string,*>} JSON object
|
|
|
|
|
+ */
|
|
|
|
|
+ Response.prototype.toJSON = function toJSON() {
|
|
|
|
|
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Gets the default type url for Response
|
|
|
|
|
+ * @function getTypeUrl
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.Response
|
|
|
|
|
+ * @static
|
|
|
|
|
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
|
|
|
+ * @returns {string} The default type url
|
|
|
|
|
+ */
|
|
|
|
|
+ Response.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
|
|
|
+ if (typeUrlPrefix === undefined) {
|
|
|
|
|
+ typeUrlPrefix = "type.googleapis.com";
|
|
|
|
|
+ }
|
|
|
|
|
+ return typeUrlPrefix + "/market.v2.trade.area.tickers.Response";
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ return Response;
|
|
|
|
|
+ })();
|
|
|
|
|
+
|
|
|
|
|
+ tickers.TradeAreaPair = (function() {
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Properties of a TradeAreaPair.
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers
|
|
|
|
|
+ * @interface ITradeAreaPair
|
|
|
|
|
+ * @property {Array.<market.v2.trade.area.tickers.ITradeArea>|null} [tradeidList] TradeAreaPair tradeidList
|
|
|
|
|
+ */
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Constructs a new TradeAreaPair.
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers
|
|
|
|
|
+ * @classdesc Represents a TradeAreaPair.
|
|
|
|
|
+ * @implements ITradeAreaPair
|
|
|
|
|
+ * @constructor
|
|
|
|
|
+ * @param {market.v2.trade.area.tickers.ITradeAreaPair=} [properties] Properties to set
|
|
|
|
|
+ */
|
|
|
|
|
+ function TradeAreaPair(properties) {
|
|
|
|
|
+ this.tradeidList = [];
|
|
|
|
|
+ if (properties)
|
|
|
|
|
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
|
|
|
+ if (properties[keys[i]] != null)
|
|
|
|
|
+ this[keys[i]] = properties[keys[i]];
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * TradeAreaPair tradeidList.
|
|
|
|
|
+ * @member {Array.<market.v2.trade.area.tickers.ITradeArea>} tradeidList
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeAreaPair
|
|
|
|
|
+ * @instance
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeAreaPair.prototype.tradeidList = $util.emptyArray;
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Creates a new TradeAreaPair instance using the specified properties.
|
|
|
|
|
+ * @function create
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeAreaPair
|
|
|
|
|
+ * @static
|
|
|
|
|
+ * @param {market.v2.trade.area.tickers.ITradeAreaPair=} [properties] Properties to set
|
|
|
|
|
+ * @returns {market.v2.trade.area.tickers.TradeAreaPair} TradeAreaPair instance
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeAreaPair.create = function create(properties) {
|
|
|
|
|
+ return new TradeAreaPair(properties);
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Encodes the specified TradeAreaPair message. Does not implicitly {@link market.v2.trade.area.tickers.TradeAreaPair.verify|verify} messages.
|
|
|
|
|
+ * @function encode
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeAreaPair
|
|
|
|
|
+ * @static
|
|
|
|
|
+ * @param {market.v2.trade.area.tickers.ITradeAreaPair} message TradeAreaPair message or plain object to encode
|
|
|
|
|
+ * @param {$protobuf.Writer} [writer] Writer to encode to
|
|
|
|
|
+ * @returns {$protobuf.Writer} Writer
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeAreaPair.encode = function encode(message, writer) {
|
|
|
|
|
+ if (!writer)
|
|
|
|
|
+ writer = $Writer.create();
|
|
|
|
|
+ if (message.tradeidList != null && message.tradeidList.length)
|
|
|
|
|
+ for (var i = 0; i < message.tradeidList.length; ++i)
|
|
|
|
|
+ $root.market.v2.trade.area.tickers.TradeArea.encode(message.tradeidList[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
|
|
|
+ return writer;
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Encodes the specified TradeAreaPair message, length delimited. Does not implicitly {@link market.v2.trade.area.tickers.TradeAreaPair.verify|verify} messages.
|
|
|
|
|
+ * @function encodeDelimited
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeAreaPair
|
|
|
|
|
+ * @static
|
|
|
|
|
+ * @param {market.v2.trade.area.tickers.ITradeAreaPair} message TradeAreaPair message or plain object to encode
|
|
|
|
|
+ * @param {$protobuf.Writer} [writer] Writer to encode to
|
|
|
|
|
+ * @returns {$protobuf.Writer} Writer
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeAreaPair.encodeDelimited = function encodeDelimited(message, writer) {
|
|
|
|
|
+ return this.encode(message, writer).ldelim();
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Decodes a TradeAreaPair message from the specified reader or buffer.
|
|
|
|
|
+ * @function decode
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeAreaPair
|
|
|
|
|
+ * @static
|
|
|
|
|
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
|
|
|
+ * @param {number} [length] Message length if known beforehand
|
|
|
|
|
+ * @returns {market.v2.trade.area.tickers.TradeAreaPair} TradeAreaPair
|
|
|
|
|
+ * @throws {Error} If the payload is not a reader or valid buffer
|
|
|
|
|
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeAreaPair.decode = function decode(reader, length) {
|
|
|
|
|
+ if (!(reader instanceof $Reader))
|
|
|
|
|
+ reader = $Reader.create(reader);
|
|
|
|
|
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.market.v2.trade.area.tickers.TradeAreaPair();
|
|
|
|
|
+ while (reader.pos < end) {
|
|
|
|
|
+ var tag = reader.uint32();
|
|
|
|
|
+ switch (tag >>> 3) {
|
|
|
|
|
+ case 1: {
|
|
|
|
|
+ if (!(message.tradeidList && message.tradeidList.length))
|
|
|
|
|
+ message.tradeidList = [];
|
|
|
|
|
+ message.tradeidList.push($root.market.v2.trade.area.tickers.TradeArea.decode(reader, reader.uint32()));
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ default:
|
|
|
|
|
+ reader.skipType(tag & 7);
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return message;
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Decodes a TradeAreaPair message from the specified reader or buffer, length delimited.
|
|
|
|
|
+ * @function decodeDelimited
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeAreaPair
|
|
|
|
|
+ * @static
|
|
|
|
|
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
|
|
|
+ * @returns {market.v2.trade.area.tickers.TradeAreaPair} TradeAreaPair
|
|
|
|
|
+ * @throws {Error} If the payload is not a reader or valid buffer
|
|
|
|
|
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeAreaPair.decodeDelimited = function decodeDelimited(reader) {
|
|
|
|
|
+ if (!(reader instanceof $Reader))
|
|
|
|
|
+ reader = new $Reader(reader);
|
|
|
|
|
+ return this.decode(reader, reader.uint32());
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Verifies a TradeAreaPair message.
|
|
|
|
|
+ * @function verify
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeAreaPair
|
|
|
|
|
+ * @static
|
|
|
|
|
+ * @param {Object.<string,*>} message Plain object to verify
|
|
|
|
|
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeAreaPair.verify = function verify(message) {
|
|
|
|
|
+ if (typeof message !== "object" || message === null)
|
|
|
|
|
+ return "object expected";
|
|
|
|
|
+ if (message.tradeidList != null && message.hasOwnProperty("tradeidList")) {
|
|
|
|
|
+ if (!Array.isArray(message.tradeidList))
|
|
|
|
|
+ return "tradeidList: array expected";
|
|
|
|
|
+ for (var i = 0; i < message.tradeidList.length; ++i) {
|
|
|
|
|
+ var error = $root.market.v2.trade.area.tickers.TradeArea.verify(message.tradeidList[i]);
|
|
|
|
|
+ if (error)
|
|
|
|
|
+ return "tradeidList." + error;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return null;
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Creates a TradeAreaPair message from a plain object. Also converts values to their respective internal types.
|
|
|
|
|
+ * @function fromObject
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeAreaPair
|
|
|
|
|
+ * @static
|
|
|
|
|
+ * @param {Object.<string,*>} object Plain object
|
|
|
|
|
+ * @returns {market.v2.trade.area.tickers.TradeAreaPair} TradeAreaPair
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeAreaPair.fromObject = function fromObject(object) {
|
|
|
|
|
+ if (object instanceof $root.market.v2.trade.area.tickers.TradeAreaPair)
|
|
|
|
|
+ return object;
|
|
|
|
|
+ var message = new $root.market.v2.trade.area.tickers.TradeAreaPair();
|
|
|
|
|
+ if (object.tradeidList) {
|
|
|
|
|
+ if (!Array.isArray(object.tradeidList))
|
|
|
|
|
+ throw TypeError(".market.v2.trade.area.tickers.TradeAreaPair.tradeidList: array expected");
|
|
|
|
|
+ message.tradeidList = [];
|
|
|
|
|
+ for (var i = 0; i < object.tradeidList.length; ++i) {
|
|
|
|
|
+ if (typeof object.tradeidList[i] !== "object")
|
|
|
|
|
+ throw TypeError(".market.v2.trade.area.tickers.TradeAreaPair.tradeidList: object expected");
|
|
|
|
|
+ message.tradeidList[i] = $root.market.v2.trade.area.tickers.TradeArea.fromObject(object.tradeidList[i]);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return message;
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Creates a plain object from a TradeAreaPair message. Also converts values to other types if specified.
|
|
|
|
|
+ * @function toObject
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeAreaPair
|
|
|
|
|
+ * @static
|
|
|
|
|
+ * @param {market.v2.trade.area.tickers.TradeAreaPair} message TradeAreaPair
|
|
|
|
|
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
|
|
|
+ * @returns {Object.<string,*>} Plain object
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeAreaPair.toObject = function toObject(message, options) {
|
|
|
|
|
+ if (!options)
|
|
|
|
|
+ options = {};
|
|
|
|
|
+ var object = {};
|
|
|
|
|
+ if (options.arrays || options.defaults)
|
|
|
|
|
+ object.tradeidList = [];
|
|
|
|
|
+ if (message.tradeidList && message.tradeidList.length) {
|
|
|
|
|
+ object.tradeidList = [];
|
|
|
|
|
+ for (var j = 0; j < message.tradeidList.length; ++j)
|
|
|
|
|
+ object.tradeidList[j] = $root.market.v2.trade.area.tickers.TradeArea.toObject(message.tradeidList[j], options);
|
|
|
|
|
+ }
|
|
|
|
|
+ return object;
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Converts this TradeAreaPair to JSON.
|
|
|
|
|
+ * @function toJSON
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeAreaPair
|
|
|
|
|
+ * @instance
|
|
|
|
|
+ * @returns {Object.<string,*>} JSON object
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeAreaPair.prototype.toJSON = function toJSON() {
|
|
|
|
|
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Gets the default type url for TradeAreaPair
|
|
|
|
|
+ * @function getTypeUrl
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeAreaPair
|
|
|
|
|
+ * @static
|
|
|
|
|
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
|
|
|
+ * @returns {string} The default type url
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeAreaPair.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
|
|
|
+ if (typeUrlPrefix === undefined) {
|
|
|
|
|
+ typeUrlPrefix = "type.googleapis.com";
|
|
|
|
|
+ }
|
|
|
|
|
+ return typeUrlPrefix + "/market.v2.trade.area.tickers.TradeAreaPair";
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ return TradeAreaPair;
|
|
|
|
|
+ })();
|
|
|
|
|
+
|
|
|
|
|
+ tickers.TradeArea = (function() {
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Properties of a TradeArea.
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers
|
|
|
|
|
+ * @interface ITradeArea
|
|
|
|
|
+ * @property {number|null} [tradeid] TradeArea tradeid
|
|
|
|
|
+ * @property {string|null} [cny] TradeArea cny
|
|
|
|
|
+ * @property {string|null} [buy] TradeArea buy
|
|
|
|
|
+ * @property {string|null} [lever] TradeArea lever
|
|
|
|
|
+ * @property {string|null} [sell] TradeArea sell
|
|
|
|
|
+ * @property {string|null} [last] TradeArea last
|
|
|
|
|
+ * @property {string|null} [volume] TradeArea volume
|
|
|
|
|
+ * @property {string|null} [change] TradeArea change
|
|
|
|
|
+ * @property {string|null} [high] TradeArea high
|
|
|
|
|
+ * @property {string|null} [low] TradeArea low
|
|
|
|
|
+ * @property {string|null} [isopen] TradeArea isopen
|
|
|
|
|
+ * @property {number|null} [open] TradeArea open
|
|
|
|
|
+ * @property {string|null} [amount] TradeArea amount
|
|
|
|
|
+ * @property {boolean|null} [isfiatconvert] TradeArea isfiatconvert
|
|
|
|
|
+ */
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Constructs a new TradeArea.
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers
|
|
|
|
|
+ * @classdesc Represents a TradeArea.
|
|
|
|
|
+ * @implements ITradeArea
|
|
|
|
|
+ * @constructor
|
|
|
|
|
+ * @param {market.v2.trade.area.tickers.ITradeArea=} [properties] Properties to set
|
|
|
|
|
+ */
|
|
|
|
|
+ function TradeArea(properties) {
|
|
|
|
|
+ if (properties)
|
|
|
|
|
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
|
|
|
+ if (properties[keys[i]] != null)
|
|
|
|
|
+ this[keys[i]] = properties[keys[i]];
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * TradeArea tradeid.
|
|
|
|
|
+ * @member {number} tradeid
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeArea
|
|
|
|
|
+ * @instance
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeArea.prototype.tradeid = 0;
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * TradeArea cny.
|
|
|
|
|
+ * @member {string} cny
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeArea
|
|
|
|
|
+ * @instance
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeArea.prototype.cny = "";
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * TradeArea buy.
|
|
|
|
|
+ * @member {string} buy
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeArea
|
|
|
|
|
+ * @instance
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeArea.prototype.buy = "";
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * TradeArea lever.
|
|
|
|
|
+ * @member {string} lever
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeArea
|
|
|
|
|
+ * @instance
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeArea.prototype.lever = "";
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * TradeArea sell.
|
|
|
|
|
+ * @member {string} sell
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeArea
|
|
|
|
|
+ * @instance
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeArea.prototype.sell = "";
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * TradeArea last.
|
|
|
|
|
+ * @member {string} last
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeArea
|
|
|
|
|
+ * @instance
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeArea.prototype.last = "";
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * TradeArea volume.
|
|
|
|
|
+ * @member {string} volume
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeArea
|
|
|
|
|
+ * @instance
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeArea.prototype.volume = "";
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * TradeArea change.
|
|
|
|
|
+ * @member {string} change
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeArea
|
|
|
|
|
+ * @instance
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeArea.prototype.change = "";
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * TradeArea high.
|
|
|
|
|
+ * @member {string} high
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeArea
|
|
|
|
|
+ * @instance
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeArea.prototype.high = "";
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * TradeArea low.
|
|
|
|
|
+ * @member {string} low
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeArea
|
|
|
|
|
+ * @instance
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeArea.prototype.low = "";
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * TradeArea isopen.
|
|
|
|
|
+ * @member {string} isopen
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeArea
|
|
|
|
|
+ * @instance
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeArea.prototype.isopen = "";
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * TradeArea open.
|
|
|
|
|
+ * @member {number} open
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeArea
|
|
|
|
|
+ * @instance
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeArea.prototype.open = 0;
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * TradeArea amount.
|
|
|
|
|
+ * @member {string} amount
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeArea
|
|
|
|
|
+ * @instance
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeArea.prototype.amount = "";
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * TradeArea isfiatconvert.
|
|
|
|
|
+ * @member {boolean} isfiatconvert
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeArea
|
|
|
|
|
+ * @instance
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeArea.prototype.isfiatconvert = false;
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Creates a new TradeArea instance using the specified properties.
|
|
|
|
|
+ * @function create
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeArea
|
|
|
|
|
+ * @static
|
|
|
|
|
+ * @param {market.v2.trade.area.tickers.ITradeArea=} [properties] Properties to set
|
|
|
|
|
+ * @returns {market.v2.trade.area.tickers.TradeArea} TradeArea instance
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeArea.create = function create(properties) {
|
|
|
|
|
+ return new TradeArea(properties);
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Encodes the specified TradeArea message. Does not implicitly {@link market.v2.trade.area.tickers.TradeArea.verify|verify} messages.
|
|
|
|
|
+ * @function encode
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeArea
|
|
|
|
|
+ * @static
|
|
|
|
|
+ * @param {market.v2.trade.area.tickers.ITradeArea} message TradeArea message or plain object to encode
|
|
|
|
|
+ * @param {$protobuf.Writer} [writer] Writer to encode to
|
|
|
|
|
+ * @returns {$protobuf.Writer} Writer
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeArea.encode = function encode(message, writer) {
|
|
|
|
|
+ if (!writer)
|
|
|
|
|
+ writer = $Writer.create();
|
|
|
|
|
+ if (message.tradeid != null && Object.hasOwnProperty.call(message, "tradeid"))
|
|
|
|
|
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.tradeid);
|
|
|
|
|
+ if (message.cny != null && Object.hasOwnProperty.call(message, "cny"))
|
|
|
|
|
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.cny);
|
|
|
|
|
+ if (message.buy != null && Object.hasOwnProperty.call(message, "buy"))
|
|
|
|
|
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.buy);
|
|
|
|
|
+ if (message.lever != null && Object.hasOwnProperty.call(message, "lever"))
|
|
|
|
|
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.lever);
|
|
|
|
|
+ if (message.sell != null && Object.hasOwnProperty.call(message, "sell"))
|
|
|
|
|
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.sell);
|
|
|
|
|
+ if (message.last != null && Object.hasOwnProperty.call(message, "last"))
|
|
|
|
|
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.last);
|
|
|
|
|
+ if (message.volume != null && Object.hasOwnProperty.call(message, "volume"))
|
|
|
|
|
+ writer.uint32(/* id 7, wireType 2 =*/58).string(message.volume);
|
|
|
|
|
+ if (message.change != null && Object.hasOwnProperty.call(message, "change"))
|
|
|
|
|
+ writer.uint32(/* id 8, wireType 2 =*/66).string(message.change);
|
|
|
|
|
+ if (message.high != null && Object.hasOwnProperty.call(message, "high"))
|
|
|
|
|
+ writer.uint32(/* id 9, wireType 2 =*/74).string(message.high);
|
|
|
|
|
+ if (message.low != null && Object.hasOwnProperty.call(message, "low"))
|
|
|
|
|
+ writer.uint32(/* id 10, wireType 2 =*/82).string(message.low);
|
|
|
|
|
+ if (message.isopen != null && Object.hasOwnProperty.call(message, "isopen"))
|
|
|
|
|
+ writer.uint32(/* id 11, wireType 2 =*/90).string(message.isopen);
|
|
|
|
|
+ if (message.open != null && Object.hasOwnProperty.call(message, "open"))
|
|
|
|
|
+ writer.uint32(/* id 12, wireType 0 =*/96).int32(message.open);
|
|
|
|
|
+ if (message.amount != null && Object.hasOwnProperty.call(message, "amount"))
|
|
|
|
|
+ writer.uint32(/* id 13, wireType 2 =*/106).string(message.amount);
|
|
|
|
|
+ if (message.isfiatconvert != null && Object.hasOwnProperty.call(message, "isfiatconvert"))
|
|
|
|
|
+ writer.uint32(/* id 14, wireType 0 =*/112).bool(message.isfiatconvert);
|
|
|
|
|
+ return writer;
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Encodes the specified TradeArea message, length delimited. Does not implicitly {@link market.v2.trade.area.tickers.TradeArea.verify|verify} messages.
|
|
|
|
|
+ * @function encodeDelimited
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeArea
|
|
|
|
|
+ * @static
|
|
|
|
|
+ * @param {market.v2.trade.area.tickers.ITradeArea} message TradeArea message or plain object to encode
|
|
|
|
|
+ * @param {$protobuf.Writer} [writer] Writer to encode to
|
|
|
|
|
+ * @returns {$protobuf.Writer} Writer
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeArea.encodeDelimited = function encodeDelimited(message, writer) {
|
|
|
|
|
+ return this.encode(message, writer).ldelim();
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Decodes a TradeArea message from the specified reader or buffer.
|
|
|
|
|
+ * @function decode
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeArea
|
|
|
|
|
+ * @static
|
|
|
|
|
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
|
|
|
+ * @param {number} [length] Message length if known beforehand
|
|
|
|
|
+ * @returns {market.v2.trade.area.tickers.TradeArea} TradeArea
|
|
|
|
|
+ * @throws {Error} If the payload is not a reader or valid buffer
|
|
|
|
|
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeArea.decode = function decode(reader, length) {
|
|
|
|
|
+ if (!(reader instanceof $Reader))
|
|
|
|
|
+ reader = $Reader.create(reader);
|
|
|
|
|
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.market.v2.trade.area.tickers.TradeArea();
|
|
|
|
|
+ while (reader.pos < end) {
|
|
|
|
|
+ var tag = reader.uint32();
|
|
|
|
|
+ switch (tag >>> 3) {
|
|
|
|
|
+ case 1: {
|
|
|
|
|
+ message.tradeid = reader.int32();
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ case 2: {
|
|
|
|
|
+ message.cny = reader.string();
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ case 3: {
|
|
|
|
|
+ message.buy = reader.string();
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ case 4: {
|
|
|
|
|
+ message.lever = reader.string();
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ case 5: {
|
|
|
|
|
+ message.sell = reader.string();
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ case 6: {
|
|
|
|
|
+ message.last = reader.string();
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ case 7: {
|
|
|
|
|
+ message.volume = reader.string();
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ case 8: {
|
|
|
|
|
+ message.change = reader.string();
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ case 9: {
|
|
|
|
|
+ message.high = reader.string();
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ case 10: {
|
|
|
|
|
+ message.low = reader.string();
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ case 11: {
|
|
|
|
|
+ message.isopen = reader.string();
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ case 12: {
|
|
|
|
|
+ message.open = reader.int32();
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ case 13: {
|
|
|
|
|
+ message.amount = reader.string();
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ case 14: {
|
|
|
|
|
+ message.isfiatconvert = reader.bool();
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ default:
|
|
|
|
|
+ reader.skipType(tag & 7);
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return message;
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Decodes a TradeArea message from the specified reader or buffer, length delimited.
|
|
|
|
|
+ * @function decodeDelimited
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeArea
|
|
|
|
|
+ * @static
|
|
|
|
|
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
|
|
|
+ * @returns {market.v2.trade.area.tickers.TradeArea} TradeArea
|
|
|
|
|
+ * @throws {Error} If the payload is not a reader or valid buffer
|
|
|
|
|
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeArea.decodeDelimited = function decodeDelimited(reader) {
|
|
|
|
|
+ if (!(reader instanceof $Reader))
|
|
|
|
|
+ reader = new $Reader(reader);
|
|
|
|
|
+ return this.decode(reader, reader.uint32());
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Verifies a TradeArea message.
|
|
|
|
|
+ * @function verify
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeArea
|
|
|
|
|
+ * @static
|
|
|
|
|
+ * @param {Object.<string,*>} message Plain object to verify
|
|
|
|
|
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeArea.verify = function verify(message) {
|
|
|
|
|
+ if (typeof message !== "object" || message === null)
|
|
|
|
|
+ return "object expected";
|
|
|
|
|
+ if (message.tradeid != null && message.hasOwnProperty("tradeid"))
|
|
|
|
|
+ if (!$util.isInteger(message.tradeid))
|
|
|
|
|
+ return "tradeid: integer expected";
|
|
|
|
|
+ if (message.cny != null && message.hasOwnProperty("cny"))
|
|
|
|
|
+ if (!$util.isString(message.cny))
|
|
|
|
|
+ return "cny: string expected";
|
|
|
|
|
+ if (message.buy != null && message.hasOwnProperty("buy"))
|
|
|
|
|
+ if (!$util.isString(message.buy))
|
|
|
|
|
+ return "buy: string expected";
|
|
|
|
|
+ if (message.lever != null && message.hasOwnProperty("lever"))
|
|
|
|
|
+ if (!$util.isString(message.lever))
|
|
|
|
|
+ return "lever: string expected";
|
|
|
|
|
+ if (message.sell != null && message.hasOwnProperty("sell"))
|
|
|
|
|
+ if (!$util.isString(message.sell))
|
|
|
|
|
+ return "sell: string expected";
|
|
|
|
|
+ if (message.last != null && message.hasOwnProperty("last"))
|
|
|
|
|
+ if (!$util.isString(message.last))
|
|
|
|
|
+ return "last: string expected";
|
|
|
|
|
+ if (message.volume != null && message.hasOwnProperty("volume"))
|
|
|
|
|
+ if (!$util.isString(message.volume))
|
|
|
|
|
+ return "volume: string expected";
|
|
|
|
|
+ if (message.change != null && message.hasOwnProperty("change"))
|
|
|
|
|
+ if (!$util.isString(message.change))
|
|
|
|
|
+ return "change: string expected";
|
|
|
|
|
+ if (message.high != null && message.hasOwnProperty("high"))
|
|
|
|
|
+ if (!$util.isString(message.high))
|
|
|
|
|
+ return "high: string expected";
|
|
|
|
|
+ if (message.low != null && message.hasOwnProperty("low"))
|
|
|
|
|
+ if (!$util.isString(message.low))
|
|
|
|
|
+ return "low: string expected";
|
|
|
|
|
+ if (message.isopen != null && message.hasOwnProperty("isopen"))
|
|
|
|
|
+ if (!$util.isString(message.isopen))
|
|
|
|
|
+ return "isopen: string expected";
|
|
|
|
|
+ if (message.open != null && message.hasOwnProperty("open"))
|
|
|
|
|
+ if (!$util.isInteger(message.open))
|
|
|
|
|
+ return "open: integer expected";
|
|
|
|
|
+ if (message.amount != null && message.hasOwnProperty("amount"))
|
|
|
|
|
+ if (!$util.isString(message.amount))
|
|
|
|
|
+ return "amount: string expected";
|
|
|
|
|
+ if (message.isfiatconvert != null && message.hasOwnProperty("isfiatconvert"))
|
|
|
|
|
+ if (typeof message.isfiatconvert !== "boolean")
|
|
|
|
|
+ return "isfiatconvert: boolean expected";
|
|
|
|
|
+ return null;
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Creates a TradeArea message from a plain object. Also converts values to their respective internal types.
|
|
|
|
|
+ * @function fromObject
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeArea
|
|
|
|
|
+ * @static
|
|
|
|
|
+ * @param {Object.<string,*>} object Plain object
|
|
|
|
|
+ * @returns {market.v2.trade.area.tickers.TradeArea} TradeArea
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeArea.fromObject = function fromObject(object) {
|
|
|
|
|
+ if (object instanceof $root.market.v2.trade.area.tickers.TradeArea)
|
|
|
|
|
+ return object;
|
|
|
|
|
+ var message = new $root.market.v2.trade.area.tickers.TradeArea();
|
|
|
|
|
+ if (object.tradeid != null)
|
|
|
|
|
+ message.tradeid = object.tradeid | 0;
|
|
|
|
|
+ if (object.cny != null)
|
|
|
|
|
+ message.cny = String(object.cny);
|
|
|
|
|
+ if (object.buy != null)
|
|
|
|
|
+ message.buy = String(object.buy);
|
|
|
|
|
+ if (object.lever != null)
|
|
|
|
|
+ message.lever = String(object.lever);
|
|
|
|
|
+ if (object.sell != null)
|
|
|
|
|
+ message.sell = String(object.sell);
|
|
|
|
|
+ if (object.last != null)
|
|
|
|
|
+ message.last = String(object.last);
|
|
|
|
|
+ if (object.volume != null)
|
|
|
|
|
+ message.volume = String(object.volume);
|
|
|
|
|
+ if (object.change != null)
|
|
|
|
|
+ message.change = String(object.change);
|
|
|
|
|
+ if (object.high != null)
|
|
|
|
|
+ message.high = String(object.high);
|
|
|
|
|
+ if (object.low != null)
|
|
|
|
|
+ message.low = String(object.low);
|
|
|
|
|
+ if (object.isopen != null)
|
|
|
|
|
+ message.isopen = String(object.isopen);
|
|
|
|
|
+ if (object.open != null)
|
|
|
|
|
+ message.open = object.open | 0;
|
|
|
|
|
+ if (object.amount != null)
|
|
|
|
|
+ message.amount = String(object.amount);
|
|
|
|
|
+ if (object.isfiatconvert != null)
|
|
|
|
|
+ message.isfiatconvert = Boolean(object.isfiatconvert);
|
|
|
|
|
+ return message;
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Creates a plain object from a TradeArea message. Also converts values to other types if specified.
|
|
|
|
|
+ * @function toObject
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeArea
|
|
|
|
|
+ * @static
|
|
|
|
|
+ * @param {market.v2.trade.area.tickers.TradeArea} message TradeArea
|
|
|
|
|
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
|
|
|
+ * @returns {Object.<string,*>} Plain object
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeArea.toObject = function toObject(message, options) {
|
|
|
|
|
+ if (!options)
|
|
|
|
|
+ options = {};
|
|
|
|
|
+ var object = {};
|
|
|
|
|
+ if (options.defaults) {
|
|
|
|
|
+ object.tradeid = 0;
|
|
|
|
|
+ object.cny = "";
|
|
|
|
|
+ object.buy = "";
|
|
|
|
|
+ object.lever = "";
|
|
|
|
|
+ object.sell = "";
|
|
|
|
|
+ object.last = "";
|
|
|
|
|
+ object.volume = "";
|
|
|
|
|
+ object.change = "";
|
|
|
|
|
+ object.high = "";
|
|
|
|
|
+ object.low = "";
|
|
|
|
|
+ object.isopen = "";
|
|
|
|
|
+ object.open = 0;
|
|
|
|
|
+ object.amount = "";
|
|
|
|
|
+ object.isfiatconvert = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (message.tradeid != null && message.hasOwnProperty("tradeid"))
|
|
|
|
|
+ object.tradeid = message.tradeid;
|
|
|
|
|
+ if (message.cny != null && message.hasOwnProperty("cny"))
|
|
|
|
|
+ object.cny = message.cny;
|
|
|
|
|
+ if (message.buy != null && message.hasOwnProperty("buy"))
|
|
|
|
|
+ object.buy = message.buy;
|
|
|
|
|
+ if (message.lever != null && message.hasOwnProperty("lever"))
|
|
|
|
|
+ object.lever = message.lever;
|
|
|
|
|
+ if (message.sell != null && message.hasOwnProperty("sell"))
|
|
|
|
|
+ object.sell = message.sell;
|
|
|
|
|
+ if (message.last != null && message.hasOwnProperty("last"))
|
|
|
|
|
+ object.last = message.last;
|
|
|
|
|
+ if (message.volume != null && message.hasOwnProperty("volume"))
|
|
|
|
|
+ object.volume = message.volume;
|
|
|
|
|
+ if (message.change != null && message.hasOwnProperty("change"))
|
|
|
|
|
+ object.change = message.change;
|
|
|
|
|
+ if (message.high != null && message.hasOwnProperty("high"))
|
|
|
|
|
+ object.high = message.high;
|
|
|
|
|
+ if (message.low != null && message.hasOwnProperty("low"))
|
|
|
|
|
+ object.low = message.low;
|
|
|
|
|
+ if (message.isopen != null && message.hasOwnProperty("isopen"))
|
|
|
|
|
+ object.isopen = message.isopen;
|
|
|
|
|
+ if (message.open != null && message.hasOwnProperty("open"))
|
|
|
|
|
+ object.open = message.open;
|
|
|
|
|
+ if (message.amount != null && message.hasOwnProperty("amount"))
|
|
|
|
|
+ object.amount = message.amount;
|
|
|
|
|
+ if (message.isfiatconvert != null && message.hasOwnProperty("isfiatconvert"))
|
|
|
|
|
+ object.isfiatconvert = message.isfiatconvert;
|
|
|
|
|
+ return object;
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Converts this TradeArea to JSON.
|
|
|
|
|
+ * @function toJSON
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeArea
|
|
|
|
|
+ * @instance
|
|
|
|
|
+ * @returns {Object.<string,*>} JSON object
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeArea.prototype.toJSON = function toJSON() {
|
|
|
|
|
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Gets the default type url for TradeArea
|
|
|
|
|
+ * @function getTypeUrl
|
|
|
|
|
+ * @memberof market.v2.trade.area.tickers.TradeArea
|
|
|
|
|
+ * @static
|
|
|
|
|
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
|
|
|
+ * @returns {string} The default type url
|
|
|
|
|
+ */
|
|
|
|
|
+ TradeArea.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
|
|
|
+ if (typeUrlPrefix === undefined) {
|
|
|
|
|
+ typeUrlPrefix = "type.googleapis.com";
|
|
|
|
|
+ }
|
|
|
|
|
+ return typeUrlPrefix + "/market.v2.trade.area.tickers.TradeArea";
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ return TradeArea;
|
|
|
|
|
+ })();
|
|
|
|
|
+
|
|
|
|
|
+ return tickers;
|
|
|
|
|
+ })();
|
|
|
|
|
+
|
|
|
|
|
+ return area;
|
|
|
|
|
+ })();
|
|
|
|
|
+
|
|
|
|
|
+ return trade;
|
|
|
|
|
+ })();
|
|
|
|
|
+
|
|
|
|
|
+ return v2;
|
|
|
|
|
+ })();
|
|
|
|
|
+
|
|
|
|
|
+ return market;
|
|
|
|
|
+})();
|
|
|
|
|
+
|
|
|
|
|
+module.exports = $root;
|