浏览代码

coinw 添加数据实例

xiao.qiang 11 月之前
父节点
当前提交
c7961c369a

文件差异内容过多而无法显示
+ 0 - 59
client/api.js


+ 0 - 1096
client/bitget.js

@@ -1,1096 +0,0 @@
-const CDP = require('chrome-remote-interface')
-const { WebDriver } = require('../common/web_driver')
-const { inflate } = require('pako')
-
-class Bitget {
-
-    async example () {
-        let wd = new WebDriver()
-
-        await wd.builder()
-
-        console.info(wd)
-    }
-
-    /**
-     * 解密
-     * */
-    decode (data) {
-
-
-        //
-        // let A = {
-        //     f () {
-        //         this.mode = 0,
-        //             this.last = !1,
-        //             this.wrap = 0,
-        //             this.havedict = !1,
-        //             this.flags = 0,
-        //             this.dmax = 0,
-        //             this.check = 0,
-        //             this.total = 0,
-        //             this.head = null,
-        //             this.wbits = 0,
-        //             this.wsize = 0,
-        //             this.whave = 0,
-        //             this.wnext = 0,
-        //             this.window = null,
-        //             this.hold = 0,
-        //             this.bits = 0,
-        //             this.length = 0,
-        //             this.offset = 0,
-        //             this.extra = 0,
-        //             this.lencode = null,
-        //             this.distcode = null,
-        //             this.lenbits = 0,
-        //             this.distbits = 0,
-        //             this.ncode = 0,
-        //             this.nlen = 0,
-        //             this.ndist = 0,
-        //             this.have = 0,
-        //             this.next = null,
-        //             this.lens = new r.Buf16(320),
-        //             this.work = new r.Buf16(288),
-        //             this.lendyn = null,
-        //             this.distdyn = null,
-        //             this.sane = 0,
-        //             this.back = 0,
-        //             this.was = 0
-        //     },
-        //     s: {
-        //         'Z_NO_FLUSH': 0,
-        //         'Z_PARTIAL_FLUSH': 1,
-        //         'Z_SYNC_FLUSH': 2,
-        //         'Z_FULL_FLUSH': 3,
-        //         'Z_FINISH': 4,
-        //         'Z_BLOCK': 5,
-        //         'Z_TREES': 6,
-        //         'Z_OK': 0,
-        //         'Z_STREAM_END': 1,
-        //         'Z_NEED_DICT': 2,
-        //         'Z_ERRNO': -1,
-        //         'Z_STREAM_ERROR': -2,
-        //         'Z_DATA_ERROR': -3,
-        //         'Z_BUF_ERROR': -5,
-        //         'Z_NO_COMPRESSION': 0,
-        //         'Z_BEST_SPEED': 1,
-        //         'Z_BEST_COMPRESSION': 9,
-        //         'Z_DEFAULT_COMPRESSION': -1,
-        //         'Z_FILTERED': 1,
-        //         'Z_HUFFMAN_ONLY': 2,
-        //         'Z_RLE': 3,
-        //         'Z_FIXED': 4,
-        //         'Z_DEFAULT_STRATEGY': 0,
-        //         'Z_BINARY': 0,
-        //         'Z_TEXT': 1,
-        //         'Z_UNKNOWN': 2,
-        //         'Z_DEFLATED': 8,
-        //     },
-        //     o: {
-        //         '0': '',
-        //         '1': 'stream end',
-        //         '2': 'need dictionary',
-        //         '-1': 'file error',
-        //         '-2': 'stream error',
-        //         '-3': 'data error',
-        //         '-4': 'insufficient memory',
-        //         '-5': 'buffer error',
-        //         '-6': 'incompatible version',
-        //     },
-        //     h: function() {
-        //         this.text = 0,
-        //             this.time = 0,
-        //             this.xflags = 0,
-        //             this.os = 0,
-        //             this.extra = null,
-        //             this.extra_len = 0,
-        //             this.name = '',
-        //             this.comment = '',
-        //             this.hcrc = 0,
-        //             this.done = !1
-        //     },
-        //     l: function() {
-        //         this.input = null,
-        //             this.next_in = 0,
-        //             this.avail_in = 0,
-        //             this.total_in = 0,
-        //             this.output = null,
-        //             this.next_out = 0,
-        //             this.avail_out = 0,
-        //             this.total_out = 0,
-        //             this.msg = '',
-        //             this.state = null,
-        //             this.data_type = 2,
-        //             this.adler = 0
-        //     },
-        //     p: function(t, e, a, i) {
-        //         var n, s = t.state
-        //         return null === s.window && (s.wsize = 1 << s.wbits,
-        //             s.wnext = 0,
-        //             s.whave = 0,
-        //             s.window = new r.Buf8(s.wsize)),
-        //             i >= s.wsize ? (r.arraySet(s.window, e, a - s.wsize, s.wsize, 0),
-        //                 s.wnext = 0,
-        //                 s.whave = s.wsize) : ((n = s.wsize - s.wnext) > i && (n = i),
-        //                 r.arraySet(s.window, e, a - i, n, s.wnext),
-        //                 (i -= n) ? (r.arraySet(s.window, e, a - i, i, 0),
-        //                     s.wnext = i,
-        //                     s.whave = s.wsize) : (s.wnext += n,
-        //                 s.wnext === s.wsize && (s.wnext = 0),
-        //                 s.whave < s.wsize && (s.whave += n))),
-        //             0
-        //     },
-        //     c: function(t, e) {
-        //         var a, i
-        //         return t && t.state ? (i = t.state,
-        //             e < 0 ? (a = 0,
-        //                 e = -e) : (a = (e >> 4) + 1,
-        //             e < 48 && (e &= 15)),
-        //         e && (e < 8 || e > 15)) ? -2 : (null !== i.window && i.wbits !== e && (i.window = null),
-        //             i.wrap = a,
-        //             i.wbits = e,
-        //             u(t)) : -2
-        //     },
-        // }
-        //
-        // let n = {
-        //     assign: function(t) {
-        //         for (let e = Array.prototype.slice.call(arguments, 1); e.length;) {
-        //             const a = e.shift()
-        //             if (a) {
-        //                 if ('object' != typeof a) {
-        //                     throw TypeError(a + 'must be non-object')
-        //                 }
-        //                 for (const i in a) {
-        //                     Object.prototype.hasOwnProperty.call(a, i) && (t[i] = a[i])
-        //                 }
-        //             }
-        //         }
-        //         return t
-        //     }
-        //     ,
-        //     shrinkBuf: function(t, e) {
-        //         return t.length === e ? t : t.subarray ? t.subarray(0, e) : (t.length = e, t)
-        //     },
-        //     Buf8: Uint8Array,
-        //     Buf16: Uint16Array,
-        //     Buf32: Int32Array,
-        //     arraySet: function(t, e, a, i, n) {
-        //         for (let r = 0; r < i; r++) {
-        //             t[n + r] = e[a + r]
-        //         }
-        //
-        //     },
-        //     flattenChunks: function(t) {
-        //         return [].concat.apply([], t)
-        //     },
-        // }
-        //
-        // let r = {
-        //
-        //     inflateInit2: function g (t, e) {
-        //
-        //         let a, i
-        //         return t ? (i = new A.f,
-        //             t.state = i,
-        //             i.window = null,
-        //         0 !== (a = c(t, e)) && (t.state = null), a) : -2
-        //     },
-        // }
-        // let i = {
-        //
-        //     inflateGetHeader (t, e) {
-        //         let a
-        //         return t && t.state && (2 & (a = t.state).wrap) != 0 ? (a.head = e, e.done = !1, 0) : -2
-        //     },
-        //     inflateInit2 (t, e) {
-        //         let a, i
-        //         //TODO c
-        //         return t ? (i = new f, t.state = i, i.window = null, 0 !== (a = c(t, e)) && (t.state = null), a) : -2
-        //     },
-        //     inflate (t, e) {
-        //         let a, f, _, u, c, g, w, m, v, k, y, x, z, B, E, S, A, T, Z, O, R, D, I, C, N = 0, L = new n.Buf8(4),
-        //             U = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]
-        //         if (!t || !t.state || !t.output || !t.input && 0 !== t.avail_in) {
-        //             return -2
-        //         }
-        //         12 === (a = t.state).mode && (a.mode = 13),
-        //             c = t.next_out,
-        //             _ = t.output,
-        //             w = t.avail_out,
-        //             u = t.next_in,
-        //             f = t.input,
-        //             g = t.avail_in,
-        //             m = a.hold,
-        //             v = a.bits,
-        //             k = g,
-        //             y = w,
-        //             D = 0
-        //         e: for (; ;) {
-        //             switch (a.mode) {
-        //                 case 1:
-        //                     if (0 === a.wrap) {
-        //                         a.mode = 13
-        //                         break
-        //                     }
-        //                     for (; v < 16;) {
-        //                         if (0 === g) {
-        //                             break e
-        //                         }
-        //                         g--,
-        //                             m += f[u++] << v,
-        //                             v += 8
-        //                     }
-        //                     if (2 & a.wrap && 35615 === m) {
-        //                         a.check = 0,
-        //                             L[0] = 255 & m,
-        //                             L[1] = m >>> 8 & 255,
-        //                             a.check = o(a.check, L, 2, 0),
-        //                             m = 0,
-        //                             v = 0,
-        //                             a.mode = 2
-        //                         break
-        //                     }
-        //                     if (a.flags = 0,
-        //                     a.head && (a.head.done = !1),
-        //                     !(1 & a.wrap) || (((255 & m) << 8) + (m >> 8)) % 31) {
-        //                         t.msg = 'incorrect header check',
-        //                             a.mode = 30
-        //                         break
-        //                     }
-        //                     if ((15 & m) != 8) {
-        //                         t.msg = 'unknown compression method',
-        //                             a.mode = 30
-        //                         break
-        //                     }
-        //                     if (m >>>= 4,
-        //                         v -= 4,
-        //                         R = (15 & m) + 8,
-        //                     0 === a.wbits) {
-        //                         a.wbits = R
-        //                     } else if (R > a.wbits) {
-        //                         t.msg = 'invalid window size',
-        //                             a.mode = 30
-        //                         break
-        //                     }
-        //                     a.dmax = 1 << R,
-        //                         t.adler = a.check = 1,
-        //                         a.mode = 512 & m ? 10 : 12,
-        //                         m = 0,
-        //                         v = 0
-        //                     break
-        //                 case 2:
-        //                     for (; v < 16;) {
-        //                         if (0 === g) {
-        //                             break e
-        //                         }
-        //                         g--,
-        //                             m += f[u++] << v,
-        //                             v += 8
-        //                     }
-        //                     if (a.flags = m,
-        //                     (255 & a.flags) != 8) {
-        //                         t.msg = 'unknown compression method',
-        //                             a.mode = 30
-        //                         break
-        //                     }
-        //                     if (57344 & a.flags) {
-        //                         t.msg = 'unknown header flags set',
-        //                             a.mode = 30
-        //                         break
-        //                     }
-        //                     a.head && (a.head.text = m >> 8 & 1),
-        //                     512 & a.flags && (L[0] = 255 & m,
-        //                         L[1] = m >>> 8 & 255,
-        //                         a.check = o(a.check, L, 2, 0)),
-        //                         m = 0,
-        //                         v = 0,
-        //                         a.mode = 3
-        //                 case 3:
-        //                     for (; v < 32;) {
-        //                         if (0 === g) {
-        //                             break e
-        //                         }
-        //                         g--,
-        //                             m += f[u++] << v,
-        //                             v += 8
-        //                     }
-        //                     a.head && (a.head.time = m),
-        //                     512 & a.flags && (L[0] = 255 & m,
-        //                         L[1] = m >>> 8 & 255,
-        //                         L[2] = m >>> 16 & 255,
-        //                         L[3] = m >>> 24 & 255,
-        //                         a.check = o(a.check, L, 4, 0)),
-        //                         m = 0,
-        //                         v = 0,
-        //                         a.mode = 4
-        //                 case 4:
-        //                     for (; v < 16;) {
-        //                         if (0 === g) {
-        //                             break e
-        //                         }
-        //                         g--,
-        //                             m += f[u++] << v,
-        //                             v += 8
-        //                     }
-        //                     a.head && (a.head.xflags = 255 & m,
-        //                         a.head.os = m >> 8),
-        //                     512 & a.flags && (L[0] = 255 & m,
-        //                         L[1] = m >>> 8 & 255,
-        //                         a.check = o(a.check, L, 2, 0)),
-        //                         m = 0,
-        //                         v = 0,
-        //                         a.mode = 5
-        //                 case 5:
-        //                     if (1024 & a.flags) {
-        //                         for (; v < 16;) {
-        //                             if (0 === g) {
-        //                                 break e
-        //                             }
-        //                             g--,
-        //                                 m += f[u++] << v,
-        //                                 v += 8
-        //                         }
-        //                         a.length = m,
-        //                         a.head && (a.head.extra_len = m),
-        //                         512 & a.flags && (L[0] = 255 & m,
-        //                             L[1] = m >>> 8 & 255,
-        //                             a.check = o(a.check, L, 2, 0)),
-        //                             m = 0,
-        //                             v = 0
-        //                     } else {
-        //                         a.head && (a.head.extra = null)
-        //                     }
-        //                     a.mode = 6
-        //                 case 6:
-        //                     if (1024 & a.flags && ((x = a.length) > g && (x = g),
-        //                     x && (a.head && (R = a.head.extra_len - a.length,
-        //                     a.head.extra || (a.head.extra = Array(a.head.extra_len)),
-        //                         r.arraySet(a.head.extra, f, u, x, R)),
-        //                     512 & a.flags && (a.check = o(a.check, f, x, u)),
-        //                         g -= x,
-        //                         u += x,
-        //                         a.length -= x),
-        //                         a.length)) {
-        //                         break e
-        //                     }
-        //                     a.length = 0,
-        //                         a.mode = 7
-        //                 case 7:
-        //                     if (2048 & a.flags) {
-        //                         if (0 === g) {
-        //                             break e
-        //                         }
-        //                         x = 0
-        //                         do {
-        //                             R = f[u + x++],
-        //                             a.head && R && a.length < 65536 && (a.head.name += String.fromCharCode(R))
-        //                         } while (R && x < g)
-        //                         if (512 & a.flags && (a.check = o(a.check, f, x, u)),
-        //                             g -= x,
-        //                             u += x,
-        //                             R) {
-        //                             break e
-        //                         }
-        //                     } else {
-        //                         a.head && (a.head.name = null)
-        //                     }
-        //                     a.length = 0,
-        //                         a.mode = 8
-        //                 case 8:
-        //                     if (4096 & a.flags) {
-        //                         if (0 === g) {
-        //                             break e
-        //                         }
-        //                         x = 0
-        //                         do {
-        //                             R = f[u + x++],
-        //                             a.head && R && a.length < 65536 && (a.head.comment += String.fromCharCode(R))
-        //                         } while (R && x < g)
-        //                         if (512 & a.flags && (a.check = o(a.check, f, x, u)),
-        //                             g -= x,
-        //                             u += x,
-        //                             R) {
-        //                             break e
-        //                         }
-        //                     } else {
-        //                         a.head && (a.head.comment = null)
-        //                     }
-        //                     a.mode = 9
-        //                 case 9:
-        //                     if (512 & a.flags) {
-        //                         for (; v < 16;) {
-        //                             if (0 === g) {
-        //                                 break e
-        //                             }
-        //                             g--,
-        //                                 m += f[u++] << v,
-        //                                 v += 8
-        //                         }
-        //                         if (m !== (65535 & a.check)) {
-        //                             t.msg = 'header crc mismatch',
-        //                                 a.mode = 30
-        //                             break
-        //                         }
-        //                         m = 0,
-        //                             v = 0
-        //                     }
-        //                     a.head && (a.head.hcrc = a.flags >> 9 & 1,
-        //                         a.head.done = !0),
-        //                         t.adler = a.check = 0,
-        //                         a.mode = 12
-        //                     break
-        //                 case 10:
-        //                     for (; v < 32;) {
-        //                         if (0 === g) {
-        //                             break e
-        //                         }
-        //                         g--,
-        //                             m += f[u++] << v,
-        //                             v += 8
-        //                     }
-        //                     //TODO d
-        //                     t.adler = a.check = d(m),
-        //                         m = 0,
-        //                         v = 0,
-        //                         a.mode = 11
-        //                 case 11:
-        //                     if (0 === a.havedict) {
-        //                         return t.next_out = c,
-        //                             t.avail_out = w,
-        //                             t.next_in = u,
-        //                             t.avail_in = g,
-        //                             a.hold = m,
-        //                             a.bits = v,
-        //                             2
-        //                     }
-        //                     t.adler = a.check = 1,
-        //                         a.mode = 12
-        //                 case 12:
-        //                     if (5 === e || 6 === e) {
-        //                         break e
-        //                     }
-        //                 case 13:
-        //                     if (a.last) {
-        //                         m >>>= 7 & v,
-        //                             v -= 7 & v,
-        //                             a.mode = 27
-        //                         break
-        //                     }
-        //                     for (; v < 3;) {
-        //                         if (0 === g) {
-        //                             break e
-        //                         }
-        //                         g--,
-        //                             m += f[u++] << v,
-        //                             v += 8
-        //                     }
-        //                     switch (a.last = 1 & m,
-        //                         v -= 1,
-        //                     3 & (m >>>= 1)) {
-        //                         case 0:
-        //                             a.mode = 14
-        //                             break
-        //                         case 1:
-        //                             if (function(t) {
-        //                                 if (b) {
-        //                                     var e
-        //                                     for (i = new r.Buf32(512),
-        //                                         n = new r.Buf32(32),
-        //                                         e = 0; e < 144;) {
-        //                                         t.lens[e++] = 8
-        //                                     }
-        //                                     for (; e < 256;) {
-        //                                         t.lens[e++] = 9
-        //                                     }
-        //                                     for (; e < 280;) {
-        //                                         t.lens[e++] = 7
-        //                                     }
-        //                                     for (; e < 288;) {
-        //                                         t.lens[e++] = 8
-        //                                     }
-        //                                     for (h(1, t.lens, 0, 288, i, 0, t.work, {
-        //                                         bits: 9,
-        //                                     }),
-        //                                         e = 0; e < 32;) {
-        //                                         t.lens[e++] = 5
-        //                                     }
-        //                                     h(2, t.lens, 0, 32, n, 0, t.work, {
-        //                                         bits: 5,
-        //                                     }),
-        //                                         b = !1
-        //                                 }
-        //                                 t.lencode = i,
-        //                                     t.lenbits = 9,
-        //                                     t.distcode = n,
-        //                                     t.distbits = 5
-        //                             }(a),
-        //                                 a.mode = 20,
-        //                             6 === e) {
-        //                                 m >>>= 2,
-        //                                     v -= 2
-        //                                 break e
-        //                             }
-        //                             break
-        //                         case 2:
-        //                             a.mode = 17
-        //                             break
-        //                         case 3:
-        //                             t.msg = 'invalid block type',
-        //                                 a.mode = 30
-        //                     }
-        //                     m >>>= 2,
-        //                         v -= 2
-        //                     break
-        //                 case 14:
-        //                     for (m >>>= 7 & v,
-        //                         v -= 7 & v; v < 32;) {
-        //                         if (0 === g) {
-        //                             break e
-        //                         }
-        //                         g--,
-        //                             m += f[u++] << v,
-        //                             v += 8
-        //                     }
-        //                     if ((65535 & m) != (m >>> 16 ^ 65535)) {
-        //                         t.msg = 'invalid stored block lengths',
-        //                             a.mode = 30
-        //                         break
-        //                     }
-        //                     if (a.length = 65535 & m,
-        //                         m = 0,
-        //                         v = 0,
-        //                         a.mode = 15,
-        //                     6 === e) {
-        //                         break e
-        //                     }
-        //                 case 15:
-        //                     a.mode = 16
-        //                 case 16:
-        //                     if (x = a.length) {
-        //                         if (x > g && (x = g),
-        //                         x > w && (x = w),
-        //                         0 === x) {
-        //                             break e
-        //                         }
-        //                         r.arraySet(_, f, u, x, c),
-        //                             g -= x,
-        //                             u += x,
-        //                             w -= x,
-        //                             c += x,
-        //                             a.length -= x
-        //                         break
-        //                     }
-        //                     a.mode = 12
-        //                     break
-        //                 case 17:
-        //                     for (; v < 14;) {
-        //                         if (0 === g) {
-        //                             break e
-        //                         }
-        //                         g--,
-        //                             m += f[u++] << v,
-        //                             v += 8
-        //                     }
-        //                     if (a.nlen = (31 & m) + 257,
-        //                         m >>>= 5,
-        //                         v -= 5,
-        //                         a.ndist = (31 & m) + 1,
-        //                         m >>>= 5,
-        //                         v -= 5,
-        //                         a.ncode = (15 & m) + 4,
-        //                         m >>>= 4,
-        //                         v -= 4,
-        //                     a.nlen > 286 || a.ndist > 30) {
-        //                         t.msg = 'too many length or distance symbols',
-        //                             a.mode = 30
-        //                         break
-        //                     }
-        //                     a.have = 0,
-        //                         a.mode = 18
-        //                 case 18:
-        //                     for (; a.have < a.ncode;) {
-        //                         for (; v < 3;) {
-        //                             if (0 === g) {
-        //                                 break e
-        //                             }
-        //                             g--,
-        //                                 m += f[u++] << v,
-        //                                 v += 8
-        //                         }
-        //                         a.lens[U[a.have++]] = 7 & m,
-        //                             m >>>= 3,
-        //                             v -= 3
-        //                     }
-        //                     for (; a.have < 19;) {
-        //                         a.lens[U[a.have++]] = 0
-        //                     }
-        //                     if (a.lencode = a.lendyn,
-        //                         a.lenbits = 7,
-        //                         I = {
-        //                             bits: a.lenbits,
-        //                         },
-        //                         D = h(0, a.lens, 0, 19, a.lencode, 0, a.work, I),
-        //                         a.lenbits = I.bits,
-        //                         D) {
-        //                         t.msg = 'invalid code lengths set',
-        //                             a.mode = 30
-        //                         break
-        //                     }
-        //                     a.have = 0,
-        //                         a.mode = 19
-        //                 case 19:
-        //                     for (; a.have < a.nlen + a.ndist;) {
-        //                         for (; E = (N = a.lencode[m & (1 << a.lenbits) - 1]) >>> 24,
-        //                             S = N >>> 16 & 255,
-        //                             A = 65535 & N,
-        //                             !(E <= v);) {
-        //                             if (0 === g) {
-        //                                 break e
-        //                             }
-        //                             g--,
-        //                                 m += f[u++] << v,
-        //                                 v += 8
-        //                         }
-        //                         if (A < 16) {
-        //                             m >>>= E,
-        //                                 v -= E,
-        //                                 a.lens[a.have++] = A
-        //                         } else {
-        //                             if (16 === A) {
-        //                                 for (C = E + 2; v < C;) {
-        //                                     if (0 === g) {
-        //                                         break e
-        //                                     }
-        //                                     g--,
-        //                                         m += f[u++] << v,
-        //                                         v += 8
-        //                                 }
-        //                                 if (m >>>= E,
-        //                                     v -= E,
-        //                                 0 === a.have) {
-        //                                     t.msg = 'invalid bit length repeat',
-        //                                         a.mode = 30
-        //                                     break
-        //                                 }
-        //                                 R = a.lens[a.have - 1],
-        //                                     x = 3 + (3 & m),
-        //                                     m >>>= 2,
-        //                                     v -= 2
-        //                             } else if (17 === A) {
-        //                                 for (C = E + 3; v < C;) {
-        //                                     if (0 === g) {
-        //                                         break e
-        //                                     }
-        //                                     g--,
-        //                                         m += f[u++] << v,
-        //                                         v += 8
-        //                                 }
-        //                                 m >>>= E,
-        //                                     v -= E,
-        //                                     R = 0,
-        //                                     x = 3 + (7 & m),
-        //                                     m >>>= 3,
-        //                                     v -= 3
-        //                             } else {
-        //                                 for (C = E + 7; v < C;) {
-        //                                     if (0 === g) {
-        //                                         break e
-        //                                     }
-        //                                     g--,
-        //                                         m += f[u++] << v,
-        //                                         v += 8
-        //                                 }
-        //                                 m >>>= E,
-        //                                     v -= E,
-        //                                     R = 0,
-        //                                     x = 11 + (127 & m),
-        //                                     m >>>= 7,
-        //                                     v -= 7
-        //                             }
-        //                             if (a.have + x > a.nlen + a.ndist) {
-        //                                 t.msg = 'invalid bit length repeat',
-        //                                     a.mode = 30
-        //                                 break
-        //                             }
-        //                             for (; x--;) {
-        //                                 a.lens[a.have++] = R
-        //                             }
-        //                         }
-        //                     }
-        //                     if (30 === a.mode) {
-        //                         break
-        //                     }
-        //                     if (0 === a.lens[256]) {
-        //                         t.msg = 'invalid code -- missing end-of-block',
-        //                             a.mode = 30
-        //                         break
-        //                     }
-        //                     if (a.lenbits = 9,
-        //                         I = {
-        //                             bits: a.lenbits,
-        //                         },
-        //                         D = h(1, a.lens, 0, a.nlen, a.lencode, 0, a.work, I),
-        //                         a.lenbits = I.bits,
-        //                         D) {
-        //                         t.msg = 'invalid literal/lengths set',
-        //                             a.mode = 30
-        //                         break
-        //                     }
-        //                     if (a.distbits = 6,
-        //                         a.distcode = a.distdyn,
-        //                         I = {
-        //                             bits: a.distbits,
-        //                         },
-        //                         D = h(2, a.lens, a.nlen, a.ndist, a.distcode, 0, a.work, I),
-        //                         a.distbits = I.bits,
-        //                         D) {
-        //                         t.msg = 'invalid distances set',
-        //                             a.mode = 30
-        //                         break
-        //                     }
-        //                     if (a.mode = 20,
-        //                     6 === e) {
-        //                         break e
-        //                     }
-        //                 case 20:
-        //                     a.mode = 21
-        //                 case 21:
-        //                     if (g >= 6 && w >= 258) {
-        //                         t.next_out = c,
-        //                             t.avail_out = w,
-        //                             t.next_in = u,
-        //                             t.avail_in = g,
-        //                             a.hold = m,
-        //                             a.bits = v,
-        //                             l(t, y),
-        //                             c = t.next_out,
-        //                             _ = t.output,
-        //                             w = t.avail_out,
-        //                             u = t.next_in,
-        //                             f = t.input,
-        //                             g = t.avail_in,
-        //                             m = a.hold,
-        //                             v = a.bits,
-        //                         12 === a.mode && (a.back = -1)
-        //                         break
-        //                     }
-        //                     for (a.back = 0; E = (N = a.lencode[m & (1 << a.lenbits) - 1]) >>> 24,
-        //                         S = N >>> 16 & 255,
-        //                         A = 65535 & N,
-        //                         !(E <= v);) {
-        //                         if (0 === g) {
-        //                             break e
-        //                         }
-        //                         g--,
-        //                             m += f[u++] << v,
-        //                             v += 8
-        //                     }
-        //                     if (S && (240 & S) == 0) {
-        //                         for (T = E,
-        //                             Z = S,
-        //                             O = A; E = (N = a.lencode[O + ((m & (1 << T + Z) - 1) >> T)]) >>> 24,
-        //                             S = N >>> 16 & 255,
-        //                             A = 65535 & N,
-        //                             !(T + E <= v);) {
-        //                             if (0 === g) {
-        //                                 break e
-        //                             }
-        //                             g--,
-        //                                 m += f[u++] << v,
-        //                                 v += 8
-        //                         }
-        //                         m >>>= T,
-        //                             v -= T,
-        //                             a.back += T
-        //                     }
-        //                     if (m >>>= E,
-        //                         v -= E,
-        //                         a.back += E,
-        //                         a.length = A,
-        //                     0 === S) {
-        //                         a.mode = 26
-        //                         break
-        //                     }
-        //                     if (32 & S) {
-        //                         a.back = -1,
-        //                             a.mode = 12
-        //                         break
-        //                     }
-        //                     if (64 & S) {
-        //                         t.msg = 'invalid literal/length code',
-        //                             a.mode = 30
-        //                         break
-        //                     }
-        //                     a.extra = 15 & S,
-        //                         a.mode = 22
-        //                 case 22:
-        //                     if (a.extra) {
-        //                         for (C = a.extra; v < C;) {
-        //                             if (0 === g) {
-        //                                 break e
-        //                             }
-        //                             g--,
-        //                                 m += f[u++] << v,
-        //                                 v += 8
-        //                         }
-        //                         a.length += m & (1 << a.extra) - 1,
-        //                             m >>>= a.extra,
-        //                             v -= a.extra,
-        //                             a.back += a.extra
-        //                     }
-        //                     a.was = a.length,
-        //                         a.mode = 23
-        //                 case 23:
-        //                     for (; E = (N = a.distcode[m & (1 << a.distbits) - 1]) >>> 24,
-        //                         S = N >>> 16 & 255,
-        //                         A = 65535 & N,
-        //                         !(E <= v);) {
-        //                         if (0 === g) {
-        //                             break e
-        //                         }
-        //                         g--,
-        //                             m += f[u++] << v,
-        //                             v += 8
-        //                     }
-        //                     if ((240 & S) == 0) {
-        //                         for (T = E,
-        //                             Z = S,
-        //                             O = A; E = (N = a.distcode[O + ((m & (1 << T + Z) - 1) >> T)]) >>> 24,
-        //                             S = N >>> 16 & 255,
-        //                             A = 65535 & N,
-        //                             !(T + E <= v);) {
-        //                             if (0 === g) {
-        //                                 break e
-        //                             }
-        //                             g--,
-        //                                 m += f[u++] << v,
-        //                                 v += 8
-        //                         }
-        //                         m >>>= T,
-        //                             v -= T,
-        //                             a.back += T
-        //                     }
-        //                     if (m >>>= E,
-        //                         v -= E,
-        //                         a.back += E,
-        //                     64 & S) {
-        //                         t.msg = 'invalid distance code',
-        //                             a.mode = 30
-        //                         break
-        //                     }
-        //                     a.offset = A,
-        //                         a.extra = 15 & S,
-        //                         a.mode = 24
-        //                 case 24:
-        //                     if (a.extra) {
-        //                         for (C = a.extra; v < C;) {
-        //                             if (0 === g) {
-        //                                 break e
-        //                             }
-        //                             g--,
-        //                                 m += f[u++] << v,
-        //                                 v += 8
-        //                         }
-        //                         a.offset += m & (1 << a.extra) - 1,
-        //                             m >>>= a.extra,
-        //                             v -= a.extra,
-        //                             a.back += a.extra
-        //                     }
-        //                     if (a.offset > a.dmax) {
-        //                         t.msg = 'invalid distance too far back',
-        //                             a.mode = 30
-        //                         break
-        //                     }
-        //                     a.mode = 25
-        //                 case 25:
-        //                     if (0 === w) {
-        //                         break e
-        //                     }
-        //                     if (x = y - w,
-        //                     a.offset > x) {
-        //                         if ((x = a.offset - x) > a.whave && a.sane) {
-        //                             t.msg = 'invalid distance too far back',
-        //                                 a.mode = 30
-        //                             break
-        //                         }
-        //                         x > a.wnext ? (x -= a.wnext,
-        //                             z = a.wsize - x) : z = a.wnext - x,
-        //                         x > a.length && (x = a.length),
-        //                             B = a.window
-        //                     } else {
-        //                         B = _,
-        //                             z = c - a.offset,
-        //                             x = a.length
-        //                     }
-        //                     x > w && (x = w),
-        //                         w -= x,
-        //                         a.length -= x
-        //                     do {
-        //                         _[c++] = B[z++]
-        //                     } while (--x)
-        //                     0 === a.length && (a.mode = 21)
-        //                     break
-        //                 case 26:
-        //                     if (0 === w) {
-        //                         break e
-        //                     }
-        //                     _[c++] = a.length,
-        //                         w--,
-        //                         a.mode = 21
-        //                     break
-        //                 case 27:
-        //                     if (a.wrap) {
-        //                         for (; v < 32;) {
-        //                             if (0 === g) {
-        //                                 break e
-        //                             }
-        //                             g--,
-        //                                 m |= f[u++] << v,
-        //                                 v += 8
-        //                         }
-        //                         if (y -= w,
-        //                             t.total_out += y,
-        //                             a.total += y,
-        //                         y && (t.adler = a.check = a.flags ? o(a.check, _, y, c - y) : s(a.check, _, y, c - y)),
-        //                             y = w,
-        //                         (a.flags ? m : d(m)) !== a.check) {
-        //                             t.msg = 'incorrect data check',
-        //                                 a.mode = 30
-        //                             break
-        //                         }
-        //                         m = 0,
-        //                             v = 0
-        //                     }
-        //                     a.mode = 28
-        //                 case 28:
-        //                     if (a.wrap && a.flags) {
-        //                         for (; v < 32;) {
-        //                             if (0 === g) {
-        //                                 break e
-        //                             }
-        //                             g--,
-        //                                 m += f[u++] << v,
-        //                                 v += 8
-        //                         }
-        //                         if (m !== (4294967295 & a.total)) {
-        //                             t.msg = 'incorrect length check',
-        //                                 a.mode = 30
-        //                             break
-        //                         }
-        //                         m = 0,
-        //                             v = 0
-        //                     }
-        //                     a.mode = 29
-        //                 case 29:
-        //                     D = 1
-        //                     break e
-        //                 case 30:
-        //                     D = -3
-        //                     break e
-        //                 case 31:
-        //                     return -4
-        //                 default:
-        //                     return -2
-        //             }
-        //         }
-        //         return (t.next_out = c,
-        //             t.avail_out = w,
-        //             t.next_in = u,
-        //             t.avail_in = g,
-        //             a.hold = m,
-        //             a.bits = v,
-        //
-        //         (a.wsize || y !== t.avail_out && a.mode < 30 && (a.mode < 27 || 4 !== e)) && A.p(t, t.output, t.next_out, y - t.avail_out)) ? (a.mode = 31,
-        //             -4) : (k -= t.avail_in,
-        //             y -= t.avail_out,
-        //             t.total_in += k,
-        //             t.total_out += y,
-        //             a.total += y,
-        //         a.wrap && y && (t.adler = a.check = a.flags ? o(a.check, _, y, t.next_out - y) : s(a.check, _, y, t.next_out - y)),
-        //             t.data_type = a.bits + (a.last ? 64 : 0) + (12 === a.mode ? 128 : 0) + (20 === a.mode || 15 === a.mode ? 256 : 0),
-        //         (0 === k && 0 === y || 4 === e) && 0 === D && (D = -5), D)
-        //     },
-        // }
-        //
-        // function f (t) {
-        //     if (!(this instanceof f)) {
-        //         return new f(t)
-        //     }
-        //     this.options = n.assign({
-        //         chunkSize: 16384,
-        //         windowBits: 0,
-        //         to: '',
-        //     }, t || {})
-        //     const e = this.options
-        //     e.raw && e.windowBits >= 0 && e.windowBits < 16 && (e.windowBits = -e.windowBits,
-        //     0 === e.windowBits && (e.windowBits = -15)),
-        //     e.windowBits >= 0 && e.windowBits < 16 && !(t && t.windowBits) && (e.windowBits += 32),
-        //     e.windowBits > 15 && e.windowBits < 48 && (15 & e.windowBits) == 0 && (e.windowBits |= 15),
-        //         this.err = 0,
-        //         this.msg = '',
-        //         this.ended = !1,
-        //         this.chunks = [],
-        //         this.strm = new A.l,
-        //         this.strm.avail_out = 0
-        //     let a = i.inflateInit2(this.strm, e.windowBits)
-        //     if (a !== A.s.Z_OK || (this.header = new A.h, i.inflateGetHeader(this.strm, this.header),
-        //     e.dictionary && ('string' == typeof e.dictionary ? e.dictionary = r.string2buf(e.dictionary) : '[object ArrayBuffer]' === String(e.dictionary)
-        //         && (e.dictionary = new Uint8Array(e.dictionary)),
-        //     e.raw && (a = i.inflateSetDictionary(this.strm, e.dictionary)) !== A.s.Z_OK))) {
-        //         throw Error(A.o[a])
-        //     }
-        // }
-        //
-        // f.prototype.push = function(t, e) {
-        //     let a, o, l, h, f, _ = this.strm, u = this.options.chunkSize, c = this.options.dictionary, g = !1
-        //     if (this.ended) {
-        //         return !1
-        //     }
-        //     o = e === ~~e ? e : !0 === e ? A.s.Z_FINISH : A.s.Z_NO_FLUSH,
-        //         'string' == typeof t ? _.input = r.binstring2buf(t) : '[object ArrayBuffer]' === String(t) ? _.input = new Uint8Array(t) : _.input = t,
-        //         _.next_in = 0,
-        //         _.avail_in = _.input.length
-        //     do {
-        //         if (0 === _.avail_out && (_.output = new n.Buf8(u),
-        //             _.next_out = 0,
-        //             _.avail_out = u),
-        //         (a = i.inflate(_, A.s.Z_NO_FLUSH)) === A.s.Z_NEED_DICT && c && (a = i.inflateSetDictionary(this.strm, c)),
-        //         a === A.s.Z_BUF_ERROR && !0 === g && (a = A.s.Z_OK,
-        //             g = !1),
-        //         a !== A.s.Z_STREAM_END && a !== A.s.Z_OK) {
-        //             return this.onEnd(a),
-        //                 this.ended = !0,
-        //                 !1
-        //         }
-        //         _.next_out && (0 === _.avail_out || a === A.s.Z_STREAM_END || 0 === _.avail_in && (o === A.s.Z_FINISH || o === A.s.Z_SYNC_FLUSH)) && ('string' === this.options.to ? (l = r.utf8border(_.output, _.next_out),
-        //             h = _.next_out - l,
-        //             f = r.buf2string(_.output, l),
-        //             _.next_out = h,
-        //             _.avail_out = u - h,
-        //         h && n.arraySet(_.output, _.output, l, h, 0),
-        //             this.onData(f)) : this.onData(n.shrinkBuf(_.output, _.next_out))),
-        //         0 === _.avail_in && 0 === _.avail_out && (g = !0)
-        //     } while ((_.avail_in > 0 || 0 === _.avail_out) && a !== A.s.Z_STREAM_END)
-        //     return (a === A.s.Z_STREAM_END && (o = A.s.Z_FINISH),
-        //     o === A.s.Z_FINISH) ? (a = i.inflateEnd(this.strm),
-        //         this.onEnd(a),
-        //         this.ended = !0,
-        //     a === A.s.Z_OK) : (o === A.s.Z_SYNC_FLUSH && (this.onEnd(A.s.Z_OK), _.avail_out = 0), !0)
-        // }
-        //
-        // f.prototype.onData = function(t) {
-        //     this.chunks.push(t)
-        // }
-        //
-        // f.prototype.onEnd = function(t) {
-        //     t === A.s.Z_OK && ('string' === this.options.to ? this.result = this.chunks.join('') : this.result = n.flattenChunks(this.chunks)),
-        //         this.chunks = [],
-        //         this.err = t,
-        //         this.msg = this.strm.msg
-        // }
-
-    }
-}
-
-module.exports = { Bitget }

+ 7 - 5
client/bitget.test.js

@@ -140,9 +140,13 @@ describe('bitget站点测试', () => {
         //     payloadData string WebSocket message payload data. If the opcode is 1, this is a text message and payloadData is a UTF-8 string.
         //     If the opcode isn't 1, then payloadData is a base64 encoded string representing binary data.
         const formatResponse = (params = {
-            opcode: 1,
-            mask: false,
-            payloadData: '',
+            requestId: '',
+            timestamp: '',
+            response: {
+                opcode: 1,
+                mask: false,
+                payloadData: '',
+            },
         }) => {
             try {
 
@@ -232,8 +236,6 @@ describe('bitget站点测试', () => {
 
         await Storage.setCookies(JSON.parse(cookie))
 
-
-
         await sleep(999999)
 
     })

+ 7 - 3
client/coinw.test.js

@@ -140,9 +140,13 @@ describe('coinw站点测试', () => {
         //     payloadData string WebSocket message payload data. If the opcode is 1, this is a text message and payloadData is a UTF-8 string.
         //     If the opcode isn't 1, then payloadData is a base64 encoded string representing binary data.
         const formatResponse = (params = {
-            opcode: 1,
-            mask: false,
-            payloadData: '',
+            requestId: '',
+            timestamp: '',
+            response: {
+                opcode: 1,
+                mask: false,
+                payloadData: '',
+            },
         }) => {
             try {
 

+ 60 - 116
client/hotcoin.test.js

@@ -10,9 +10,8 @@ const {
 } = require('pako')
 const fs = require('fs')
 const path = require('node:path')
+const root = require('./hotconi/proto/market.v2.trade')
 // Static code + Reflection + .proto parser
-const protobuf = require('protobufjs')
-const desc = require('./hotconi.proto')
 
 const timeout = 9999999
 
@@ -171,114 +170,55 @@ describe('hotcoin站点测试', () => {
 
         await login(Storage, Runtime)
 
-        const decode = (data) => {
+        //这个网站连接了3个wss,不同的wss的数据结构不一样。
+        // "wss://wsw.spentr.com/trade/multiple",
+        //"wss://wcws.spentr.com/",
+        const requestInfo = {}
+
+        const decodeWsw = (data) => {
+
+            let res = inflate(data/* , { to: 'string' } */)
+
+            console.info('解压缩结果:', res)
+            switch (res) {
+                case 'pong':
+                    return res
+
+                default: {
+                    let root = require('./hotconi/proto/market.v2.trade')
+
+                    let response = root.market.v2.trade.Response.decode(res)
+
+                    let object = response.toJSON()
+
+                    console.info('=decodeWsw==>', object)
+                }
+            }
+
+        }
+
+        const decodeWsws = (data) => {
 
             let res = inflate(data/* , { to: 'string' } */)
 
+            //字符串中有2个隐藏字符 DCC EM
+            let regex = new RegExp('(\\n|' + String.fromCharCode(18) + '|' + String.fromCharCode(31) + ')', 'g')
+
+            let keys = inflate(data, { to: 'string' }).split(regex).filter(s => (s || '').includes('type.googleapis.com')).flatMap(s => (s || '').split('/'))
+            // CommonPbMsg
             console.info('解压缩结果:', res)
             switch (res) {
                 case 'pong':
                     return res
 
                 default: {
+                    let root = require('./hotconi/proto/' + (keys.join('.') || '').replaceAll('"', ''))
+
+                    let response = root.type.googleapis.com.Response.decode(res)
 
-                    // function decodeProtobufToJson(buffer) {
-                    //     try {
-                    //         // 创建一个通用的解码器
-                    //         const Reader = protobuf.Reader;
-                    //         const reader = Reader.create(buffer);
-                    //
-                    //         const result = {};
-                    //
-                    //         while (reader.pos < reader.len) {
-                    //             const tag = reader.uint32();
-                    //             const fieldId = tag >>> 3;
-                    //             const wireType = tag & 7;
-                    //
-                    //             // 根据 wireType 解析数据
-                    //             let value;
-                    //             switch (wireType) {
-                    //                 case 0: // varint
-                    //                     value = reader.uint64();
-                    //                     break;
-                    //                 case 1: // 64-bit
-                    //                     value = reader.fixed64();
-                    //                     break;
-                    //                 case 2: // length-delimited (string, bytes, embedded messages)
-                    //                     value = reader.bytes();
-                    //                     // 尝试将 bytes 转换为字符串
-                    //                     try {
-                    //                         value = new TextDecoder().decode(value);
-                    //                     } catch(e) {}
-                    //                     break;
-                    //                 case 5: // 32-bit
-                    //                     value = reader.fixed32();
-                    //                     break;
-                    //                 default:
-                    //                     reader.skipType(wireType);
-                    //                     continue;
-                    //             }
-                    //
-                    //             result[`field${fieldId}`] = value;
-                    //         }
-                    //
-                    //         return result;
-                    //
-                    //     } catch (error) {
-                    //         console.error("解析错误:", error);
-                    //         return null;
-                    //     }
-                    // }
-                    //
-                    // let object = decodeProtobufToJson(res)
-
-                    // let root = protobuf.Root.fromJSON(desc.common)
-                    //
-                    // // 查找 Response 消息类型
-                    // let ResponseType = root.lookupType('Response')
-                    //
-                    // // 解码数据
-                    // let message = ResponseType.decode(res)
-                    //
-                    // // 转换为普通的 JavaScript 对象
-                    // let object = ResponseType.toObject(message, {
-                    //     longs: String,  // 将 long 转换为字符串
-                    //     enums: String,  // 将枚举转换为字符串
-                    //     bytes: String,  // 将 bytes 转换为字符串
-                    //     defaults: true,  // 包含默认值
-                    //     objects: true,
-                    //     arrays: true,
-                    //     json: true,
-                    //     oneofs: true,
-                    // })
-                    // console.info('=00==>', object)
-
-                    // let key = (object.ch || '') + '.json'
-                    // let key = (object.ch || '') + '.js'
-                    //root = protobuf.Root.fromJSON(require('./hotconi/proto/' + key))
-                    // root = protobuf.loadSync(path.resolve('./hotconi/proto/' + key))
-
-                    // root = require('./hotconi/proto/' + key)
-
-                    let root = require('./hotconi/proto/market.v2.trade.area.tickers')
-
-                    // Response = root.lookupType(object.ch + '.Response')
-
-                    // message = Response.decode(res)
-                    //
-                    // object = Response.toObject(message, {
-                    //     longs: String,
-                    //     enums: String,
-                    //     bytes: String,
-                    //     defaults: true,
-                    //     arrays: true,
-                    //     objects: true,
-                    //     oneofs: true,
-                    // })
-
-                    console.info('=11==>', 'object')
-
-                    // return JSON.parse(res)
+                    let object = response.toJSON()
+
+                    console.info('=decodeWsws==>', object)
                 }
             }
 
@@ -290,9 +230,14 @@ describe('hotcoin站点测试', () => {
         //     payloadData string WebSocket message payload data. If the opcode is 1, this is a text message and payloadData is a UTF-8 string.
         //     If the opcode isn't 1, then payloadData is a base64 encoded string representing binary data.
         const formatResponse = (params = {
-            opcode: 1,
-            mask: false,
-            payloadData: '',
+            requestId: '',
+            timestamp: '',
+            response: {
+                opcode: 1,
+                mask: false,
+                payloadData: '',
+            },
+
         }) => {
             try {
 
@@ -306,7 +251,13 @@ describe('hotcoin站点测试', () => {
 
                 const binaryData = Buffer.from(params.response.payloadData, 'base64')
 
-                console.info('结果解析:', decode(binaryData))
+                let res = {}
+                if ((requestInfo[params.requestId].url || '').includes('wsw.spentr.com')) {
+                    res = decodeWsw(binaryData)
+                } else if ((requestInfo[params.requestId].url || '').includes('wcws.spentr.com')) {
+                    res = decodeWsws(binaryData)
+                }
+                console.info('结果解析:', res)
             } catch (e) {
                 console.error(e)
             }
@@ -314,19 +265,12 @@ describe('hotcoin站点测试', () => {
 
         Network.webSocketCreated(params => {
             console.log('WebSocket created:', params.url)
+            requestInfo[params.requestId] = {
+                url: params.url,
+            }
         })
         // 订阅 Network.webSocketFrameSent 和 Network.webSocketFrameReceived 事件,监听 WebSocket 帧的发送和接收:
 
-        Network.webSocketFrameSent(params => {
-            console.log('WebSocket frame sent:', params.response)
-            // formatResponse(params)
-        })
-
-        Network.webSocketFrameReceived(params => {
-            console.log('WebSocket frame received:', params.response)
-            // formatResponse(params)
-        })
-
         // 订阅 Network.webSocketClosed 事件,监听 WebSocket 连接的关闭:
 
         Network.webSocketClosed(params => {
@@ -364,8 +308,8 @@ describe('hotcoin站点测试', () => {
         })
         Network.webSocketFrameError(params => {
             console.log('WebSocket frame error:', params.response)
-            let data = formatResponse(params)
-            console.info('webSocketFrameError解析结果:', data)
+            // let data = formatResponse(params)
+            // console.info('webSocketFrameError解析结果:', data)
         })
         await sleep(timeout)
         done()

+ 0 - 285
client/hotconi.proto.js

@@ -1,285 +0,0 @@
-// JSON descriptor
-//提示词: 通过这个json 结构给我生成一个 protobufjs使用的   JSON descriptors
-
-//通用返回值结构。
-const common = {
-    'nested': {
-        'Response': {
-            'fields': {
-                'code': {
-                    'type': 'int32',
-                    'id': 1,
-                },
-                'msg': {
-                    'type': 'string',
-                    'id': 2,
-                },
-                'status': {
-                    'type': 'string',
-                    'id': 3,
-                },
-                'ts': {
-                    'type': 'int64',
-                    'id': 4,
-                },
-                'ch': {
-                    'type': 'string',
-                    'id': 5,
-                },
-            },
-        },
-    },
-}
-
-//market.v2.trade.recommend.pair
-const market_v2_trade_recommend_pair = {
-    'nested': {
-        'Response': {  // 把 Response 放在最外层
-            'fields': {
-                'code': {
-                    'type': 'int32',
-                    'id': 1
-                },
-                'msg': {
-                    'type': 'string',
-                    'id': 2
-                },
-                'status': {
-                    'type': 'string',
-                    'id': 3
-                },
-                'ts': {
-                    'type': 'int64',
-                    'id': 4
-                },
-                'ch': {
-                    'type': 'string',
-                    'id': 5
-                },
-                'recommendpair': {
-                    'type': 'RecommendPair',
-                    'id': 6
-                }
-            }
-        },
-        'RecommendPair': {  // 定义内部消息类型
-            'nested': {  // 新增 nested 层
-                'TradePair': {  // 把 TradePair 定义移到 RecommendPair 内部
-                    'fields': {
-                        'tradeId': {
-                            'type': 'int64',
-                            'id': 1
-                        },
-                        'cny': {
-                            'type': 'string',
-                            'id': 2
-                        },
-                        'totalamount': {
-                            'type': 'string',
-                            'id': 3
-                        },
-                        'last': {
-                            'type': 'string',
-                            'id': 4
-                        },
-                        'volume': {
-                            'type': 'string',
-                            'id': 5
-                        },
-                        'change': {
-                            'type': 'string',
-                            'id': 6
-                        }
-                    }
-                }
-            },
-            'fields': {
-                'listList': {
-                    'rule': 'repeated',
-                    'type': 'TradePair',
-                    'id': 1
-                }
-            }
-        }
-    }
-};
-
-const market_v2_trade_area_tickers = {
-    'nested': {
-        'TradeAreaPair': {
-            'fields': {
-                'listList': {
-                    'rule': 'repeated',
-                    'type': 'TradePair',
-                    'id': 1,
-                    'default': [],  // 添加默认值
-                },
-            },
-        },
-        'TradePair': {
-            'fields': {
-                'tradeid': {
-                    'type': 'int64',
-                    'id': 1,
-                },
-                'cny': {
-                    'type': 'double',
-                    'id': 2,
-                },
-                'buy': {
-                    'type': 'double',
-                    'id': 3,
-                },
-                'lever': {
-                    'type': 'int64',
-                    'id': 4,
-                },
-                'sell': {
-                    'type': 'double',
-                    'id': 5,
-                },
-                'last': {
-                    'type': 'double',
-                    'id': 6,
-                },
-                'volume': {
-                    'type': 'double',
-                    'id': 7,
-                },
-                'change': {
-                    'type': 'double',
-                    'id': 8,
-                },
-                'high': {
-                    'type': 'double',
-                    'id': 9,
-                },
-                'low': {
-                    'type': 'double',
-                    'id': 10,
-                },
-                'isopen': {
-                    'type': 'int64',
-                    'id': 11,
-                },
-                'open': {
-                    'type': 'int64',
-                    'id': 12,
-                },
-                'amount': {
-                    'type': 'double',
-                    'id': 13,
-                },
-                'isfiatconvert': {
-                    'type': 'bool',
-                    'id': 14,
-                },
-            },
-        },
-        'Response': {
-            'fields': {
-                'code': {
-                    'type': 'int32',
-                    'id': 1,
-                },
-                'msg': {
-                    'type': 'string',
-                    'id': 2,
-                },
-                'status': {
-                    'type': 'string',
-                    'id': 3,
-                },
-                'ts': {
-                    'type': 'int64',
-                    'id': 4,
-                },
-                'ch': {
-                    'type': 'string',
-                    'id': 5,
-                },
-                'tradeareapair': {
-                    'type': 'TradeAreaPair',
-                    'id': 6,
-                },
-            },
-        },
-    },
-}
-
-const market_v2_trade_main_pair = {
-    'nested': {
-        'MainPair': {
-            'fields': {
-                'listList': {
-                    'rule': 'repeated',
-                    'type': 'Trade',
-                    'id': 1,
-                    'default': [],  // 添加默认值
-                },
-            },
-        },
-        'Trade': {
-            'fields': {
-                'tradeId': {
-                    'type': 'int64',
-                    'id': 1,
-                },
-                'cny': {
-                    'type': 'double',
-                    'id': 2,
-                },
-                'totalamount': {
-                    'type': 'double',
-                    'id': 3,
-                },
-                'last': {
-                    'type': 'double',
-                    'id': 4,
-                },
-                'volume': {
-                    'type': 'double',
-                    'id': 5,
-                },
-                'change': {
-                    'type': 'double',
-                    'id': 6,
-                },
-            },
-        },
-        'Response': {
-            'fields': {
-                'code': {
-                    'type': 'int32',
-                    'id': 1,
-                },
-                'msg': {
-                    'type': 'string',
-                    'id': 2,
-                },
-                'status': {
-                    'type': 'string',
-                    'id': 3,
-                },
-                'ts': {
-                    'type': 'int64',
-                    'id': 4,
-                },
-                'ch': {
-                    'type': 'string',
-                    'id': 5,
-                },
-                'mainpair': {
-                    'type': 'MainPair',
-                    'id': 6,
-                },
-            },
-        },
-    },
-}
-module.exports = {
-    common,
-    market_v2_trade_recommend_pair,
-    market_v2_trade_area_tickers,
-    market_v2_trade_main_pair,
-}

+ 18 - 7
client/hotconi/proto/01.pbjs.sh

@@ -3,10 +3,21 @@
 pbjs=../../../node_modules/protobufjs-cli/bin/pbjs
 
 export PATH=$PATH:$pbjs
-pbjs  -h
-pbjs -t static-module -w commonjs  market.v2.trade.area.tickers.proto  > market.v2.trade.area.tickers.js
-pbjs -t static-module -w commonjs   market.v2.trade.main.pair.proto  > market.v2.trade.main.pair.js
-pbjs -t static-module -w commonjs   market.v2.trade.recommend.pair.proto  > market.v2.trade.recommend.pair.js
-pbjs -t json market.v2.trade.area.tickers.proto  > market.v2.trade.area.tickers.json
-pbjs -t json market.v2.trade.main.pair.proto  > market.v2.trade.main.pair.json
-pbjs -t json market.v2.trade.recommend.pair.proto  > market.v2.trade.recommend.pair.json
+#pbjs  -h
+pbjs -t static-module -w commonjs  market.v2.trade.proto  > market.v2.trade.js
+pbjs -t json  market.v2.trade.proto  > market.v2.trade.json
+
+pbjs -t json type.googleapis.com.CandlesPbMsg.proto > type.googleapis.com.CandlesPbMsg.json
+pbjs -t json type.googleapis.com.DepthPbMsg.proto > type.googleapis.com.DepthPbMsg.json
+pbjs -t json type.googleapis.com.FillsPbMsg.proto > type.googleapis.com.FillsPbMsg.json
+pbjs -t json type.googleapis.com.FundRatesPbMsg.proto > type.googleapis.com.FundRatesPbMsg.json
+pbjs -t json type.googleapis.com.TickersPbMsg.proto > type.googleapis.com.TickersPbMsg.json
+pbjs -t json type.googleapis.com.CommonPbMsg.proto > type.googleapis.com.CommonPbMsg.json
+
+
+pbjs -t static-module -w commonjs  type.googleapis.com.CandlesPbMsg.proto > type.googleapis.com.CandlesPbMsg.js
+pbjs -t static-module -w commonjs  type.googleapis.com.DepthPbMsg.proto > type.googleapis.com.DepthPbMsg.js
+pbjs -t static-module -w commonjs  type.googleapis.com.FillsPbMsg.proto > type.googleapis.com.FillsPbMsg.js
+pbjs -t static-module -w commonjs  type.googleapis.com.FundRatesPbMsg.proto > type.googleapis.com.FundRatesPbMsg.js
+pbjs -t static-module -w commonjs  type.googleapis.com.TickersPbMsg.proto > type.googleapis.com.TickersPbMsg.js
+pbjs -t static-module -w commonjs  type.googleapis.com.CommonPbMsg.proto > type.googleapis.com.CommonPbMsg.js

+ 0 - 1137
client/hotconi/proto/market.v2.trade.area.tickers.js

@@ -1,1137 +0,0 @@
-/*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;

+ 0 - 124
client/hotconi/proto/market.v2.trade.area.tickers.json

@@ -1,124 +0,0 @@
-{
-  "options": {
-    "syntax": "proto3"
-  },
-  "nested": {
-    "market": {
-      "nested": {
-        "v2": {
-          "nested": {
-            "trade": {
-              "nested": {
-                "area": {
-                  "nested": {
-                    "tickers": {
-                      "nested": {
-                        "Response": {
-                          "fields": {
-                            "code": {
-                              "type": "int32",
-                              "id": 1
-                            },
-                            "msg": {
-                              "type": "string",
-                              "id": 2
-                            },
-                            "status": {
-                              "type": "string",
-                              "id": 3
-                            },
-                            "ts": {
-                              "type": "int64",
-                              "id": 4
-                            },
-                            "ch": {
-                              "type": "string",
-                              "id": 5
-                            },
-                            "tradeareapair": {
-                              "type": "TradeAreaPair",
-                              "id": 6
-                            }
-                          }
-                        },
-                        "TradeAreaPair": {
-                          "fields": {
-                            "tradeidList": {
-                              "rule": "repeated",
-                              "type": "TradeArea",
-                              "id": 1
-                            }
-                          }
-                        },
-                        "TradeArea": {
-                          "fields": {
-                            "tradeid": {
-                              "type": "int32",
-                              "id": 1
-                            },
-                            "cny": {
-                              "type": "string",
-                              "id": 2
-                            },
-                            "buy": {
-                              "type": "string",
-                              "id": 3
-                            },
-                            "lever": {
-                              "type": "string",
-                              "id": 4
-                            },
-                            "sell": {
-                              "type": "string",
-                              "id": 5
-                            },
-                            "last": {
-                              "type": "string",
-                              "id": 6
-                            },
-                            "volume": {
-                              "type": "string",
-                              "id": 7
-                            },
-                            "change": {
-                              "type": "string",
-                              "id": 8
-                            },
-                            "high": {
-                              "type": "string",
-                              "id": 9
-                            },
-                            "low": {
-                              "type": "string",
-                              "id": 10
-                            },
-                            "isopen": {
-                              "type": "string",
-                              "id": 11
-                            },
-                            "open": {
-                              "type": "int32",
-                              "id": 12
-                            },
-                            "amount": {
-                              "type": "string",
-                              "id": 13
-                            },
-                            "isfiatconvert": {
-                              "type": "bool",
-                              "id": 14
-                            }
-                          }
-                        }
-                      }
-                    }
-                  }
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-  }
-}

+ 0 - 36
client/hotconi/proto/market.v2.trade.area.tickers.proto

@@ -1,36 +0,0 @@
-syntax = "proto3";
-
-package market.v2.trade.area.tickers; // 替换为你的包名
-
-// 定义最外层的消息类型
-message Response {
-  int32 code = 1;
-  string msg = 2;
-  string status = 3;
-  int64 ts = 4;
-  string ch = 5;
-  TradeAreaPair tradeareapair = 6;
-}
-
-// 定义tradeareapair中的消息类型
-message TradeAreaPair {
-  repeated TradeArea tradeid_list = 1; // 由于JSON中的listList实际上是一个列表,我们使用repeated关键字
-}
-
-// 定义tradeid_list中的消息类型
-message TradeArea {
-  int32 tradeid = 1;
-  string cny = 2;
-  string buy = 3;
-  string lever = 4;
-  string sell = 5;
-  string last = 6;
-  string volume = 7;
-  string change = 8;
-  string high = 9;
-  string low = 10;
-  string isopen = 11;
-  int32 open = 12;
-  string amount = 13;
-  bool isfiatconvert = 14;
-}

+ 0 - 953
client/hotconi/proto/market.v2.trade.main.pair.js

@@ -1,953 +0,0 @@
-/*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.main = (function() {
-
-                /**
-                 * Namespace main.
-                 * @memberof market.v2.trade
-                 * @namespace
-                 */
-                var main = {};
-
-                main.pair = (function() {
-
-                    /**
-                     * Namespace pair.
-                     * @memberof market.v2.trade.main
-                     * @namespace
-                     */
-                    var pair = {};
-
-                    pair.Response = (function() {
-
-                        /**
-                         * Properties of a Response.
-                         * @memberof market.v2.trade.main.pair
-                         * @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.main.pair.IMainPair|null} [mainpair] Response mainpair
-                         */
-
-                        /**
-                         * Constructs a new Response.
-                         * @memberof market.v2.trade.main.pair
-                         * @classdesc Represents a Response.
-                         * @implements IResponse
-                         * @constructor
-                         * @param {market.v2.trade.main.pair.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.main.pair.Response
-                         * @instance
-                         */
-                        Response.prototype.code = 0;
-
-                        /**
-                         * Response msg.
-                         * @member {string} msg
-                         * @memberof market.v2.trade.main.pair.Response
-                         * @instance
-                         */
-                        Response.prototype.msg = "";
-
-                        /**
-                         * Response status.
-                         * @member {string} status
-                         * @memberof market.v2.trade.main.pair.Response
-                         * @instance
-                         */
-                        Response.prototype.status = "";
-
-                        /**
-                         * Response ts.
-                         * @member {number|Long} ts
-                         * @memberof market.v2.trade.main.pair.Response
-                         * @instance
-                         */
-                        Response.prototype.ts = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
-
-                        /**
-                         * Response ch.
-                         * @member {string} ch
-                         * @memberof market.v2.trade.main.pair.Response
-                         * @instance
-                         */
-                        Response.prototype.ch = "";
-
-                        /**
-                         * Response mainpair.
-                         * @member {market.v2.trade.main.pair.IMainPair|null|undefined} mainpair
-                         * @memberof market.v2.trade.main.pair.Response
-                         * @instance
-                         */
-                        Response.prototype.mainpair = null;
-
-                        /**
-                         * Creates a new Response instance using the specified properties.
-                         * @function create
-                         * @memberof market.v2.trade.main.pair.Response
-                         * @static
-                         * @param {market.v2.trade.main.pair.IResponse=} [properties] Properties to set
-                         * @returns {market.v2.trade.main.pair.Response} Response instance
-                         */
-                        Response.create = function create(properties) {
-                            return new Response(properties);
-                        };
-
-                        /**
-                         * Encodes the specified Response message. Does not implicitly {@link market.v2.trade.main.pair.Response.verify|verify} messages.
-                         * @function encode
-                         * @memberof market.v2.trade.main.pair.Response
-                         * @static
-                         * @param {market.v2.trade.main.pair.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.mainpair != null && Object.hasOwnProperty.call(message, "mainpair"))
-                                $root.market.v2.trade.main.pair.MainPair.encode(message.mainpair, 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.main.pair.Response.verify|verify} messages.
-                         * @function encodeDelimited
-                         * @memberof market.v2.trade.main.pair.Response
-                         * @static
-                         * @param {market.v2.trade.main.pair.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.main.pair.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.main.pair.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.main.pair.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.mainpair = $root.market.v2.trade.main.pair.MainPair.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.main.pair.Response
-                         * @static
-                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
-                         * @returns {market.v2.trade.main.pair.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.main.pair.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.mainpair != null && message.hasOwnProperty("mainpair")) {
-                                var error = $root.market.v2.trade.main.pair.MainPair.verify(message.mainpair);
-                                if (error)
-                                    return "mainpair." + 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.main.pair.Response
-                         * @static
-                         * @param {Object.<string,*>} object Plain object
-                         * @returns {market.v2.trade.main.pair.Response} Response
-                         */
-                        Response.fromObject = function fromObject(object) {
-                            if (object instanceof $root.market.v2.trade.main.pair.Response)
-                                return object;
-                            var message = new $root.market.v2.trade.main.pair.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.mainpair != null) {
-                                if (typeof object.mainpair !== "object")
-                                    throw TypeError(".market.v2.trade.main.pair.Response.mainpair: object expected");
-                                message.mainpair = $root.market.v2.trade.main.pair.MainPair.fromObject(object.mainpair);
-                            }
-                            return message;
-                        };
-
-                        /**
-                         * Creates a plain object from a Response message. Also converts values to other types if specified.
-                         * @function toObject
-                         * @memberof market.v2.trade.main.pair.Response
-                         * @static
-                         * @param {market.v2.trade.main.pair.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.mainpair = 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.mainpair != null && message.hasOwnProperty("mainpair"))
-                                object.mainpair = $root.market.v2.trade.main.pair.MainPair.toObject(message.mainpair, options);
-                            return object;
-                        };
-
-                        /**
-                         * Converts this Response to JSON.
-                         * @function toJSON
-                         * @memberof market.v2.trade.main.pair.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.main.pair.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.main.pair.Response";
-                        };
-
-                        return Response;
-                    })();
-
-                    pair.MainPair = (function() {
-
-                        /**
-                         * Properties of a MainPair.
-                         * @memberof market.v2.trade.main.pair
-                         * @interface IMainPair
-                         * @property {Array.<market.v2.trade.main.pair.IPairInfo>|null} [listList] MainPair listList
-                         */
-
-                        /**
-                         * Constructs a new MainPair.
-                         * @memberof market.v2.trade.main.pair
-                         * @classdesc Represents a MainPair.
-                         * @implements IMainPair
-                         * @constructor
-                         * @param {market.v2.trade.main.pair.IMainPair=} [properties] Properties to set
-                         */
-                        function MainPair(properties) {
-                            this.listList = [];
-                            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]];
-                        }
-
-                        /**
-                         * MainPair listList.
-                         * @member {Array.<market.v2.trade.main.pair.IPairInfo>} listList
-                         * @memberof market.v2.trade.main.pair.MainPair
-                         * @instance
-                         */
-                        MainPair.prototype.listList = $util.emptyArray;
-
-                        /**
-                         * Creates a new MainPair instance using the specified properties.
-                         * @function create
-                         * @memberof market.v2.trade.main.pair.MainPair
-                         * @static
-                         * @param {market.v2.trade.main.pair.IMainPair=} [properties] Properties to set
-                         * @returns {market.v2.trade.main.pair.MainPair} MainPair instance
-                         */
-                        MainPair.create = function create(properties) {
-                            return new MainPair(properties);
-                        };
-
-                        /**
-                         * Encodes the specified MainPair message. Does not implicitly {@link market.v2.trade.main.pair.MainPair.verify|verify} messages.
-                         * @function encode
-                         * @memberof market.v2.trade.main.pair.MainPair
-                         * @static
-                         * @param {market.v2.trade.main.pair.IMainPair} message MainPair message or plain object to encode
-                         * @param {$protobuf.Writer} [writer] Writer to encode to
-                         * @returns {$protobuf.Writer} Writer
-                         */
-                        MainPair.encode = function encode(message, writer) {
-                            if (!writer)
-                                writer = $Writer.create();
-                            if (message.listList != null && message.listList.length)
-                                for (var i = 0; i < message.listList.length; ++i)
-                                    $root.market.v2.trade.main.pair.PairInfo.encode(message.listList[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
-                            return writer;
-                        };
-
-                        /**
-                         * Encodes the specified MainPair message, length delimited. Does not implicitly {@link market.v2.trade.main.pair.MainPair.verify|verify} messages.
-                         * @function encodeDelimited
-                         * @memberof market.v2.trade.main.pair.MainPair
-                         * @static
-                         * @param {market.v2.trade.main.pair.IMainPair} message MainPair message or plain object to encode
-                         * @param {$protobuf.Writer} [writer] Writer to encode to
-                         * @returns {$protobuf.Writer} Writer
-                         */
-                        MainPair.encodeDelimited = function encodeDelimited(message, writer) {
-                            return this.encode(message, writer).ldelim();
-                        };
-
-                        /**
-                         * Decodes a MainPair message from the specified reader or buffer.
-                         * @function decode
-                         * @memberof market.v2.trade.main.pair.MainPair
-                         * @static
-                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
-                         * @param {number} [length] Message length if known beforehand
-                         * @returns {market.v2.trade.main.pair.MainPair} MainPair
-                         * @throws {Error} If the payload is not a reader or valid buffer
-                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
-                         */
-                        MainPair.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.main.pair.MainPair();
-                            while (reader.pos < end) {
-                                var tag = reader.uint32();
-                                switch (tag >>> 3) {
-                                case 1: {
-                                        if (!(message.listList && message.listList.length))
-                                            message.listList = [];
-                                        message.listList.push($root.market.v2.trade.main.pair.PairInfo.decode(reader, reader.uint32()));
-                                        break;
-                                    }
-                                default:
-                                    reader.skipType(tag & 7);
-                                    break;
-                                }
-                            }
-                            return message;
-                        };
-
-                        /**
-                         * Decodes a MainPair message from the specified reader or buffer, length delimited.
-                         * @function decodeDelimited
-                         * @memberof market.v2.trade.main.pair.MainPair
-                         * @static
-                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
-                         * @returns {market.v2.trade.main.pair.MainPair} MainPair
-                         * @throws {Error} If the payload is not a reader or valid buffer
-                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
-                         */
-                        MainPair.decodeDelimited = function decodeDelimited(reader) {
-                            if (!(reader instanceof $Reader))
-                                reader = new $Reader(reader);
-                            return this.decode(reader, reader.uint32());
-                        };
-
-                        /**
-                         * Verifies a MainPair message.
-                         * @function verify
-                         * @memberof market.v2.trade.main.pair.MainPair
-                         * @static
-                         * @param {Object.<string,*>} message Plain object to verify
-                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
-                         */
-                        MainPair.verify = function verify(message) {
-                            if (typeof message !== "object" || message === null)
-                                return "object expected";
-                            if (message.listList != null && message.hasOwnProperty("listList")) {
-                                if (!Array.isArray(message.listList))
-                                    return "listList: array expected";
-                                for (var i = 0; i < message.listList.length; ++i) {
-                                    var error = $root.market.v2.trade.main.pair.PairInfo.verify(message.listList[i]);
-                                    if (error)
-                                        return "listList." + error;
-                                }
-                            }
-                            return null;
-                        };
-
-                        /**
-                         * Creates a MainPair message from a plain object. Also converts values to their respective internal types.
-                         * @function fromObject
-                         * @memberof market.v2.trade.main.pair.MainPair
-                         * @static
-                         * @param {Object.<string,*>} object Plain object
-                         * @returns {market.v2.trade.main.pair.MainPair} MainPair
-                         */
-                        MainPair.fromObject = function fromObject(object) {
-                            if (object instanceof $root.market.v2.trade.main.pair.MainPair)
-                                return object;
-                            var message = new $root.market.v2.trade.main.pair.MainPair();
-                            if (object.listList) {
-                                if (!Array.isArray(object.listList))
-                                    throw TypeError(".market.v2.trade.main.pair.MainPair.listList: array expected");
-                                message.listList = [];
-                                for (var i = 0; i < object.listList.length; ++i) {
-                                    if (typeof object.listList[i] !== "object")
-                                        throw TypeError(".market.v2.trade.main.pair.MainPair.listList: object expected");
-                                    message.listList[i] = $root.market.v2.trade.main.pair.PairInfo.fromObject(object.listList[i]);
-                                }
-                            }
-                            return message;
-                        };
-
-                        /**
-                         * Creates a plain object from a MainPair message. Also converts values to other types if specified.
-                         * @function toObject
-                         * @memberof market.v2.trade.main.pair.MainPair
-                         * @static
-                         * @param {market.v2.trade.main.pair.MainPair} message MainPair
-                         * @param {$protobuf.IConversionOptions} [options] Conversion options
-                         * @returns {Object.<string,*>} Plain object
-                         */
-                        MainPair.toObject = function toObject(message, options) {
-                            if (!options)
-                                options = {};
-                            var object = {};
-                            if (options.arrays || options.defaults)
-                                object.listList = [];
-                            if (message.listList && message.listList.length) {
-                                object.listList = [];
-                                for (var j = 0; j < message.listList.length; ++j)
-                                    object.listList[j] = $root.market.v2.trade.main.pair.PairInfo.toObject(message.listList[j], options);
-                            }
-                            return object;
-                        };
-
-                        /**
-                         * Converts this MainPair to JSON.
-                         * @function toJSON
-                         * @memberof market.v2.trade.main.pair.MainPair
-                         * @instance
-                         * @returns {Object.<string,*>} JSON object
-                         */
-                        MainPair.prototype.toJSON = function toJSON() {
-                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
-                        };
-
-                        /**
-                         * Gets the default type url for MainPair
-                         * @function getTypeUrl
-                         * @memberof market.v2.trade.main.pair.MainPair
-                         * @static
-                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
-                         * @returns {string} The default type url
-                         */
-                        MainPair.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
-                            if (typeUrlPrefix === undefined) {
-                                typeUrlPrefix = "type.googleapis.com";
-                            }
-                            return typeUrlPrefix + "/market.v2.trade.main.pair.MainPair";
-                        };
-
-                        return MainPair;
-                    })();
-
-                    pair.PairInfo = (function() {
-
-                        /**
-                         * Properties of a PairInfo.
-                         * @memberof market.v2.trade.main.pair
-                         * @interface IPairInfo
-                         * @property {number|null} [tradeId] PairInfo tradeId
-                         * @property {string|null} [cny] PairInfo cny
-                         * @property {string|null} [totalamount] PairInfo totalamount
-                         * @property {string|null} [last] PairInfo last
-                         * @property {string|null} [volume] PairInfo volume
-                         * @property {string|null} [change] PairInfo change
-                         */
-
-                        /**
-                         * Constructs a new PairInfo.
-                         * @memberof market.v2.trade.main.pair
-                         * @classdesc Represents a PairInfo.
-                         * @implements IPairInfo
-                         * @constructor
-                         * @param {market.v2.trade.main.pair.IPairInfo=} [properties] Properties to set
-                         */
-                        function PairInfo(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]];
-                        }
-
-                        /**
-                         * PairInfo tradeId.
-                         * @member {number} tradeId
-                         * @memberof market.v2.trade.main.pair.PairInfo
-                         * @instance
-                         */
-                        PairInfo.prototype.tradeId = 0;
-
-                        /**
-                         * PairInfo cny.
-                         * @member {string} cny
-                         * @memberof market.v2.trade.main.pair.PairInfo
-                         * @instance
-                         */
-                        PairInfo.prototype.cny = "";
-
-                        /**
-                         * PairInfo totalamount.
-                         * @member {string} totalamount
-                         * @memberof market.v2.trade.main.pair.PairInfo
-                         * @instance
-                         */
-                        PairInfo.prototype.totalamount = "";
-
-                        /**
-                         * PairInfo last.
-                         * @member {string} last
-                         * @memberof market.v2.trade.main.pair.PairInfo
-                         * @instance
-                         */
-                        PairInfo.prototype.last = "";
-
-                        /**
-                         * PairInfo volume.
-                         * @member {string} volume
-                         * @memberof market.v2.trade.main.pair.PairInfo
-                         * @instance
-                         */
-                        PairInfo.prototype.volume = "";
-
-                        /**
-                         * PairInfo change.
-                         * @member {string} change
-                         * @memberof market.v2.trade.main.pair.PairInfo
-                         * @instance
-                         */
-                        PairInfo.prototype.change = "";
-
-                        /**
-                         * Creates a new PairInfo instance using the specified properties.
-                         * @function create
-                         * @memberof market.v2.trade.main.pair.PairInfo
-                         * @static
-                         * @param {market.v2.trade.main.pair.IPairInfo=} [properties] Properties to set
-                         * @returns {market.v2.trade.main.pair.PairInfo} PairInfo instance
-                         */
-                        PairInfo.create = function create(properties) {
-                            return new PairInfo(properties);
-                        };
-
-                        /**
-                         * Encodes the specified PairInfo message. Does not implicitly {@link market.v2.trade.main.pair.PairInfo.verify|verify} messages.
-                         * @function encode
-                         * @memberof market.v2.trade.main.pair.PairInfo
-                         * @static
-                         * @param {market.v2.trade.main.pair.IPairInfo} message PairInfo message or plain object to encode
-                         * @param {$protobuf.Writer} [writer] Writer to encode to
-                         * @returns {$protobuf.Writer} Writer
-                         */
-                        PairInfo.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.totalamount != null && Object.hasOwnProperty.call(message, "totalamount"))
-                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.totalamount);
-                            if (message.last != null && Object.hasOwnProperty.call(message, "last"))
-                                writer.uint32(/* id 4, wireType 2 =*/34).string(message.last);
-                            if (message.volume != null && Object.hasOwnProperty.call(message, "volume"))
-                                writer.uint32(/* id 5, wireType 2 =*/42).string(message.volume);
-                            if (message.change != null && Object.hasOwnProperty.call(message, "change"))
-                                writer.uint32(/* id 6, wireType 2 =*/50).string(message.change);
-                            return writer;
-                        };
-
-                        /**
-                         * Encodes the specified PairInfo message, length delimited. Does not implicitly {@link market.v2.trade.main.pair.PairInfo.verify|verify} messages.
-                         * @function encodeDelimited
-                         * @memberof market.v2.trade.main.pair.PairInfo
-                         * @static
-                         * @param {market.v2.trade.main.pair.IPairInfo} message PairInfo message or plain object to encode
-                         * @param {$protobuf.Writer} [writer] Writer to encode to
-                         * @returns {$protobuf.Writer} Writer
-                         */
-                        PairInfo.encodeDelimited = function encodeDelimited(message, writer) {
-                            return this.encode(message, writer).ldelim();
-                        };
-
-                        /**
-                         * Decodes a PairInfo message from the specified reader or buffer.
-                         * @function decode
-                         * @memberof market.v2.trade.main.pair.PairInfo
-                         * @static
-                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
-                         * @param {number} [length] Message length if known beforehand
-                         * @returns {market.v2.trade.main.pair.PairInfo} PairInfo
-                         * @throws {Error} If the payload is not a reader or valid buffer
-                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
-                         */
-                        PairInfo.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.main.pair.PairInfo();
-                            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.totalamount = reader.string();
-                                        break;
-                                    }
-                                case 4: {
-                                        message.last = reader.string();
-                                        break;
-                                    }
-                                case 5: {
-                                        message.volume = reader.string();
-                                        break;
-                                    }
-                                case 6: {
-                                        message.change = reader.string();
-                                        break;
-                                    }
-                                default:
-                                    reader.skipType(tag & 7);
-                                    break;
-                                }
-                            }
-                            return message;
-                        };
-
-                        /**
-                         * Decodes a PairInfo message from the specified reader or buffer, length delimited.
-                         * @function decodeDelimited
-                         * @memberof market.v2.trade.main.pair.PairInfo
-                         * @static
-                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
-                         * @returns {market.v2.trade.main.pair.PairInfo} PairInfo
-                         * @throws {Error} If the payload is not a reader or valid buffer
-                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
-                         */
-                        PairInfo.decodeDelimited = function decodeDelimited(reader) {
-                            if (!(reader instanceof $Reader))
-                                reader = new $Reader(reader);
-                            return this.decode(reader, reader.uint32());
-                        };
-
-                        /**
-                         * Verifies a PairInfo message.
-                         * @function verify
-                         * @memberof market.v2.trade.main.pair.PairInfo
-                         * @static
-                         * @param {Object.<string,*>} message Plain object to verify
-                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
-                         */
-                        PairInfo.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.totalamount != null && message.hasOwnProperty("totalamount"))
-                                if (!$util.isString(message.totalamount))
-                                    return "totalamount: 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";
-                            return null;
-                        };
-
-                        /**
-                         * Creates a PairInfo message from a plain object. Also converts values to their respective internal types.
-                         * @function fromObject
-                         * @memberof market.v2.trade.main.pair.PairInfo
-                         * @static
-                         * @param {Object.<string,*>} object Plain object
-                         * @returns {market.v2.trade.main.pair.PairInfo} PairInfo
-                         */
-                        PairInfo.fromObject = function fromObject(object) {
-                            if (object instanceof $root.market.v2.trade.main.pair.PairInfo)
-                                return object;
-                            var message = new $root.market.v2.trade.main.pair.PairInfo();
-                            if (object.tradeId != null)
-                                message.tradeId = object.tradeId | 0;
-                            if (object.cny != null)
-                                message.cny = String(object.cny);
-                            if (object.totalamount != null)
-                                message.totalamount = String(object.totalamount);
-                            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);
-                            return message;
-                        };
-
-                        /**
-                         * Creates a plain object from a PairInfo message. Also converts values to other types if specified.
-                         * @function toObject
-                         * @memberof market.v2.trade.main.pair.PairInfo
-                         * @static
-                         * @param {market.v2.trade.main.pair.PairInfo} message PairInfo
-                         * @param {$protobuf.IConversionOptions} [options] Conversion options
-                         * @returns {Object.<string,*>} Plain object
-                         */
-                        PairInfo.toObject = function toObject(message, options) {
-                            if (!options)
-                                options = {};
-                            var object = {};
-                            if (options.defaults) {
-                                object.tradeId = 0;
-                                object.cny = "";
-                                object.totalamount = "";
-                                object.last = "";
-                                object.volume = "";
-                                object.change = "";
-                            }
-                            if (message.tradeId != null && message.hasOwnProperty("tradeId"))
-                                object.tradeId = message.tradeId;
-                            if (message.cny != null && message.hasOwnProperty("cny"))
-                                object.cny = message.cny;
-                            if (message.totalamount != null && message.hasOwnProperty("totalamount"))
-                                object.totalamount = message.totalamount;
-                            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;
-                            return object;
-                        };
-
-                        /**
-                         * Converts this PairInfo to JSON.
-                         * @function toJSON
-                         * @memberof market.v2.trade.main.pair.PairInfo
-                         * @instance
-                         * @returns {Object.<string,*>} JSON object
-                         */
-                        PairInfo.prototype.toJSON = function toJSON() {
-                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
-                        };
-
-                        /**
-                         * Gets the default type url for PairInfo
-                         * @function getTypeUrl
-                         * @memberof market.v2.trade.main.pair.PairInfo
-                         * @static
-                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
-                         * @returns {string} The default type url
-                         */
-                        PairInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
-                            if (typeUrlPrefix === undefined) {
-                                typeUrlPrefix = "type.googleapis.com";
-                            }
-                            return typeUrlPrefix + "/market.v2.trade.main.pair.PairInfo";
-                        };
-
-                        return PairInfo;
-                    })();
-
-                    return pair;
-                })();
-
-                return main;
-            })();
-
-            return trade;
-        })();
-
-        return v2;
-    })();
-
-    return market;
-})();
-
-module.exports = $root;

+ 0 - 92
client/hotconi/proto/market.v2.trade.main.pair.json

@@ -1,92 +0,0 @@
-{
-  "options": {
-    "syntax": "proto3"
-  },
-  "nested": {
-    "market": {
-      "nested": {
-        "v2": {
-          "nested": {
-            "trade": {
-              "nested": {
-                "main": {
-                  "nested": {
-                    "pair": {
-                      "nested": {
-                        "Response": {
-                          "fields": {
-                            "code": {
-                              "type": "int32",
-                              "id": 1
-                            },
-                            "msg": {
-                              "type": "string",
-                              "id": 2
-                            },
-                            "status": {
-                              "type": "string",
-                              "id": 3
-                            },
-                            "ts": {
-                              "type": "int64",
-                              "id": 4
-                            },
-                            "ch": {
-                              "type": "string",
-                              "id": 5
-                            },
-                            "mainpair": {
-                              "type": "MainPair",
-                              "id": 6
-                            }
-                          }
-                        },
-                        "MainPair": {
-                          "fields": {
-                            "listList": {
-                              "rule": "repeated",
-                              "type": "PairInfo",
-                              "id": 1
-                            }
-                          }
-                        },
-                        "PairInfo": {
-                          "fields": {
-                            "tradeId": {
-                              "type": "int32",
-                              "id": 1
-                            },
-                            "cny": {
-                              "type": "string",
-                              "id": 2
-                            },
-                            "totalamount": {
-                              "type": "string",
-                              "id": 3
-                            },
-                            "last": {
-                              "type": "string",
-                              "id": 4
-                            },
-                            "volume": {
-                              "type": "string",
-                              "id": 5
-                            },
-                            "change": {
-                              "type": "string",
-                              "id": 6
-                            }
-                          }
-                        }
-                      }
-                    }
-                  }
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-  }
-}

+ 0 - 28
client/hotconi/proto/market.v2.trade.main.pair.proto

@@ -1,28 +0,0 @@
-syntax = "proto3";
-
-package market.v2.trade.main.pair; // 替换为你的包名
-
-// 定义最外层的消息类型
-message Response {
-  int32 code = 1;
-  string msg = 2;
-  string status = 3;
-  int64 ts = 4;
-  string ch = 5;
-  MainPair mainpair = 6;
-}
-
-// 定义mainpair中的消息类型
-message MainPair {
-  repeated PairInfo list_list = 1; // 使用repeated关键字表示数组
-}
-
-// 定义PairInfo消息类型
-message PairInfo {
-  int32 tradeId = 1;
-  string cny = 2;
-  string totalamount = 3;
-  string last = 4;
-  string volume = 5;
-  string change = 6;
-}

+ 303 - 0
client/hotconi/proto/market.v2.trade.proto

@@ -0,0 +1,303 @@
+syntax = "proto3";
+
+package market.v2.trade;
+
+message Response {
+  int32 code = 1;
+  string msg = 2;
+  string status = 3;
+  int64 ts = 4;
+  string ch = 5;
+  KlineList klinelist = 21;
+  TradeDepthVO tradedepthvo = 22;
+  TradeDetailList tradedetaillist = 23;
+  TradeAreaPair tradeareapair = 24;
+  MainPair mainpair = 25;
+  RecommendPair recommendpair = 26;
+  UpPair uppair = 27;
+  AmtPair amtpair = 28;
+  StarPair starpair = 29;
+  TradeTickerVO tradetickervo = 30;
+  EntrustVO entrustvo = 31;
+  UserAssetBalance userassetbalance = 32;
+  MarketTickerList markettickerlist = 33;
+  MarginCrossAssetVO margincrossassetvo = 35;
+  MarginIsolatedAssetVO marginisolatedassetvo = 36;
+  NewListingPair newlistingpair = 37;
+  Chgdistributions chgdistributions = 38;
+  MarketZones marketzones = 39;
+  KlineOrders klineorders = 40;
+  NotificationPush notificationpush = 41;
+  TradeHotListing tradehotlisting = 42;
+  CtcGoingOrderNum ctcgoingordernum = 43;
+  MultiChange multichange = 44;
+  Heatmap heatmap = 45;
+  DownPair downpair = 46;
+  HeatVol heatvol = 47;
+  CurrencyRate currencyrate = 48;
+  MarketMonit marketmonit = 34;
+}
+
+message KlineList {}
+
+message TradeDepthVO {
+  // 买方深度信息
+  message Bids {
+    // Bids的具体字段未在提供的JavaScript代码中指定,需要根据实际序列化逻辑定义。
+  }
+
+  // 卖方深度信息
+  message Asks {
+    // 卖方深度数据
+    message AskData {
+      // AskData的具体字段未在提供的JavaScript代码中指定,需要根据实际序列化逻辑定义。
+    }
+
+    // 卖方深度数据列表
+    repeated AskData askdataList = 1;
+  }
+
+  // 买方深度信息
+  Bids bids = 1;
+
+  // 卖方深度信息
+  Asks asks = 2;
+
+  // 最新成交价格
+  string last = 3;
+
+  // 开盘价格
+  string open = 4;
+
+  // CNY价格
+  string cny = 5;
+
+  // 净值
+  string netvalue = 6;
+
+  // 买入或卖出的CNY价格
+  string buyorsellcnyprice = 7;
+
+  // 是否转换为法定货币
+  bool isfiatconvert = 8;
+
+  // 是否显示风险提示
+  bool isrisktip = 9;
+}
+
+message TradeDetailList {
+  repeated TradeDetailInfo list = 1;
+}
+// 交易详情列表
+message TradeDetailInfo {
+  int64 tradeid = 1;      // 交易ID
+  string amount = 2;      // 数量
+  string ts = 3;          // 时间戳
+  string price = 4;       // 价格
+  string direction = 5;   // 方向
+}
+
+message TradeAreaPair {
+  repeated TradeAreaPairInfo listList = 1;
+}
+
+message TradeAreaPairInfo {
+  int32 tradeid = 1;
+  string cny = 2;
+  string buy = 3;
+  string lever = 4;
+  string sell = 5;
+  string last = 6;
+  string volume = 7;
+  string change = 8;
+  string high = 9;
+  string low = 10;
+  string isopen = 11;
+  string open = 12;
+  string amount = 13;
+  bool isfiatconvert = 14;
+}
+
+// 定义mainpair中的消息类型
+message MainPair {
+  repeated MainPairInfo listList = 1; // 使用repeated关键字表示数组
+}
+
+// 定义PairInfo消息类型
+message MainPairInfo {
+  int32 tradeId = 1;
+  string cny = 2;
+  string totalamount = 3;
+  string last = 4;
+  string volume = 5;
+  string change = 6;
+}
+
+
+message RecommendPair {
+  repeated RecommendPairInfo listList = 1; // 使用repeated关键字表示数组
+}
+
+// 定义PairInfo消息类型
+message RecommendPairInfo {
+  int32 tradeId = 1;
+  string cny = 2; // 假设cny是浮点数
+  string totalamount = 3; // 假设totalamount是浮点数
+  string last = 4; // 假设last是浮点数
+  string volume = 5; // 假设volume是浮点数
+  string change = 6; // 假设change是浮点数
+}
+
+
+message UpPair {}
+
+message AmtPair {}
+
+message StarPair {}
+
+message TradeTickerVO {
+  int32 tradeid = 1;
+  string high = 2;
+  string open = 3;
+  string low = 4;
+  string close = 5;
+  string volume = 6;
+  string change = 7;
+  string cny = 8;
+  string last = 9;
+  string netvalue = 10;
+  string amount = 11;
+  bool isfiatconvert = 12;
+}
+
+message EntrustVO {
+  int64 id = 1;
+  int32 tradeid = 2;
+  int64 entrusttime = 3;
+  string buycoinshortname = 4;
+  string sellcoinshortname = 5;
+  int32 type = 6;
+  int32 direction = 7;
+  int32 matchtype = 8;
+  string pricetype = 9;
+  string entrustprice = 10;
+  string count = 11;
+  string successcount = 12;
+  string averageprice = 13;
+  int32 status = 14;
+  bool history = 15;
+  int64 pushversion = 16;
+  bool remove = 17;
+  string amount = 18;
+  string marketunit = 19;
+  string funds = 20;
+  string leftfunds = 21;
+  string triggerprice = 22;
+  string marginmode = 23;
+  string margintrademode = 24;
+  bool forcedliquidation = 25;
+  string remark = 26;
+  string successamount = 27;
+  int32 tradearea = 28;
+  string fee = 29;
+  string trailingdelta = 30;
+  string activationprice = 31;
+  int64 activationtime = 32;
+  int32 triggersign = 33;
+  string orderid = 34;
+}
+
+message UserAssetBalance {
+  string usdtassets = 1;
+  string usdtavailableassets = 2;
+  string totalassets = 3;
+  string btcassets = 4;
+  repeated  UserWallet userwalletlist = 5;
+}
+
+message UserWallet {
+  repeated UserWalletPairInfo listList = 1;
+}
+message UserWalletPairInfo{
+  int32 coinid = 1;
+  string totalAmount = 2;
+  string total = 3;
+  string frozen = 4;
+  string borrow = 5;
+  string coinname = 6;
+  string shortName = 7;
+  bool withdraw = 8;
+  bool recharge = 9;
+  string usdtprice = 10;
+  string price = 11;
+  int32 sortid = 12;
+}
+
+message MarketTickerList {}
+
+message MarketMonit {
+  int64 id = 1;
+  string indexkey = 2;
+  int32 scope = 3;
+  int32 tradeid = 4;
+  string tradecode = 5;
+  string indexbase = 6;
+  string quote = 7;
+  string lever = 8;
+  string chg = 9;
+  string last = 10;
+  string cny = 11;
+  string createtime = 12;
+  string biztype = 13;
+  string contracttype = 14;
+  int64 liquidationdate = 15;
+  int64 movetime = 16;
+}
+
+message MarginCrossAssetVO {}
+
+message MarginIsolatedAssetVO {}
+
+message NewListingPair {}
+
+message Chgdistributions {
+  int64 upnum = 1;
+  int64 flatnum = 2;
+  int64 downnum = 3;
+  repeated DistributionPb list = 4;
+}
+
+message DistributionPb {
+  string name = 1;
+  int32 chgType = 2;
+  int64 num = 3;
+}
+
+message MarketZones {}
+
+message KlineOrders {}
+
+message NotificationPush {
+  int32 userid = 1;
+  string title = 2;
+  string body = 3;
+  int32 badge = 4;
+  string group = 5;
+  map<string, string> extrasMap = 6;
+}
+
+message TradeHotListing {}
+
+message CtcGoingOrderNum {
+  int32 ordernum = 1;
+}
+
+message MultiChange {}
+
+message Heatmap {}
+
+message DownPair {}
+
+message HeatVol {}
+
+message CurrencyRate {}

+ 0 - 953
client/hotconi/proto/market.v2.trade.recommend.pair.js

@@ -1,953 +0,0 @@
-/*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.recommend = (function() {
-
-                /**
-                 * Namespace recommend.
-                 * @memberof market.v2.trade
-                 * @namespace
-                 */
-                var recommend = {};
-
-                recommend.pair = (function() {
-
-                    /**
-                     * Namespace pair.
-                     * @memberof market.v2.trade.recommend
-                     * @namespace
-                     */
-                    var pair = {};
-
-                    pair.Response = (function() {
-
-                        /**
-                         * Properties of a Response.
-                         * @memberof market.v2.trade.recommend.pair
-                         * @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.recommend.pair.IRecommendPair|null} [recommendpair] Response recommendpair
-                         */
-
-                        /**
-                         * Constructs a new Response.
-                         * @memberof market.v2.trade.recommend.pair
-                         * @classdesc Represents a Response.
-                         * @implements IResponse
-                         * @constructor
-                         * @param {market.v2.trade.recommend.pair.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.recommend.pair.Response
-                         * @instance
-                         */
-                        Response.prototype.code = 0;
-
-                        /**
-                         * Response msg.
-                         * @member {string} msg
-                         * @memberof market.v2.trade.recommend.pair.Response
-                         * @instance
-                         */
-                        Response.prototype.msg = "";
-
-                        /**
-                         * Response status.
-                         * @member {string} status
-                         * @memberof market.v2.trade.recommend.pair.Response
-                         * @instance
-                         */
-                        Response.prototype.status = "";
-
-                        /**
-                         * Response ts.
-                         * @member {number|Long} ts
-                         * @memberof market.v2.trade.recommend.pair.Response
-                         * @instance
-                         */
-                        Response.prototype.ts = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
-
-                        /**
-                         * Response ch.
-                         * @member {string} ch
-                         * @memberof market.v2.trade.recommend.pair.Response
-                         * @instance
-                         */
-                        Response.prototype.ch = "";
-
-                        /**
-                         * Response recommendpair.
-                         * @member {market.v2.trade.recommend.pair.IRecommendPair|null|undefined} recommendpair
-                         * @memberof market.v2.trade.recommend.pair.Response
-                         * @instance
-                         */
-                        Response.prototype.recommendpair = null;
-
-                        /**
-                         * Creates a new Response instance using the specified properties.
-                         * @function create
-                         * @memberof market.v2.trade.recommend.pair.Response
-                         * @static
-                         * @param {market.v2.trade.recommend.pair.IResponse=} [properties] Properties to set
-                         * @returns {market.v2.trade.recommend.pair.Response} Response instance
-                         */
-                        Response.create = function create(properties) {
-                            return new Response(properties);
-                        };
-
-                        /**
-                         * Encodes the specified Response message. Does not implicitly {@link market.v2.trade.recommend.pair.Response.verify|verify} messages.
-                         * @function encode
-                         * @memberof market.v2.trade.recommend.pair.Response
-                         * @static
-                         * @param {market.v2.trade.recommend.pair.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.recommendpair != null && Object.hasOwnProperty.call(message, "recommendpair"))
-                                $root.market.v2.trade.recommend.pair.RecommendPair.encode(message.recommendpair, 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.recommend.pair.Response.verify|verify} messages.
-                         * @function encodeDelimited
-                         * @memberof market.v2.trade.recommend.pair.Response
-                         * @static
-                         * @param {market.v2.trade.recommend.pair.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.recommend.pair.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.recommend.pair.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.recommend.pair.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.recommendpair = $root.market.v2.trade.recommend.pair.RecommendPair.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.recommend.pair.Response
-                         * @static
-                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
-                         * @returns {market.v2.trade.recommend.pair.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.recommend.pair.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.recommendpair != null && message.hasOwnProperty("recommendpair")) {
-                                var error = $root.market.v2.trade.recommend.pair.RecommendPair.verify(message.recommendpair);
-                                if (error)
-                                    return "recommendpair." + 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.recommend.pair.Response
-                         * @static
-                         * @param {Object.<string,*>} object Plain object
-                         * @returns {market.v2.trade.recommend.pair.Response} Response
-                         */
-                        Response.fromObject = function fromObject(object) {
-                            if (object instanceof $root.market.v2.trade.recommend.pair.Response)
-                                return object;
-                            var message = new $root.market.v2.trade.recommend.pair.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.recommendpair != null) {
-                                if (typeof object.recommendpair !== "object")
-                                    throw TypeError(".market.v2.trade.recommend.pair.Response.recommendpair: object expected");
-                                message.recommendpair = $root.market.v2.trade.recommend.pair.RecommendPair.fromObject(object.recommendpair);
-                            }
-                            return message;
-                        };
-
-                        /**
-                         * Creates a plain object from a Response message. Also converts values to other types if specified.
-                         * @function toObject
-                         * @memberof market.v2.trade.recommend.pair.Response
-                         * @static
-                         * @param {market.v2.trade.recommend.pair.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.recommendpair = 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.recommendpair != null && message.hasOwnProperty("recommendpair"))
-                                object.recommendpair = $root.market.v2.trade.recommend.pair.RecommendPair.toObject(message.recommendpair, options);
-                            return object;
-                        };
-
-                        /**
-                         * Converts this Response to JSON.
-                         * @function toJSON
-                         * @memberof market.v2.trade.recommend.pair.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.recommend.pair.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.recommend.pair.Response";
-                        };
-
-                        return Response;
-                    })();
-
-                    pair.RecommendPair = (function() {
-
-                        /**
-                         * Properties of a RecommendPair.
-                         * @memberof market.v2.trade.recommend.pair
-                         * @interface IRecommendPair
-                         * @property {Array.<market.v2.trade.recommend.pair.IPairInfo>|null} [listList] RecommendPair listList
-                         */
-
-                        /**
-                         * Constructs a new RecommendPair.
-                         * @memberof market.v2.trade.recommend.pair
-                         * @classdesc Represents a RecommendPair.
-                         * @implements IRecommendPair
-                         * @constructor
-                         * @param {market.v2.trade.recommend.pair.IRecommendPair=} [properties] Properties to set
-                         */
-                        function RecommendPair(properties) {
-                            this.listList = [];
-                            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]];
-                        }
-
-                        /**
-                         * RecommendPair listList.
-                         * @member {Array.<market.v2.trade.recommend.pair.IPairInfo>} listList
-                         * @memberof market.v2.trade.recommend.pair.RecommendPair
-                         * @instance
-                         */
-                        RecommendPair.prototype.listList = $util.emptyArray;
-
-                        /**
-                         * Creates a new RecommendPair instance using the specified properties.
-                         * @function create
-                         * @memberof market.v2.trade.recommend.pair.RecommendPair
-                         * @static
-                         * @param {market.v2.trade.recommend.pair.IRecommendPair=} [properties] Properties to set
-                         * @returns {market.v2.trade.recommend.pair.RecommendPair} RecommendPair instance
-                         */
-                        RecommendPair.create = function create(properties) {
-                            return new RecommendPair(properties);
-                        };
-
-                        /**
-                         * Encodes the specified RecommendPair message. Does not implicitly {@link market.v2.trade.recommend.pair.RecommendPair.verify|verify} messages.
-                         * @function encode
-                         * @memberof market.v2.trade.recommend.pair.RecommendPair
-                         * @static
-                         * @param {market.v2.trade.recommend.pair.IRecommendPair} message RecommendPair message or plain object to encode
-                         * @param {$protobuf.Writer} [writer] Writer to encode to
-                         * @returns {$protobuf.Writer} Writer
-                         */
-                        RecommendPair.encode = function encode(message, writer) {
-                            if (!writer)
-                                writer = $Writer.create();
-                            if (message.listList != null && message.listList.length)
-                                for (var i = 0; i < message.listList.length; ++i)
-                                    $root.market.v2.trade.recommend.pair.PairInfo.encode(message.listList[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
-                            return writer;
-                        };
-
-                        /**
-                         * Encodes the specified RecommendPair message, length delimited. Does not implicitly {@link market.v2.trade.recommend.pair.RecommendPair.verify|verify} messages.
-                         * @function encodeDelimited
-                         * @memberof market.v2.trade.recommend.pair.RecommendPair
-                         * @static
-                         * @param {market.v2.trade.recommend.pair.IRecommendPair} message RecommendPair message or plain object to encode
-                         * @param {$protobuf.Writer} [writer] Writer to encode to
-                         * @returns {$protobuf.Writer} Writer
-                         */
-                        RecommendPair.encodeDelimited = function encodeDelimited(message, writer) {
-                            return this.encode(message, writer).ldelim();
-                        };
-
-                        /**
-                         * Decodes a RecommendPair message from the specified reader or buffer.
-                         * @function decode
-                         * @memberof market.v2.trade.recommend.pair.RecommendPair
-                         * @static
-                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
-                         * @param {number} [length] Message length if known beforehand
-                         * @returns {market.v2.trade.recommend.pair.RecommendPair} RecommendPair
-                         * @throws {Error} If the payload is not a reader or valid buffer
-                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
-                         */
-                        RecommendPair.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.recommend.pair.RecommendPair();
-                            while (reader.pos < end) {
-                                var tag = reader.uint32();
-                                switch (tag >>> 3) {
-                                case 1: {
-                                        if (!(message.listList && message.listList.length))
-                                            message.listList = [];
-                                        message.listList.push($root.market.v2.trade.recommend.pair.PairInfo.decode(reader, reader.uint32()));
-                                        break;
-                                    }
-                                default:
-                                    reader.skipType(tag & 7);
-                                    break;
-                                }
-                            }
-                            return message;
-                        };
-
-                        /**
-                         * Decodes a RecommendPair message from the specified reader or buffer, length delimited.
-                         * @function decodeDelimited
-                         * @memberof market.v2.trade.recommend.pair.RecommendPair
-                         * @static
-                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
-                         * @returns {market.v2.trade.recommend.pair.RecommendPair} RecommendPair
-                         * @throws {Error} If the payload is not a reader or valid buffer
-                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
-                         */
-                        RecommendPair.decodeDelimited = function decodeDelimited(reader) {
-                            if (!(reader instanceof $Reader))
-                                reader = new $Reader(reader);
-                            return this.decode(reader, reader.uint32());
-                        };
-
-                        /**
-                         * Verifies a RecommendPair message.
-                         * @function verify
-                         * @memberof market.v2.trade.recommend.pair.RecommendPair
-                         * @static
-                         * @param {Object.<string,*>} message Plain object to verify
-                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
-                         */
-                        RecommendPair.verify = function verify(message) {
-                            if (typeof message !== "object" || message === null)
-                                return "object expected";
-                            if (message.listList != null && message.hasOwnProperty("listList")) {
-                                if (!Array.isArray(message.listList))
-                                    return "listList: array expected";
-                                for (var i = 0; i < message.listList.length; ++i) {
-                                    var error = $root.market.v2.trade.recommend.pair.PairInfo.verify(message.listList[i]);
-                                    if (error)
-                                        return "listList." + error;
-                                }
-                            }
-                            return null;
-                        };
-
-                        /**
-                         * Creates a RecommendPair message from a plain object. Also converts values to their respective internal types.
-                         * @function fromObject
-                         * @memberof market.v2.trade.recommend.pair.RecommendPair
-                         * @static
-                         * @param {Object.<string,*>} object Plain object
-                         * @returns {market.v2.trade.recommend.pair.RecommendPair} RecommendPair
-                         */
-                        RecommendPair.fromObject = function fromObject(object) {
-                            if (object instanceof $root.market.v2.trade.recommend.pair.RecommendPair)
-                                return object;
-                            var message = new $root.market.v2.trade.recommend.pair.RecommendPair();
-                            if (object.listList) {
-                                if (!Array.isArray(object.listList))
-                                    throw TypeError(".market.v2.trade.recommend.pair.RecommendPair.listList: array expected");
-                                message.listList = [];
-                                for (var i = 0; i < object.listList.length; ++i) {
-                                    if (typeof object.listList[i] !== "object")
-                                        throw TypeError(".market.v2.trade.recommend.pair.RecommendPair.listList: object expected");
-                                    message.listList[i] = $root.market.v2.trade.recommend.pair.PairInfo.fromObject(object.listList[i]);
-                                }
-                            }
-                            return message;
-                        };
-
-                        /**
-                         * Creates a plain object from a RecommendPair message. Also converts values to other types if specified.
-                         * @function toObject
-                         * @memberof market.v2.trade.recommend.pair.RecommendPair
-                         * @static
-                         * @param {market.v2.trade.recommend.pair.RecommendPair} message RecommendPair
-                         * @param {$protobuf.IConversionOptions} [options] Conversion options
-                         * @returns {Object.<string,*>} Plain object
-                         */
-                        RecommendPair.toObject = function toObject(message, options) {
-                            if (!options)
-                                options = {};
-                            var object = {};
-                            if (options.arrays || options.defaults)
-                                object.listList = [];
-                            if (message.listList && message.listList.length) {
-                                object.listList = [];
-                                for (var j = 0; j < message.listList.length; ++j)
-                                    object.listList[j] = $root.market.v2.trade.recommend.pair.PairInfo.toObject(message.listList[j], options);
-                            }
-                            return object;
-                        };
-
-                        /**
-                         * Converts this RecommendPair to JSON.
-                         * @function toJSON
-                         * @memberof market.v2.trade.recommend.pair.RecommendPair
-                         * @instance
-                         * @returns {Object.<string,*>} JSON object
-                         */
-                        RecommendPair.prototype.toJSON = function toJSON() {
-                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
-                        };
-
-                        /**
-                         * Gets the default type url for RecommendPair
-                         * @function getTypeUrl
-                         * @memberof market.v2.trade.recommend.pair.RecommendPair
-                         * @static
-                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
-                         * @returns {string} The default type url
-                         */
-                        RecommendPair.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
-                            if (typeUrlPrefix === undefined) {
-                                typeUrlPrefix = "type.googleapis.com";
-                            }
-                            return typeUrlPrefix + "/market.v2.trade.recommend.pair.RecommendPair";
-                        };
-
-                        return RecommendPair;
-                    })();
-
-                    pair.PairInfo = (function() {
-
-                        /**
-                         * Properties of a PairInfo.
-                         * @memberof market.v2.trade.recommend.pair
-                         * @interface IPairInfo
-                         * @property {number|null} [tradeId] PairInfo tradeId
-                         * @property {string|null} [cny] PairInfo cny
-                         * @property {string|null} [totalamount] PairInfo totalamount
-                         * @property {string|null} [last] PairInfo last
-                         * @property {string|null} [volume] PairInfo volume
-                         * @property {string|null} [change] PairInfo change
-                         */
-
-                        /**
-                         * Constructs a new PairInfo.
-                         * @memberof market.v2.trade.recommend.pair
-                         * @classdesc Represents a PairInfo.
-                         * @implements IPairInfo
-                         * @constructor
-                         * @param {market.v2.trade.recommend.pair.IPairInfo=} [properties] Properties to set
-                         */
-                        function PairInfo(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]];
-                        }
-
-                        /**
-                         * PairInfo tradeId.
-                         * @member {number} tradeId
-                         * @memberof market.v2.trade.recommend.pair.PairInfo
-                         * @instance
-                         */
-                        PairInfo.prototype.tradeId = 0;
-
-                        /**
-                         * PairInfo cny.
-                         * @member {string} cny
-                         * @memberof market.v2.trade.recommend.pair.PairInfo
-                         * @instance
-                         */
-                        PairInfo.prototype.cny = "";
-
-                        /**
-                         * PairInfo totalamount.
-                         * @member {string} totalamount
-                         * @memberof market.v2.trade.recommend.pair.PairInfo
-                         * @instance
-                         */
-                        PairInfo.prototype.totalamount = "";
-
-                        /**
-                         * PairInfo last.
-                         * @member {string} last
-                         * @memberof market.v2.trade.recommend.pair.PairInfo
-                         * @instance
-                         */
-                        PairInfo.prototype.last = "";
-
-                        /**
-                         * PairInfo volume.
-                         * @member {string} volume
-                         * @memberof market.v2.trade.recommend.pair.PairInfo
-                         * @instance
-                         */
-                        PairInfo.prototype.volume = "";
-
-                        /**
-                         * PairInfo change.
-                         * @member {string} change
-                         * @memberof market.v2.trade.recommend.pair.PairInfo
-                         * @instance
-                         */
-                        PairInfo.prototype.change = "";
-
-                        /**
-                         * Creates a new PairInfo instance using the specified properties.
-                         * @function create
-                         * @memberof market.v2.trade.recommend.pair.PairInfo
-                         * @static
-                         * @param {market.v2.trade.recommend.pair.IPairInfo=} [properties] Properties to set
-                         * @returns {market.v2.trade.recommend.pair.PairInfo} PairInfo instance
-                         */
-                        PairInfo.create = function create(properties) {
-                            return new PairInfo(properties);
-                        };
-
-                        /**
-                         * Encodes the specified PairInfo message. Does not implicitly {@link market.v2.trade.recommend.pair.PairInfo.verify|verify} messages.
-                         * @function encode
-                         * @memberof market.v2.trade.recommend.pair.PairInfo
-                         * @static
-                         * @param {market.v2.trade.recommend.pair.IPairInfo} message PairInfo message or plain object to encode
-                         * @param {$protobuf.Writer} [writer] Writer to encode to
-                         * @returns {$protobuf.Writer} Writer
-                         */
-                        PairInfo.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.totalamount != null && Object.hasOwnProperty.call(message, "totalamount"))
-                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.totalamount);
-                            if (message.last != null && Object.hasOwnProperty.call(message, "last"))
-                                writer.uint32(/* id 4, wireType 2 =*/34).string(message.last);
-                            if (message.volume != null && Object.hasOwnProperty.call(message, "volume"))
-                                writer.uint32(/* id 5, wireType 2 =*/42).string(message.volume);
-                            if (message.change != null && Object.hasOwnProperty.call(message, "change"))
-                                writer.uint32(/* id 6, wireType 2 =*/50).string(message.change);
-                            return writer;
-                        };
-
-                        /**
-                         * Encodes the specified PairInfo message, length delimited. Does not implicitly {@link market.v2.trade.recommend.pair.PairInfo.verify|verify} messages.
-                         * @function encodeDelimited
-                         * @memberof market.v2.trade.recommend.pair.PairInfo
-                         * @static
-                         * @param {market.v2.trade.recommend.pair.IPairInfo} message PairInfo message or plain object to encode
-                         * @param {$protobuf.Writer} [writer] Writer to encode to
-                         * @returns {$protobuf.Writer} Writer
-                         */
-                        PairInfo.encodeDelimited = function encodeDelimited(message, writer) {
-                            return this.encode(message, writer).ldelim();
-                        };
-
-                        /**
-                         * Decodes a PairInfo message from the specified reader or buffer.
-                         * @function decode
-                         * @memberof market.v2.trade.recommend.pair.PairInfo
-                         * @static
-                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
-                         * @param {number} [length] Message length if known beforehand
-                         * @returns {market.v2.trade.recommend.pair.PairInfo} PairInfo
-                         * @throws {Error} If the payload is not a reader or valid buffer
-                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
-                         */
-                        PairInfo.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.recommend.pair.PairInfo();
-                            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.totalamount = reader.string();
-                                        break;
-                                    }
-                                case 4: {
-                                        message.last = reader.string();
-                                        break;
-                                    }
-                                case 5: {
-                                        message.volume = reader.string();
-                                        break;
-                                    }
-                                case 6: {
-                                        message.change = reader.string();
-                                        break;
-                                    }
-                                default:
-                                    reader.skipType(tag & 7);
-                                    break;
-                                }
-                            }
-                            return message;
-                        };
-
-                        /**
-                         * Decodes a PairInfo message from the specified reader or buffer, length delimited.
-                         * @function decodeDelimited
-                         * @memberof market.v2.trade.recommend.pair.PairInfo
-                         * @static
-                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
-                         * @returns {market.v2.trade.recommend.pair.PairInfo} PairInfo
-                         * @throws {Error} If the payload is not a reader or valid buffer
-                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
-                         */
-                        PairInfo.decodeDelimited = function decodeDelimited(reader) {
-                            if (!(reader instanceof $Reader))
-                                reader = new $Reader(reader);
-                            return this.decode(reader, reader.uint32());
-                        };
-
-                        /**
-                         * Verifies a PairInfo message.
-                         * @function verify
-                         * @memberof market.v2.trade.recommend.pair.PairInfo
-                         * @static
-                         * @param {Object.<string,*>} message Plain object to verify
-                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
-                         */
-                        PairInfo.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.totalamount != null && message.hasOwnProperty("totalamount"))
-                                if (!$util.isString(message.totalamount))
-                                    return "totalamount: 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";
-                            return null;
-                        };
-
-                        /**
-                         * Creates a PairInfo message from a plain object. Also converts values to their respective internal types.
-                         * @function fromObject
-                         * @memberof market.v2.trade.recommend.pair.PairInfo
-                         * @static
-                         * @param {Object.<string,*>} object Plain object
-                         * @returns {market.v2.trade.recommend.pair.PairInfo} PairInfo
-                         */
-                        PairInfo.fromObject = function fromObject(object) {
-                            if (object instanceof $root.market.v2.trade.recommend.pair.PairInfo)
-                                return object;
-                            var message = new $root.market.v2.trade.recommend.pair.PairInfo();
-                            if (object.tradeId != null)
-                                message.tradeId = object.tradeId | 0;
-                            if (object.cny != null)
-                                message.cny = String(object.cny);
-                            if (object.totalamount != null)
-                                message.totalamount = String(object.totalamount);
-                            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);
-                            return message;
-                        };
-
-                        /**
-                         * Creates a plain object from a PairInfo message. Also converts values to other types if specified.
-                         * @function toObject
-                         * @memberof market.v2.trade.recommend.pair.PairInfo
-                         * @static
-                         * @param {market.v2.trade.recommend.pair.PairInfo} message PairInfo
-                         * @param {$protobuf.IConversionOptions} [options] Conversion options
-                         * @returns {Object.<string,*>} Plain object
-                         */
-                        PairInfo.toObject = function toObject(message, options) {
-                            if (!options)
-                                options = {};
-                            var object = {};
-                            if (options.defaults) {
-                                object.tradeId = 0;
-                                object.cny = "";
-                                object.totalamount = "";
-                                object.last = "";
-                                object.volume = "";
-                                object.change = "";
-                            }
-                            if (message.tradeId != null && message.hasOwnProperty("tradeId"))
-                                object.tradeId = message.tradeId;
-                            if (message.cny != null && message.hasOwnProperty("cny"))
-                                object.cny = message.cny;
-                            if (message.totalamount != null && message.hasOwnProperty("totalamount"))
-                                object.totalamount = message.totalamount;
-                            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;
-                            return object;
-                        };
-
-                        /**
-                         * Converts this PairInfo to JSON.
-                         * @function toJSON
-                         * @memberof market.v2.trade.recommend.pair.PairInfo
-                         * @instance
-                         * @returns {Object.<string,*>} JSON object
-                         */
-                        PairInfo.prototype.toJSON = function toJSON() {
-                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
-                        };
-
-                        /**
-                         * Gets the default type url for PairInfo
-                         * @function getTypeUrl
-                         * @memberof market.v2.trade.recommend.pair.PairInfo
-                         * @static
-                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
-                         * @returns {string} The default type url
-                         */
-                        PairInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
-                            if (typeUrlPrefix === undefined) {
-                                typeUrlPrefix = "type.googleapis.com";
-                            }
-                            return typeUrlPrefix + "/market.v2.trade.recommend.pair.PairInfo";
-                        };
-
-                        return PairInfo;
-                    })();
-
-                    return pair;
-                })();
-
-                return recommend;
-            })();
-
-            return trade;
-        })();
-
-        return v2;
-    })();
-
-    return market;
-})();
-
-module.exports = $root;

+ 0 - 92
client/hotconi/proto/market.v2.trade.recommend.pair.json

@@ -1,92 +0,0 @@
-{
-  "options": {
-    "syntax": "proto3"
-  },
-  "nested": {
-    "market": {
-      "nested": {
-        "v2": {
-          "nested": {
-            "trade": {
-              "nested": {
-                "recommend": {
-                  "nested": {
-                    "pair": {
-                      "nested": {
-                        "Response": {
-                          "fields": {
-                            "code": {
-                              "type": "int32",
-                              "id": 1
-                            },
-                            "msg": {
-                              "type": "string",
-                              "id": 2
-                            },
-                            "status": {
-                              "type": "string",
-                              "id": 3
-                            },
-                            "ts": {
-                              "type": "int64",
-                              "id": 4
-                            },
-                            "ch": {
-                              "type": "string",
-                              "id": 5
-                            },
-                            "recommendpair": {
-                              "type": "RecommendPair",
-                              "id": 6
-                            }
-                          }
-                        },
-                        "RecommendPair": {
-                          "fields": {
-                            "listList": {
-                              "rule": "repeated",
-                              "type": "PairInfo",
-                              "id": 1
-                            }
-                          }
-                        },
-                        "PairInfo": {
-                          "fields": {
-                            "tradeId": {
-                              "type": "int32",
-                              "id": 1
-                            },
-                            "cny": {
-                              "type": "string",
-                              "id": 2
-                            },
-                            "totalamount": {
-                              "type": "string",
-                              "id": 3
-                            },
-                            "last": {
-                              "type": "string",
-                              "id": 4
-                            },
-                            "volume": {
-                              "type": "string",
-                              "id": 5
-                            },
-                            "change": {
-                              "type": "string",
-                              "id": 6
-                            }
-                          }
-                        }
-                      }
-                    }
-                  }
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-  }
-}

+ 0 - 28
client/hotconi/proto/market.v2.trade.recommend.pair.proto

@@ -1,28 +0,0 @@
-syntax = "proto3";
-
-package market.v2.trade.recommend.pair; // 替换为你的包名
-
-// 定义最外层的消息类型
-message Response {
-  int32 code = 1;
-  string msg = 2;
-  string status = 3;
-  int64 ts = 4;
-  string ch = 5;
-  RecommendPair recommendpair = 6;
-}
-
-// 定义recommendpair中的消息类型
-message RecommendPair {
-  repeated PairInfo listList = 1; // 使用repeated关键字表示数组
-}
-
-// 定义PairInfo消息类型
-message PairInfo {
-  int32 tradeId = 1;
-  string cny = 2; // 假设cny是浮点数
-  string totalamount = 3; // 假设totalamount是浮点数
-  string last = 4; // 假设last是浮点数
-  string volume = 5; // 假设volume是浮点数
-  string change = 6; // 假设change是浮点数
-}

+ 115 - 0
client/hotconi/proto/readme.md

@@ -1,3 +1,5 @@
+解决JSON.stringify 丢undefined 的问题
+
 ```js
 JSON.stringify(obj, (key, value) => {
     if (value === undefined) {
@@ -6,3 +8,116 @@ JSON.stringify(obj, (key, value) => {
     return value
 })
 ```
+##  proto 逆向过程
+
+hotconi 采用 wss和rpc方式通信,经过采样发现,使用`protobufjs`可以解开
+
+wss通信后,使用proto对象镜像接收数据。
+
+proto对象已经被编译混淆,无法还原,但是可以通过返回值猜测结构和排序。
+
+以`market.v2.trade.area.tickers` 为例 
+
+### 在网页上抓包接 返回值结构
+```json
+{
+  "code": 200,
+  "msg": "SUCCESS",
+  "status": "ok",
+  "ts": 1732365915001,
+  "ch": "market.v2.trade.area.tickers",
+  "klinelist": null,
+  "tradedepthvo": null,
+  "tradedetaillist": null,
+  "tradeareapair": {
+    "listList": [
+      {
+        "tradeid": 1900573,
+        "cny": "0.000499",
+        "buy": "0.00006590000000000000",
+        "lever": "0",
+        "sell": "0.00006899000000000000",
+        "last": "0.00006899000000000000",
+        "volume": "4612936154.8542",
+        "change": "0.96",
+        "high": "0.00007299000000000000",
+        "low": "0.00006451000000000000",
+        "isopen": "1",
+        "open": "0",
+        "amount": "307750.69",
+        "isfiatconvert": true
+      }
+
+    ]
+  },
+  "mainpair": null,
+  "recommendpair": null,
+  "uppair": null,
+  "amtpair": null,
+  "starpair": null,
+  "tradetickervo": null,
+  "entrustvo": null,
+  "userassetbalance": null,
+  "markettickerlist": null,
+  "marketmonit": null,
+  "margincrossassetvo": null,
+  "marginisolatedassetvo": null,
+  "newlistingpair": null,
+  "chgdistributions": null,
+  "marketzones": null,
+  "klineorders": null,
+  "notificationpush": null,
+  "tradehotlisting": null,
+  "ctcgoingordernum": null,
+  "multichange": null,
+  "heatmap": null,
+  "downpair": null,
+  "heatvol": null,
+  "currencyrate": null
+}
+```
+### 按照 proto格式  逆向编写文件
+```protobuf
+syntax = "proto3";
+
+package market.v2.trade; // 替换为你的包名
+
+// 定义最外层的消息类型
+message Response {
+  int32 code = 1;  //数字代表 字段的编号顺序。
+  string msg = 2;
+  string status = 3;
+  int64 ts = 4;
+  string ch = 5;
+  TradeAreaPair tradeareapair = 25;
+}
+
+// 定义tradeareapair中的消息类型
+message TradeAreaPair {
+  repeated TradeArea listList = 1; // 由于JSON中的listList实际上是一个列表,我们使用repeated关键字
+}
+
+// 定义tradeid_list中的消息类型
+message TradeArea {
+  int32 tradeid = 1;
+  string cny = 2;
+  string buy = 3;
+  int32 lever = 4; 
+  string sell = 5;
+  string last = 6;
+  string volume = 7;
+  string change = 8;
+  string high = 9;
+  string low = 10;
+  string isopen = 11;
+  int32 open = 12;
+  string amount = 13;
+  bool isfiatconvert = 14;
+}
+
+```
+***【重点】***
+如果网页抓包的某项有值,但是接收到的没有值,需要调整每一个字段的编号。
+上面是一个包的方式,其他所有接口都类似抓取,然后 规范的添加到 [market.v2.trade.proto](market.v2.trade.proto)
+
+

+ 32 - 0
client/hotconi/proto/type.googleapis.com.CandlesPbMsg.proto

@@ -0,0 +1,32 @@
+syntax = "proto3";
+
+package type.googleapis.com; // 替换为你的包名
+
+// 响应消息
+message Response {
+  string biz = 1; // 业务类型
+  string type = 2; // 消息类型
+  string base = 3; // 基础货币
+  string quote = 4; // 报价货币
+  string contractcode = 5; // 合约代码
+  string granularity = 6; // 粒度
+  Data data = 7; // 数据
+  int32 env = 8; // 环境标识
+}
+
+// 数据消息
+message Data {
+  string typeUrl = 1; // 数据类型URL
+  KlineData value = 2; // 数据值
+}
+
+
+message KlineData {
+  int64 createate = 1;  // 创建日期
+  string low = 2;       // 最低价
+  string high = 3;      // 最高价
+  string open = 4;      // 开盘价
+  string close = 5;     // 收盘价
+  string amount = 6;    // 交易量
+  string size = 7;      // 交易额
+}

+ 23 - 0
client/hotconi/proto/type.googleapis.com.CommonPbMsg.proto

@@ -0,0 +1,23 @@
+syntax = "proto3";
+
+package type.googleapis.com; // 替换为你的包名
+
+// 响应消息
+message Response {
+  string biz = 1; // 业务类型
+  string type = 2; // 消息类型
+  string base = 3; // 基础货币
+  string quote = 4; // 报价货币
+  string contractcode = 5; // 合约代码
+  string granularity = 6; // 粒度
+  Data data = 7; // 数据
+  int32 env = 8; // 环境标识
+}
+
+// 数据消息
+message Data {
+  string typeUrl = 1; // 数据类型URL
+  string value = 2; // 数据值
+}
+
+

+ 34 - 0
client/hotconi/proto/type.googleapis.com.DepthPbMsg.proto

@@ -0,0 +1,34 @@
+syntax = "proto3";
+
+package type.googleapis.com; // 替换为你的包名
+
+// 响应消息
+message Response {
+  string biz = 1; // 业务类型
+  string type = 2; // 消息类型
+  string base = 3; // 基础货币
+  string quote = 4; // 报价货币
+  string contractcode = 5; // 合约代码
+  string granularity = 6; // 粒度
+  Data data = 7; // 数据
+  int32 env = 8; // 环境标识
+}
+
+// 数据消息
+message Data {
+  string typeUrl = 1; // 数据类型URL
+  DepthPbMsg value = 2; // 数据值
+}
+
+
+message DepthPbMsg {
+  message Body {
+    // Body的具体字段未在提供的JavaScript代码中指定,需要根据实际序列化逻辑定义。
+  }
+
+  // 卖方深度列表
+  repeated Body asksList = 1;
+
+  // 买方深度列表
+  repeated Body bidsList = 2;
+}

+ 30 - 0
client/hotconi/proto/type.googleapis.com.FillsPbMsg.proto

@@ -0,0 +1,30 @@
+syntax = "proto3";
+
+package type.googleapis.com; // 替换为你的包名
+
+// 响应消息
+message Response {
+  string biz = 1; // 业务类型
+  string type = 2; // 消息类型
+  string base = 3; // 基础货币
+  string quote = 4; // 报价货币
+  string contractcode = 5; // 合约代码
+  string granularity = 6; // 粒度
+  Data data = 7; // 数据
+  int32 env = 8; // 环境标识
+}
+
+// 数据消息
+message Data {
+  string typeUrl = 1; // 数据类型URL
+  OrderVoPb value = 2; // 数据值
+}
+
+
+message OrderVoPb {
+  string price = 1;          // 价格
+  string amount = 2;         // 数量
+  string side = 3;           // 交易方向,例如:"buy" 或 "sell"
+  int64 createddate = 4;     // 创建日期
+  int64 id = 5;              // 订单ID
+}

+ 44 - 0
client/hotconi/proto/type.googleapis.com.FundRatesPbMsg.proto

@@ -0,0 +1,44 @@
+syntax = "proto3";
+
+package type.googleapis.com; // 替换为你的包名
+
+// 响应消息
+message Response {
+  string biz = 1; // 业务类型
+  string type = 2; // 消息类型
+  string base = 3; // 基础货币
+  string quote = 4; // 报价货币
+  string contractcode = 5; // 合约代码
+  string granularity = 6; // 粒度
+  Data data = 7; // 数据
+  int32 env = 8; // 环境标识
+}
+
+// 数据消息
+message Data {
+  string typeUrl = 1; // 数据类型URL
+  ContractInfo value = 2; // 数据值
+}
+
+
+
+message ContractInfo {
+  string contractcode = 1;               // 合约代码
+  string markprice = 2;                 // 标记价格
+  string indexprice = 3;                // 指数价格
+  string fee_rate = 4;                  // 费率
+  string estimate_fee_rate = 5;         // 预估费率
+  int64 next_liquidation_interval = 6;  // 下一个清算间隔
+  string total_position = 7;            // 总持仓量
+  string index_cny = 8;                 // 指数价格CNY
+  string mark_cny = 9;                  // 标记价格CNY
+  int32 env = 10;                       // 环境标识
+  string base = 11;                     // 基础货币
+  string index_base = 12;               // 指数基础货币
+  string quote = 13;                    // 报价货币
+  string base_display_name = 14;        // 基础货币显示名称
+  string index_base_display_name = 15;  // 指数基础货币显示名称
+  string quote_display_name = 16;       // 报价货币显示名称
+  string pre_delivery_price = 17;       // 交割前价格
+  int32 online = 18;                    // 在线状态
+}

+ 39 - 0
client/hotconi/proto/type.googleapis.com.TickersPbMsg.proto

@@ -0,0 +1,39 @@
+syntax = "proto3";
+
+package type.googleapis.com; // 替换为你的包名
+
+// 响应消息
+message Response {
+  string biz = 1; // 业务类型
+  string type = 2; // 消息类型
+  string base = 3; // 基础货币
+  string quote = 4; // 报价货币
+  string contractcode = 5; // 合约代码
+  string granularity = 6; // 粒度
+  Data data = 7; // 数据
+  int32 env = 8; // 环境标识
+}
+
+// 数据消息
+message Data {
+  string typeUrl = 1; // 数据类型URL
+  MarketData value = 2; // 数据值
+}
+
+
+message MarketData {
+  int64 createddate = 1;               // 创建日期
+  string high = 2;                     // 最高价
+  string low = 3;                      // 最低价
+  string amount24 = 4;                 // 24小时交易量
+  string size24 = 5;                   // 24小时交易额
+  string first = 6;                    // 开盘价
+  string last = 7;                     // 最新价
+  string change24 = 8;                 // 24小时价格变化
+  string changepercentage = 9;         // 24小时价格变化百分比
+  string buy = 10;                     // 买入价
+  string sell = 11;                    // 卖出价
+  string contractcode = 12;            // 合约代码
+  string lastcny = 13;                 // 最新人民币价格
+  int32 env = 14;                      // 环境标识
+}

部分文件因为文件数量过多而无法显示