@openfeed/sdk-js 1.6.5 → 1.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1781,7 +1781,208 @@ function createBaseInstrumentDefinition() {
1781
1781
  roundLotSize: 0
1782
1782
  };
1783
1783
  }
1784
- const InstrumentDefinitionDecode = {
1784
+ const InstrumentDefinitionEncode = {
1785
+ encode(message, writer = new BinaryWriter()) {
1786
+ if (!message.marketId.equals(Long.ZERO)) {
1787
+ writer.uint32(8).sint64(message.marketId.toString());
1788
+ }
1789
+ if (message.instrumentType !== 0) {
1790
+ writer.uint32(16).int32(message.instrumentType);
1791
+ }
1792
+ writer.uint32(26).fork();
1793
+ for (const v of message.supportBookTypes) {
1794
+ writer.int32(v);
1795
+ }
1796
+ writer.join();
1797
+ if (message.bookDepth !== 0) {
1798
+ writer.uint32(32).sint32(message.bookDepth);
1799
+ }
1800
+ if (message.vendorId !== "") {
1801
+ writer.uint32(42).string(message.vendorId);
1802
+ }
1803
+ if (message.symbol !== "") {
1804
+ writer.uint32(50).string(message.symbol);
1805
+ }
1806
+ if (message.description !== "") {
1807
+ writer.uint32(58).string(message.description);
1808
+ }
1809
+ if (message.cfiCode !== "") {
1810
+ writer.uint32(66).string(message.cfiCode);
1811
+ }
1812
+ if (message.currencyCode !== "") {
1813
+ writer.uint32(74).string(message.currencyCode);
1814
+ }
1815
+ if (message.exchangeCode !== "") {
1816
+ writer.uint32(82).string(message.exchangeCode);
1817
+ }
1818
+ if (message.minimumPriceIncrement !== 0) {
1819
+ writer.uint32(93).float(message.minimumPriceIncrement);
1820
+ }
1821
+ if (message.contractPointValue !== 0) {
1822
+ writer.uint32(101).float(message.contractPointValue);
1823
+ }
1824
+ if (message.schedule !== void 0) {
1825
+ InstrumentDefinition_ScheduleEncode.encode(message.schedule, writer.uint32(106).fork()).join();
1826
+ }
1827
+ if (message.calendar !== void 0) {
1828
+ InstrumentDefinition_CalendarEncode.encode(message.calendar, writer.uint32(114).fork()).join();
1829
+ }
1830
+ if (!message.recordCreateTime.equals(Long.ZERO)) {
1831
+ writer.uint32(120).sint64(message.recordCreateTime.toString());
1832
+ }
1833
+ if (!message.recordUpdateTime.equals(Long.ZERO)) {
1834
+ writer.uint32(128).sint64(message.recordUpdateTime.toString());
1835
+ }
1836
+ if (message.timeZoneName !== "") {
1837
+ writer.uint32(138).string(message.timeZoneName);
1838
+ }
1839
+ if (message.instrumentGroup !== "") {
1840
+ writer.uint32(146).string(message.instrumentGroup);
1841
+ }
1842
+ if (message.symbolExpiration !== void 0) {
1843
+ InstrumentDefinition_MaturityDateEncode.encode(message.symbolExpiration, writer.uint32(154).fork()).join();
1844
+ }
1845
+ if (message.state !== 0) {
1846
+ writer.uint32(160).int32(message.state);
1847
+ }
1848
+ if (message.channel !== 0) {
1849
+ writer.uint32(168).sint32(message.channel);
1850
+ }
1851
+ if (!message.underlyingMarketId.equals(Long.ZERO)) {
1852
+ writer.uint32(176).sint64(message.underlyingMarketId.toString());
1853
+ }
1854
+ if (message.priceFormat !== void 0) {
1855
+ InstrumentDefinition_PriceFormatEncode.encode(message.priceFormat, writer.uint32(186).fork()).join();
1856
+ }
1857
+ if (message.optionStrikePriceFormat !== void 0) {
1858
+ InstrumentDefinition_PriceFormatEncode.encode(message.optionStrikePriceFormat, writer.uint32(194).fork()).join();
1859
+ }
1860
+ if (message.priceDenominator !== 0) {
1861
+ writer.uint32(224).sint32(message.priceDenominator);
1862
+ }
1863
+ if (message.quantityDenominator !== 0) {
1864
+ writer.uint32(232).sint32(message.quantityDenominator);
1865
+ }
1866
+ if (message.isTradable !== false) {
1867
+ writer.uint32(240).bool(message.isTradable);
1868
+ }
1869
+ if (!message.transactionTime.equals(Long.ZERO)) {
1870
+ writer.uint32(400).sint64(message.transactionTime.toString());
1871
+ }
1872
+ if (message.auxiliaryData.length !== 0) {
1873
+ writer.uint32(794).bytes(message.auxiliaryData);
1874
+ }
1875
+ for (const v of message.symbols) {
1876
+ InstrumentDefinition_SymbolEncode.encode(v, writer.uint32(802).fork()).join();
1877
+ }
1878
+ if (!message.optionStrike.equals(Long.ZERO)) {
1879
+ writer.uint32(1600).sint64(message.optionStrike.toString());
1880
+ }
1881
+ if (message.optionType !== 0) {
1882
+ writer.uint32(1616).int32(message.optionType);
1883
+ }
1884
+ if (message.optionStyle !== 0) {
1885
+ writer.uint32(1624).int32(message.optionStyle);
1886
+ }
1887
+ if (message.optionStrikeDenominator !== 0) {
1888
+ writer.uint32(1632).sint32(message.optionStrikeDenominator);
1889
+ }
1890
+ if (message.spreadCode !== "") {
1891
+ writer.uint32(1682).string(message.spreadCode);
1892
+ }
1893
+ for (const v of message.spreadLeg) {
1894
+ InstrumentDefinition_SpreadLegEncode.encode(v, writer.uint32(1690).fork()).join();
1895
+ }
1896
+ if (message.userDefinedSpread !== false) {
1897
+ writer.uint32(1696).bool(message.userDefinedSpread);
1898
+ }
1899
+ if (message.marketTier !== "") {
1900
+ writer.uint32(1706).string(message.marketTier);
1901
+ }
1902
+ if (message.financialStatusIndicator !== "") {
1903
+ writer.uint32(1714).string(message.financialStatusIndicator);
1904
+ }
1905
+ if (message.isin !== "") {
1906
+ writer.uint32(1722).string(message.isin);
1907
+ }
1908
+ if (message.currencyPair !== void 0) {
1909
+ InstrumentDefinition_CurrencyPairEncode.encode(message.currencyPair, writer.uint32(1730).fork()).join();
1910
+ }
1911
+ if (message.exchangeSendsVolume !== false) {
1912
+ writer.uint32(1736).bool(message.exchangeSendsVolume);
1913
+ }
1914
+ if (message.exchangeSendsHigh !== false) {
1915
+ writer.uint32(1744).bool(message.exchangeSendsHigh);
1916
+ }
1917
+ if (message.exchangeSendsLow !== false) {
1918
+ writer.uint32(1752).bool(message.exchangeSendsLow);
1919
+ }
1920
+ if (message.exchangeSendsOpen !== false) {
1921
+ writer.uint32(1760).bool(message.exchangeSendsOpen);
1922
+ }
1923
+ if (message.consolidatedFeedInstrument !== false) {
1924
+ writer.uint32(1768).bool(message.consolidatedFeedInstrument);
1925
+ }
1926
+ if (message.openOutcryInstrument !== false) {
1927
+ writer.uint32(1776).bool(message.openOutcryInstrument);
1928
+ }
1929
+ if (message.syntheticAmericanOptionInstrument !== false) {
1930
+ writer.uint32(1784).bool(message.syntheticAmericanOptionInstrument);
1931
+ }
1932
+ if (message.barchartExchangeCode !== "") {
1933
+ writer.uint32(1794).string(message.barchartExchangeCode);
1934
+ }
1935
+ if (message.barchartBaseCode !== "") {
1936
+ writer.uint32(1802).string(message.barchartBaseCode);
1937
+ }
1938
+ if (message.volumeDenominator !== 0) {
1939
+ writer.uint32(1808).sint32(message.volumeDenominator);
1940
+ }
1941
+ if (message.bidOfferQuantityDenominator !== 0) {
1942
+ writer.uint32(1816).sint32(message.bidOfferQuantityDenominator);
1943
+ }
1944
+ if (message.primaryListingMarketParticipantId !== "") {
1945
+ writer.uint32(1826).string(message.primaryListingMarketParticipantId);
1946
+ }
1947
+ if (message.subscriptionSymbol !== "") {
1948
+ writer.uint32(1834).string(message.subscriptionSymbol);
1949
+ }
1950
+ if (message.contractMaturity !== void 0) {
1951
+ InstrumentDefinition_MaturityDateEncode.encode(message.contractMaturity, writer.uint32(1842).fork()).join();
1952
+ }
1953
+ if (message.underlying !== "") {
1954
+ writer.uint32(1850).string(message.underlying);
1955
+ }
1956
+ if (message.commodity !== "") {
1957
+ writer.uint32(1858).string(message.commodity);
1958
+ }
1959
+ if (message.exchangeId !== 0) {
1960
+ writer.uint32(1864).sint32(message.exchangeId);
1961
+ }
1962
+ if (message.priceScalingExponent !== 0) {
1963
+ writer.uint32(1872).sint32(message.priceScalingExponent);
1964
+ }
1965
+ if (!message.underlyingOpenfeedMarketId.equals(Long.ZERO)) {
1966
+ writer.uint32(1880).sint64(message.underlyingOpenfeedMarketId.toString());
1967
+ }
1968
+ if (message.barchartExchange !== "") {
1969
+ writer.uint32(1890).string(message.barchartExchange);
1970
+ }
1971
+ if (!message.contractSize.equals(Long.ZERO)) {
1972
+ writer.uint32(1896).sint64(message.contractSize.toString());
1973
+ }
1974
+ if (message.contractSizeDescription !== "") {
1975
+ writer.uint32(1906).string(message.contractSizeDescription);
1976
+ }
1977
+ if (message.exchangeMetadata !== void 0) {
1978
+ InstrumentDefinition_ExchangeMetadataEncode.encode(message.exchangeMetadata, writer.uint32(1914).fork()).join();
1979
+ }
1980
+ if (message.roundLotSize !== 0) {
1981
+ writer.uint32(1920).sint32(message.roundLotSize);
1982
+ }
1983
+ return writer;
1984
+ }
1985
+ }, InstrumentDefinitionDecode = {
1785
1986
  decode(input, length) {
1786
1987
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1787
1988
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -2263,7 +2464,14 @@ const InstrumentDefinitionDecode = {
2263
2464
  function createBaseInstrumentDefinition_Schedule() {
2264
2465
  return { sessions: [] };
2265
2466
  }
2266
- const InstrumentDefinition_ScheduleDecode = {
2467
+ const InstrumentDefinition_ScheduleEncode = {
2468
+ encode(message, writer = new BinaryWriter()) {
2469
+ for (const v of message.sessions) {
2470
+ InstrumentDefinition_TimeSpanEncode.encode(v, writer.uint32(10).fork()).join();
2471
+ }
2472
+ return writer;
2473
+ }
2474
+ }, InstrumentDefinition_ScheduleDecode = {
2267
2475
  decode(input, length) {
2268
2476
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2269
2477
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -2290,7 +2498,17 @@ const InstrumentDefinition_ScheduleDecode = {
2290
2498
  function createBaseInstrumentDefinition_TimeSpan() {
2291
2499
  return { timeStart: Long.ZERO, timeFinish: Long.ZERO };
2292
2500
  }
2293
- const InstrumentDefinition_TimeSpanDecode = {
2501
+ const InstrumentDefinition_TimeSpanEncode = {
2502
+ encode(message, writer = new BinaryWriter()) {
2503
+ if (!message.timeStart.equals(Long.ZERO)) {
2504
+ writer.uint32(8).sint64(message.timeStart.toString());
2505
+ }
2506
+ if (!message.timeFinish.equals(Long.ZERO)) {
2507
+ writer.uint32(16).sint64(message.timeFinish.toString());
2508
+ }
2509
+ return writer;
2510
+ }
2511
+ }, InstrumentDefinition_TimeSpanDecode = {
2294
2512
  decode(input, length) {
2295
2513
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2296
2514
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -2324,7 +2542,14 @@ const InstrumentDefinition_TimeSpanDecode = {
2324
2542
  function createBaseInstrumentDefinition_Calendar() {
2325
2543
  return { events: [] };
2326
2544
  }
2327
- const InstrumentDefinition_CalendarDecode = {
2545
+ const InstrumentDefinition_CalendarEncode = {
2546
+ encode(message, writer = new BinaryWriter()) {
2547
+ for (const v of message.events) {
2548
+ InstrumentDefinition_EventEncode.encode(v, writer.uint32(10).fork()).join();
2549
+ }
2550
+ return writer;
2551
+ }
2552
+ }, InstrumentDefinition_CalendarDecode = {
2328
2553
  decode(input, length) {
2329
2554
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2330
2555
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -2351,7 +2576,17 @@ const InstrumentDefinition_CalendarDecode = {
2351
2576
  function createBaseInstrumentDefinition_Event() {
2352
2577
  return { type: 0, date: Long.ZERO };
2353
2578
  }
2354
- const InstrumentDefinition_EventDecode = {
2579
+ const InstrumentDefinition_EventEncode = {
2580
+ encode(message, writer = new BinaryWriter()) {
2581
+ if (message.type !== 0) {
2582
+ writer.uint32(8).int32(message.type);
2583
+ }
2584
+ if (!message.date.equals(Long.ZERO)) {
2585
+ writer.uint32(16).sint64(message.date.toString());
2586
+ }
2587
+ return writer;
2588
+ }
2589
+ }, InstrumentDefinition_EventDecode = {
2355
2590
  decode(input, length) {
2356
2591
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2357
2592
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -2385,7 +2620,29 @@ const InstrumentDefinition_EventDecode = {
2385
2620
  function createBaseInstrumentDefinition_SpreadLeg() {
2386
2621
  return { marketId: Long.ZERO, ratio: 0, symbol: "", longSymbol: "", legOptionDelta: 0, legPrice: 0 };
2387
2622
  }
2388
- const InstrumentDefinition_SpreadLegDecode = {
2623
+ const InstrumentDefinition_SpreadLegEncode = {
2624
+ encode(message, writer = new BinaryWriter()) {
2625
+ if (!message.marketId.equals(Long.ZERO)) {
2626
+ writer.uint32(8).sint64(message.marketId.toString());
2627
+ }
2628
+ if (message.ratio !== 0) {
2629
+ writer.uint32(16).sint32(message.ratio);
2630
+ }
2631
+ if (message.symbol !== "") {
2632
+ writer.uint32(26).string(message.symbol);
2633
+ }
2634
+ if (message.longSymbol !== "") {
2635
+ writer.uint32(34).string(message.longSymbol);
2636
+ }
2637
+ if (message.legOptionDelta !== 0) {
2638
+ writer.uint32(45).float(message.legOptionDelta);
2639
+ }
2640
+ if (message.legPrice !== 0) {
2641
+ writer.uint32(53).float(message.legPrice);
2642
+ }
2643
+ return writer;
2644
+ }
2645
+ }, InstrumentDefinition_SpreadLegDecode = {
2389
2646
  decode(input, length) {
2390
2647
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2391
2648
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -2447,7 +2704,20 @@ const InstrumentDefinition_SpreadLegDecode = {
2447
2704
  function createBaseInstrumentDefinition_MaturityDate() {
2448
2705
  return { year: 0, month: 0, day: 0 };
2449
2706
  }
2450
- const InstrumentDefinition_MaturityDateDecode = {
2707
+ const InstrumentDefinition_MaturityDateEncode = {
2708
+ encode(message, writer = new BinaryWriter()) {
2709
+ if (message.year !== 0) {
2710
+ writer.uint32(8).sint32(message.year);
2711
+ }
2712
+ if (message.month !== 0) {
2713
+ writer.uint32(16).sint32(message.month);
2714
+ }
2715
+ if (message.day !== 0) {
2716
+ writer.uint32(24).sint32(message.day);
2717
+ }
2718
+ return writer;
2719
+ }
2720
+ }, InstrumentDefinition_MaturityDateDecode = {
2451
2721
  decode(input, length) {
2452
2722
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2453
2723
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -2488,7 +2758,20 @@ const InstrumentDefinition_MaturityDateDecode = {
2488
2758
  function createBaseInstrumentDefinition_Symbol() {
2489
2759
  return { vendor: "", symbol: "", longSymbol: "" };
2490
2760
  }
2491
- const InstrumentDefinition_SymbolDecode = {
2761
+ const InstrumentDefinition_SymbolEncode = {
2762
+ encode(message, writer = new BinaryWriter()) {
2763
+ if (message.vendor !== "") {
2764
+ writer.uint32(10).string(message.vendor);
2765
+ }
2766
+ if (message.symbol !== "") {
2767
+ writer.uint32(18).string(message.symbol);
2768
+ }
2769
+ if (message.longSymbol !== "") {
2770
+ writer.uint32(26).string(message.longSymbol);
2771
+ }
2772
+ return writer;
2773
+ }
2774
+ }, InstrumentDefinition_SymbolDecode = {
2492
2775
  decode(input, length) {
2493
2776
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2494
2777
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -2529,7 +2812,23 @@ const InstrumentDefinition_SymbolDecode = {
2529
2812
  function createBaseInstrumentDefinition_PriceFormat() {
2530
2813
  return { isFractional: false, denominator: 0, subDenominator: 0, subFormat: 0 };
2531
2814
  }
2532
- const InstrumentDefinition_PriceFormatDecode = {
2815
+ const InstrumentDefinition_PriceFormatEncode = {
2816
+ encode(message, writer = new BinaryWriter()) {
2817
+ if (message.isFractional !== false) {
2818
+ writer.uint32(8).bool(message.isFractional);
2819
+ }
2820
+ if (message.denominator !== 0) {
2821
+ writer.uint32(16).sint32(message.denominator);
2822
+ }
2823
+ if (message.subDenominator !== 0) {
2824
+ writer.uint32(32).sint32(message.subDenominator);
2825
+ }
2826
+ if (message.subFormat !== 0) {
2827
+ writer.uint32(48).int32(message.subFormat);
2828
+ }
2829
+ return writer;
2830
+ }
2831
+ }, InstrumentDefinition_PriceFormatDecode = {
2533
2832
  decode(input, length) {
2534
2833
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2535
2834
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -2577,7 +2876,17 @@ const InstrumentDefinition_PriceFormatDecode = {
2577
2876
  function createBaseInstrumentDefinition_CurrencyPair() {
2578
2877
  return { currency1: "", currency2: "" };
2579
2878
  }
2580
- const InstrumentDefinition_CurrencyPairDecode = {
2879
+ const InstrumentDefinition_CurrencyPairEncode = {
2880
+ encode(message, writer = new BinaryWriter()) {
2881
+ if (message.currency1 !== "") {
2882
+ writer.uint32(10).string(message.currency1);
2883
+ }
2884
+ if (message.currency2 !== "") {
2885
+ writer.uint32(18).string(message.currency2);
2886
+ }
2887
+ return writer;
2888
+ }
2889
+ }, InstrumentDefinition_CurrencyPairDecode = {
2581
2890
  decode(input, length) {
2582
2891
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2583
2892
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -2618,7 +2927,29 @@ function createBaseInstrumentDefinition_ExchangeMetadata() {
2618
2927
  underlyingSymbol: ""
2619
2928
  };
2620
2929
  }
2621
- const InstrumentDefinition_ExchangeMetadataDecode = {
2930
+ const InstrumentDefinition_ExchangeMetadataEncode = {
2931
+ encode(message, writer = new BinaryWriter()) {
2932
+ if (!message.securityId.equals(Long.ZERO)) {
2933
+ writer.uint32(8).sint64(message.securityId.toString());
2934
+ }
2935
+ if (message.channelId !== "") {
2936
+ writer.uint32(18).string(message.channelId);
2937
+ }
2938
+ if (message.sbeId !== 0) {
2939
+ writer.uint32(24).sint32(message.sbeId);
2940
+ }
2941
+ if (!message.underlyingSecurityId.equals(Long.ZERO)) {
2942
+ writer.uint32(32).sint64(message.underlyingSecurityId.toString());
2943
+ }
2944
+ if (message.securitySymbol !== "") {
2945
+ writer.uint32(42).string(message.securitySymbol);
2946
+ }
2947
+ if (message.underlyingSymbol !== "") {
2948
+ writer.uint32(50).string(message.underlyingSymbol);
2949
+ }
2950
+ return writer;
2951
+ }
2952
+ }, InstrumentDefinition_ExchangeMetadataDecode = {
2622
2953
  decode(input, length) {
2623
2954
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2624
2955
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -2835,7 +3166,23 @@ var SnapshotRequest_SnapshotRequestType = /* @__PURE__ */ ((SnapshotRequest_Snap
2835
3166
  function createBaseHeartBeat() {
2836
3167
  return { transactionTime: Long.ZERO, status: "", exchange: false, channel: 0 };
2837
3168
  }
2838
- const HeartBeatDecode = {
3169
+ const HeartBeatEncode = {
3170
+ encode(message, writer = new BinaryWriter()) {
3171
+ if (!message.transactionTime.equals(Long.ZERO)) {
3172
+ writer.uint32(8).sint64(message.transactionTime.toString());
3173
+ }
3174
+ if (message.status !== "") {
3175
+ writer.uint32(18).string(message.status);
3176
+ }
3177
+ if (message.exchange !== false) {
3178
+ writer.uint32(24).bool(message.exchange);
3179
+ }
3180
+ if (message.channel !== 0) {
3181
+ writer.uint32(32).sint32(message.channel);
3182
+ }
3183
+ return writer;
3184
+ }
3185
+ }, HeartBeatDecode = {
2839
3186
  decode(input, length) {
2840
3187
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2841
3188
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -2883,7 +3230,20 @@ const HeartBeatDecode = {
2883
3230
  function createBaseMarketStatus() {
2884
3231
  return { transactionTime: Long.ZERO, channel: 0, marketWideStatus: 0 };
2885
3232
  }
2886
- const MarketStatusDecode = {
3233
+ const MarketStatusEncode = {
3234
+ encode(message, writer = new BinaryWriter()) {
3235
+ if (!message.transactionTime.equals(Long.ZERO)) {
3236
+ writer.uint32(8).sint64(message.transactionTime.toString());
3237
+ }
3238
+ if (message.channel !== 0) {
3239
+ writer.uint32(16).sint32(message.channel);
3240
+ }
3241
+ if (message.marketWideStatus !== 0) {
3242
+ writer.uint32(24).int32(message.marketWideStatus);
3243
+ }
3244
+ return writer;
3245
+ }
3246
+ }, MarketStatusDecode = {
2887
3247
  decode(input, length) {
2888
3248
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2889
3249
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -2942,7 +3302,62 @@ function createBaseMarketSession() {
2942
3302
  vwap: void 0
2943
3303
  };
2944
3304
  }
2945
- const MarketSessionDecode = {
3305
+ const MarketSessionEncode = {
3306
+ encode(message, writer = new BinaryWriter()) {
3307
+ if (message.tradeDate !== 0) {
3308
+ writer.uint32(32).sint32(message.tradeDate);
3309
+ }
3310
+ if (message.open !== void 0) {
3311
+ OpenEncode.encode(message.open, writer.uint32(242).fork()).join();
3312
+ }
3313
+ if (message.high !== void 0) {
3314
+ HighEncode.encode(message.high, writer.uint32(250).fork()).join();
3315
+ }
3316
+ if (message.low !== void 0) {
3317
+ LowEncode.encode(message.low, writer.uint32(258).fork()).join();
3318
+ }
3319
+ if (message.last !== void 0) {
3320
+ LastEncode.encode(message.last, writer.uint32(282).fork()).join();
3321
+ }
3322
+ if (message.volume !== void 0) {
3323
+ VolumeEncode.encode(message.volume, writer.uint32(306).fork()).join();
3324
+ }
3325
+ if (message.settlement !== void 0) {
3326
+ SettlementEncode.encode(message.settlement, writer.uint32(314).fork()).join();
3327
+ }
3328
+ if (message.prevSettlement !== void 0) {
3329
+ SettlementEncode.encode(message.prevSettlement, writer.uint32(354).fork()).join();
3330
+ }
3331
+ if (message.openInterest !== void 0) {
3332
+ OpenInterestEncode.encode(message.openInterest, writer.uint32(322).fork()).join();
3333
+ }
3334
+ if (message.numberOfTrades !== void 0) {
3335
+ NumberOfTradesEncode.encode(message.numberOfTrades, writer.uint32(330).fork()).join();
3336
+ }
3337
+ if (message.monetaryValue !== void 0) {
3338
+ MonetaryValueEncode.encode(message.monetaryValue, writer.uint32(338).fork()).join();
3339
+ }
3340
+ if (!message.transactionTime.equals(Long.ZERO)) {
3341
+ writer.uint32(344).sint64(message.transactionTime.toString());
3342
+ }
3343
+ if (message.officialBestBidOffer !== void 0) {
3344
+ OfficialBestBidOfferEncode.encode(message.officialBestBidOffer, writer.uint32(362).fork()).join();
3345
+ }
3346
+ if (message.referenceVolatilityPrice !== void 0) {
3347
+ ReferenceVolatilityPriceEncode.encode(message.referenceVolatilityPrice, writer.uint32(370).fork()).join();
3348
+ }
3349
+ if (message.priceLimits !== void 0) {
3350
+ PriceLimitsEncode.encode(message.priceLimits, writer.uint32(378).fork()).join();
3351
+ }
3352
+ if (message.marketOpenInterest !== void 0) {
3353
+ MarketOpenInterestEncode.encode(message.marketOpenInterest, writer.uint32(386).fork()).join();
3354
+ }
3355
+ if (message.vwap !== void 0) {
3356
+ VwapEncode.encode(message.vwap, writer.uint32(394).fork()).join();
3357
+ }
3358
+ return writer;
3359
+ }
3360
+ }, MarketSessionDecode = {
2946
3361
  decode(input, length) {
2947
3362
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2948
3363
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -3126,7 +3541,143 @@ function createBaseMarketSnapshot() {
3126
3541
  marketOpenInterest: void 0
3127
3542
  };
3128
3543
  }
3129
- const MarketSnapshotDecode = {
3544
+ const MarketSnapshotEncode = {
3545
+ encode(message, writer = new BinaryWriter()) {
3546
+ if (!message.marketId.equals(Long.ZERO)) {
3547
+ writer.uint32(8).sint64(message.marketId.toString());
3548
+ }
3549
+ if (!message.transactionTime.equals(Long.ZERO)) {
3550
+ writer.uint32(16).sint64(message.transactionTime.toString());
3551
+ }
3552
+ if (!message.marketSequence.equals(Long.ZERO)) {
3553
+ writer.uint32(24).int64(message.marketSequence.toString());
3554
+ }
3555
+ if (message.tradeDate !== 0) {
3556
+ writer.uint32(32).sint32(message.tradeDate);
3557
+ }
3558
+ if (message.totalChunks !== 0) {
3559
+ writer.uint32(40).sint32(message.totalChunks);
3560
+ }
3561
+ if (message.currentChunk !== 0) {
3562
+ writer.uint32(48).sint32(message.currentChunk);
3563
+ }
3564
+ if (message.symbol !== "") {
3565
+ writer.uint32(58).string(message.symbol);
3566
+ }
3567
+ if (message.priceDenominator !== 0) {
3568
+ writer.uint32(64).sint32(message.priceDenominator);
3569
+ }
3570
+ if (message.service !== 0) {
3571
+ writer.uint32(72).int32(message.service);
3572
+ }
3573
+ if (message.instrumentStatus !== void 0) {
3574
+ InstrumentStatusEncode.encode(message.instrumentStatus, writer.uint32(82).fork()).join();
3575
+ }
3576
+ if (message.bbo !== void 0) {
3577
+ BestBidOfferEncode.encode(message.bbo, writer.uint32(90).fork()).join();
3578
+ }
3579
+ if (message.index !== void 0) {
3580
+ IndexValueEncode.encode(message.index, writer.uint32(98).fork()).join();
3581
+ }
3582
+ for (const v of message.priceLevels) {
3583
+ AddPriceLevelEncode.encode(v, writer.uint32(106).fork()).join();
3584
+ }
3585
+ for (const v of message.orders) {
3586
+ AddOrderEncode.encode(v, writer.uint32(114).fork()).join();
3587
+ }
3588
+ if (message.news !== void 0) {
3589
+ NewsEncode.encode(message.news, writer.uint32(122).fork()).join();
3590
+ }
3591
+ if (message.open !== void 0) {
3592
+ OpenEncode.encode(message.open, writer.uint32(242).fork()).join();
3593
+ }
3594
+ if (message.high !== void 0) {
3595
+ HighEncode.encode(message.high, writer.uint32(250).fork()).join();
3596
+ }
3597
+ if (message.low !== void 0) {
3598
+ LowEncode.encode(message.low, writer.uint32(258).fork()).join();
3599
+ }
3600
+ if (message.close !== void 0) {
3601
+ CloseEncode.encode(message.close, writer.uint32(266).fork()).join();
3602
+ }
3603
+ if (message.prevClose !== void 0) {
3604
+ PrevCloseEncode.encode(message.prevClose, writer.uint32(274).fork()).join();
3605
+ }
3606
+ if (message.last !== void 0) {
3607
+ LastEncode.encode(message.last, writer.uint32(282).fork()).join();
3608
+ }
3609
+ if (message.yearHigh !== void 0) {
3610
+ YearHighEncode.encode(message.yearHigh, writer.uint32(290).fork()).join();
3611
+ }
3612
+ if (message.yearLow !== void 0) {
3613
+ YearLowEncode.encode(message.yearLow, writer.uint32(298).fork()).join();
3614
+ }
3615
+ if (message.volume !== void 0) {
3616
+ VolumeEncode.encode(message.volume, writer.uint32(306).fork()).join();
3617
+ }
3618
+ if (message.settlement !== void 0) {
3619
+ SettlementEncode.encode(message.settlement, writer.uint32(314).fork()).join();
3620
+ }
3621
+ if (message.openInterest !== void 0) {
3622
+ OpenInterestEncode.encode(message.openInterest, writer.uint32(322).fork()).join();
3623
+ }
3624
+ if (message.vwap !== void 0) {
3625
+ VwapEncode.encode(message.vwap, writer.uint32(330).fork()).join();
3626
+ }
3627
+ if (message.dividendsIncomeDistributions !== void 0) {
3628
+ DividendsIncomeDistributionsEncode.encode(message.dividendsIncomeDistributions, writer.uint32(338).fork()).join();
3629
+ }
3630
+ if (message.numberOfTrades !== void 0) {
3631
+ NumberOfTradesEncode.encode(message.numberOfTrades, writer.uint32(346).fork()).join();
3632
+ }
3633
+ if (message.monetaryValue !== void 0) {
3634
+ MonetaryValueEncode.encode(message.monetaryValue, writer.uint32(354).fork()).join();
3635
+ }
3636
+ if (message.capitalDistributions !== void 0) {
3637
+ CapitalDistributionsEncode.encode(message.capitalDistributions, writer.uint32(362).fork()).join();
3638
+ }
3639
+ if (message.sharesOutstanding !== void 0) {
3640
+ SharesOutstandingEncode.encode(message.sharesOutstanding, writer.uint32(370).fork()).join();
3641
+ }
3642
+ if (message.netAssetValue !== void 0) {
3643
+ NetAssetValueEncode.encode(message.netAssetValue, writer.uint32(378).fork()).join();
3644
+ }
3645
+ if (message.previousSession !== void 0) {
3646
+ MarketSessionEncode.encode(message.previousSession, writer.uint32(386).fork()).join();
3647
+ }
3648
+ if (message.tSession !== void 0) {
3649
+ MarketSessionEncode.encode(message.tSession, writer.uint32(394).fork()).join();
3650
+ }
3651
+ if (message.volumeAtPrice !== void 0) {
3652
+ VolumeAtPriceEncode.encode(message.volumeAtPrice, writer.uint32(402).fork()).join();
3653
+ }
3654
+ if (message.highRolling !== void 0) {
3655
+ HighRollingEncode.encode(message.highRolling, writer.uint32(410).fork()).join();
3656
+ }
3657
+ if (message.lowRolling !== void 0) {
3658
+ LowRollingEncode.encode(message.lowRolling, writer.uint32(418).fork()).join();
3659
+ }
3660
+ if (message.zSession !== void 0) {
3661
+ MarketSessionEncode.encode(message.zSession, writer.uint32(426).fork()).join();
3662
+ }
3663
+ if (message.referenceVolatilityPrice !== void 0) {
3664
+ ReferenceVolatilityPriceEncode.encode(message.referenceVolatilityPrice, writer.uint32(434).fork()).join();
3665
+ }
3666
+ if (message.priceLimits !== void 0) {
3667
+ PriceLimitsEncode.encode(message.priceLimits, writer.uint32(442).fork()).join();
3668
+ }
3669
+ for (const v of message.sessions) {
3670
+ MarketSessionEncode.encode(v, writer.uint32(450).fork()).join();
3671
+ }
3672
+ if (message.officialBestBidOffer !== void 0) {
3673
+ OfficialBestBidOfferEncode.encode(message.officialBestBidOffer, writer.uint32(458).fork()).join();
3674
+ }
3675
+ if (message.marketOpenInterest !== void 0) {
3676
+ MarketOpenInterestEncode.encode(message.marketOpenInterest, writer.uint32(466).fork()).join();
3677
+ }
3678
+ return writer;
3679
+ }
3680
+ }, MarketSnapshotDecode = {
3130
3681
  decode(input, length) {
3131
3682
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3132
3683
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -3503,51 +4054,199 @@ function createBaseMarketUpdate() {
3503
4054
  marketOpenInterest: void 0
3504
4055
  };
3505
4056
  }
3506
- const MarketUpdateDecode = {
3507
- decode(input, length) {
3508
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3509
- const end = length === void 0 ? reader.len : reader.pos + length;
3510
- const message = createBaseMarketUpdate();
3511
- while (reader.pos < end) {
3512
- const tag = reader.uint32();
3513
- switch (tag >>> 3) {
3514
- case 1: {
3515
- if (tag !== 8) {
3516
- break;
3517
- }
3518
- message.marketId = Long.fromString(reader.sint64().toString());
3519
- continue;
3520
- }
3521
- case 2: {
3522
- if (tag !== 18) {
3523
- break;
3524
- }
3525
- message.symbol = reader.string();
3526
- continue;
3527
- }
3528
- case 3: {
3529
- if (tag !== 24) {
3530
- break;
3531
- }
3532
- message.transactionTime = Long.fromString(reader.sint64().toString());
3533
- continue;
3534
- }
3535
- case 4: {
3536
- if (tag !== 32) {
3537
- break;
3538
- }
3539
- message.distributionTime = Long.fromString(reader.sint64().toString());
3540
- continue;
3541
- }
3542
- case 5: {
3543
- if (tag !== 40) {
3544
- break;
3545
- }
3546
- message.marketSequence = Long.fromString(reader.sint64().toString());
3547
- continue;
3548
- }
3549
- case 6: {
3550
- if (tag !== 48) {
4057
+ const MarketUpdateEncode = {
4058
+ encode(message, writer = new BinaryWriter()) {
4059
+ if (!message.marketId.equals(Long.ZERO)) {
4060
+ writer.uint32(8).sint64(message.marketId.toString());
4061
+ }
4062
+ if (message.symbol !== "") {
4063
+ writer.uint32(18).string(message.symbol);
4064
+ }
4065
+ if (!message.transactionTime.equals(Long.ZERO)) {
4066
+ writer.uint32(24).sint64(message.transactionTime.toString());
4067
+ }
4068
+ if (!message.distributionTime.equals(Long.ZERO)) {
4069
+ writer.uint32(32).sint64(message.distributionTime.toString());
4070
+ }
4071
+ if (!message.marketSequence.equals(Long.ZERO)) {
4072
+ writer.uint32(40).sint64(message.marketSequence.toString());
4073
+ }
4074
+ if (!message.sourceSequence.equals(Long.ZERO)) {
4075
+ writer.uint32(48).sint64(message.sourceSequence.toString());
4076
+ }
4077
+ if (message.originatorId.length !== 0) {
4078
+ writer.uint32(58).bytes(message.originatorId);
4079
+ }
4080
+ if (message.priceDenominator !== 0) {
4081
+ writer.uint32(72).sint32(message.priceDenominator);
4082
+ }
4083
+ if (message.context !== void 0) {
4084
+ ContextEncode.encode(message.context, writer.uint32(82).fork()).join();
4085
+ }
4086
+ if (message.session !== void 0) {
4087
+ MarketSessionEncode.encode(message.session, writer.uint32(90).fork()).join();
4088
+ }
4089
+ if (message.tSession !== void 0) {
4090
+ MarketSessionEncode.encode(message.tSession, writer.uint32(98).fork()).join();
4091
+ }
4092
+ if (message.previousSession !== void 0) {
4093
+ MarketSessionEncode.encode(message.previousSession, writer.uint32(106).fork()).join();
4094
+ }
4095
+ if (message.regional !== false) {
4096
+ writer.uint32(112).bool(message.regional);
4097
+ }
4098
+ if (message.zSession !== void 0) {
4099
+ MarketSessionEncode.encode(message.zSession, writer.uint32(122).fork()).join();
4100
+ }
4101
+ if (message.news !== void 0) {
4102
+ NewsEncode.encode(message.news, writer.uint32(162).fork()).join();
4103
+ }
4104
+ if (message.clearBook !== void 0) {
4105
+ ClearBookEncode.encode(message.clearBook, writer.uint32(170).fork()).join();
4106
+ }
4107
+ if (message.instrumentStatus !== void 0) {
4108
+ InstrumentStatusEncode.encode(message.instrumentStatus, writer.uint32(178).fork()).join();
4109
+ }
4110
+ if (message.bbo !== void 0) {
4111
+ BestBidOfferEncode.encode(message.bbo, writer.uint32(186).fork()).join();
4112
+ }
4113
+ if (message.depthPriceLevel !== void 0) {
4114
+ DepthPriceLevelEncode.encode(message.depthPriceLevel, writer.uint32(194).fork()).join();
4115
+ }
4116
+ if (message.depthOrder !== void 0) {
4117
+ DepthOrderEncode.encode(message.depthOrder, writer.uint32(202).fork()).join();
4118
+ }
4119
+ if (message.index !== void 0) {
4120
+ IndexValueEncode.encode(message.index, writer.uint32(210).fork()).join();
4121
+ }
4122
+ if (message.trades !== void 0) {
4123
+ TradesEncode.encode(message.trades, writer.uint32(218).fork()).join();
4124
+ }
4125
+ if (message.open !== void 0) {
4126
+ OpenEncode.encode(message.open, writer.uint32(226).fork()).join();
4127
+ }
4128
+ if (message.high !== void 0) {
4129
+ HighEncode.encode(message.high, writer.uint32(234).fork()).join();
4130
+ }
4131
+ if (message.low !== void 0) {
4132
+ LowEncode.encode(message.low, writer.uint32(242).fork()).join();
4133
+ }
4134
+ if (message.close !== void 0) {
4135
+ CloseEncode.encode(message.close, writer.uint32(250).fork()).join();
4136
+ }
4137
+ if (message.prevClose !== void 0) {
4138
+ PrevCloseEncode.encode(message.prevClose, writer.uint32(258).fork()).join();
4139
+ }
4140
+ if (message.last !== void 0) {
4141
+ LastEncode.encode(message.last, writer.uint32(266).fork()).join();
4142
+ }
4143
+ if (message.yearHigh !== void 0) {
4144
+ YearHighEncode.encode(message.yearHigh, writer.uint32(274).fork()).join();
4145
+ }
4146
+ if (message.yearLow !== void 0) {
4147
+ YearLowEncode.encode(message.yearLow, writer.uint32(282).fork()).join();
4148
+ }
4149
+ if (message.volume !== void 0) {
4150
+ VolumeEncode.encode(message.volume, writer.uint32(290).fork()).join();
4151
+ }
4152
+ if (message.settlement !== void 0) {
4153
+ SettlementEncode.encode(message.settlement, writer.uint32(298).fork()).join();
4154
+ }
4155
+ if (message.openInterest !== void 0) {
4156
+ OpenInterestEncode.encode(message.openInterest, writer.uint32(306).fork()).join();
4157
+ }
4158
+ if (message.vwap !== void 0) {
4159
+ VwapEncode.encode(message.vwap, writer.uint32(314).fork()).join();
4160
+ }
4161
+ if (message.dividendsIncomeDistributions !== void 0) {
4162
+ DividendsIncomeDistributionsEncode.encode(message.dividendsIncomeDistributions, writer.uint32(322).fork()).join();
4163
+ }
4164
+ if (message.numberOfTrades !== void 0) {
4165
+ NumberOfTradesEncode.encode(message.numberOfTrades, writer.uint32(330).fork()).join();
4166
+ }
4167
+ if (message.monetaryValue !== void 0) {
4168
+ MonetaryValueEncode.encode(message.monetaryValue, writer.uint32(338).fork()).join();
4169
+ }
4170
+ if (message.capitalDistributions !== void 0) {
4171
+ CapitalDistributionsEncode.encode(message.capitalDistributions, writer.uint32(346).fork()).join();
4172
+ }
4173
+ if (message.sharesOutstanding !== void 0) {
4174
+ SharesOutstandingEncode.encode(message.sharesOutstanding, writer.uint32(354).fork()).join();
4175
+ }
4176
+ if (message.netAssetValue !== void 0) {
4177
+ NetAssetValueEncode.encode(message.netAssetValue, writer.uint32(362).fork()).join();
4178
+ }
4179
+ if (message.marketSummary !== void 0) {
4180
+ MarketSummaryEncode.encode(message.marketSummary, writer.uint32(370).fork()).join();
4181
+ }
4182
+ if (message.highRolling !== void 0) {
4183
+ HighRollingEncode.encode(message.highRolling, writer.uint32(378).fork()).join();
4184
+ }
4185
+ if (message.lowRolling !== void 0) {
4186
+ LowRollingEncode.encode(message.lowRolling, writer.uint32(386).fork()).join();
4187
+ }
4188
+ if (message.requestForQuote !== void 0) {
4189
+ RequestForQuoteEncode.encode(message.requestForQuote, writer.uint32(394).fork()).join();
4190
+ }
4191
+ if (message.referenceVolatilityPrice !== void 0) {
4192
+ ReferenceVolatilityPriceEncode.encode(message.referenceVolatilityPrice, writer.uint32(402).fork()).join();
4193
+ }
4194
+ if (message.priceLimits !== void 0) {
4195
+ PriceLimitsEncode.encode(message.priceLimits, writer.uint32(410).fork()).join();
4196
+ }
4197
+ if (message.officialBestBidOffer !== void 0) {
4198
+ OfficialBestBidOfferEncode.encode(message.officialBestBidOffer, writer.uint32(418).fork()).join();
4199
+ }
4200
+ if (message.marketOpenInterest !== void 0) {
4201
+ MarketOpenInterestEncode.encode(message.marketOpenInterest, writer.uint32(426).fork()).join();
4202
+ }
4203
+ return writer;
4204
+ }
4205
+ }, MarketUpdateDecode = {
4206
+ decode(input, length) {
4207
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
4208
+ const end = length === void 0 ? reader.len : reader.pos + length;
4209
+ const message = createBaseMarketUpdate();
4210
+ while (reader.pos < end) {
4211
+ const tag = reader.uint32();
4212
+ switch (tag >>> 3) {
4213
+ case 1: {
4214
+ if (tag !== 8) {
4215
+ break;
4216
+ }
4217
+ message.marketId = Long.fromString(reader.sint64().toString());
4218
+ continue;
4219
+ }
4220
+ case 2: {
4221
+ if (tag !== 18) {
4222
+ break;
4223
+ }
4224
+ message.symbol = reader.string();
4225
+ continue;
4226
+ }
4227
+ case 3: {
4228
+ if (tag !== 24) {
4229
+ break;
4230
+ }
4231
+ message.transactionTime = Long.fromString(reader.sint64().toString());
4232
+ continue;
4233
+ }
4234
+ case 4: {
4235
+ if (tag !== 32) {
4236
+ break;
4237
+ }
4238
+ message.distributionTime = Long.fromString(reader.sint64().toString());
4239
+ continue;
4240
+ }
4241
+ case 5: {
4242
+ if (tag !== 40) {
4243
+ break;
4244
+ }
4245
+ message.marketSequence = Long.fromString(reader.sint64().toString());
4246
+ continue;
4247
+ }
4248
+ case 6: {
4249
+ if (tag !== 48) {
3551
4250
  break;
3552
4251
  }
3553
4252
  message.sourceSequence = Long.fromString(reader.sint64().toString());
@@ -3859,7 +4558,14 @@ const MarketUpdateDecode = {
3859
4558
  function createBaseDepthPriceLevel() {
3860
4559
  return { levels: [] };
3861
4560
  }
3862
- const DepthPriceLevelDecode = {
4561
+ const DepthPriceLevelEncode = {
4562
+ encode(message, writer = new BinaryWriter()) {
4563
+ for (const v of message.levels) {
4564
+ DepthPriceLevel_EntryEncode.encode(v, writer.uint32(10).fork()).join();
4565
+ }
4566
+ return writer;
4567
+ }
4568
+ }, DepthPriceLevelDecode = {
3863
4569
  decode(input, length) {
3864
4570
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3865
4571
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -3886,7 +4592,20 @@ const DepthPriceLevelDecode = {
3886
4592
  function createBaseDepthPriceLevel_Entry() {
3887
4593
  return { addPriceLevel: void 0, deletePriceLevel: void 0, modifyPriceLevel: void 0 };
3888
4594
  }
3889
- const DepthPriceLevel_EntryDecode = {
4595
+ const DepthPriceLevel_EntryEncode = {
4596
+ encode(message, writer = new BinaryWriter()) {
4597
+ if (message.addPriceLevel !== void 0) {
4598
+ AddPriceLevelEncode.encode(message.addPriceLevel, writer.uint32(10).fork()).join();
4599
+ }
4600
+ if (message.deletePriceLevel !== void 0) {
4601
+ DeletePriceLevelEncode.encode(message.deletePriceLevel, writer.uint32(18).fork()).join();
4602
+ }
4603
+ if (message.modifyPriceLevel !== void 0) {
4604
+ ModifyPriceLevelEncode.encode(message.modifyPriceLevel, writer.uint32(26).fork()).join();
4605
+ }
4606
+ return writer;
4607
+ }
4608
+ }, DepthPriceLevel_EntryDecode = {
3890
4609
  decode(input, length) {
3891
4610
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3892
4611
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -3927,7 +4646,14 @@ const DepthPriceLevel_EntryDecode = {
3927
4646
  function createBaseDepthOrder() {
3928
4647
  return { orders: [] };
3929
4648
  }
3930
- const DepthOrderDecode = {
4649
+ const DepthOrderEncode = {
4650
+ encode(message, writer = new BinaryWriter()) {
4651
+ for (const v of message.orders) {
4652
+ DepthOrder_EntryEncode.encode(v, writer.uint32(10).fork()).join();
4653
+ }
4654
+ return writer;
4655
+ }
4656
+ }, DepthOrderDecode = {
3931
4657
  decode(input, length) {
3932
4658
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3933
4659
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -3954,7 +4680,20 @@ const DepthOrderDecode = {
3954
4680
  function createBaseDepthOrder_Entry() {
3955
4681
  return { addOrder: void 0, deleteOrder: void 0, modifyOrder: void 0 };
3956
4682
  }
3957
- const DepthOrder_EntryDecode = {
4683
+ const DepthOrder_EntryEncode = {
4684
+ encode(message, writer = new BinaryWriter()) {
4685
+ if (message.addOrder !== void 0) {
4686
+ AddOrderEncode.encode(message.addOrder, writer.uint32(10).fork()).join();
4687
+ }
4688
+ if (message.deleteOrder !== void 0) {
4689
+ DeleteOrderEncode.encode(message.deleteOrder, writer.uint32(18).fork()).join();
4690
+ }
4691
+ if (message.modifyOrder !== void 0) {
4692
+ ModifyOrderEncode.encode(message.modifyOrder, writer.uint32(26).fork()).join();
4693
+ }
4694
+ return writer;
4695
+ }
4696
+ }, DepthOrder_EntryDecode = {
3958
4697
  decode(input, length) {
3959
4698
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3960
4699
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -3995,7 +4734,29 @@ const DepthOrder_EntryDecode = {
3995
4734
  function createBaseNews() {
3996
4735
  return { originationTime: Long.ZERO, source: "", languageCode: "", headLine: "", text: "", symbols: [] };
3997
4736
  }
3998
- const NewsDecode = {
4737
+ const NewsEncode = {
4738
+ encode(message, writer = new BinaryWriter()) {
4739
+ if (!message.originationTime.equals(Long.ZERO)) {
4740
+ writer.uint32(8).sint64(message.originationTime.toString());
4741
+ }
4742
+ if (message.source !== "") {
4743
+ writer.uint32(18).string(message.source);
4744
+ }
4745
+ if (message.languageCode !== "") {
4746
+ writer.uint32(26).string(message.languageCode);
4747
+ }
4748
+ if (message.headLine !== "") {
4749
+ writer.uint32(34).string(message.headLine);
4750
+ }
4751
+ if (message.text !== "") {
4752
+ writer.uint32(42).string(message.text);
4753
+ }
4754
+ for (const v of message.symbols) {
4755
+ writer.uint32(50).string(v);
4756
+ }
4757
+ return writer;
4758
+ }
4759
+ }, NewsDecode = {
3999
4760
  decode(input, length) {
4000
4761
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
4001
4762
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -4057,7 +4818,17 @@ const NewsDecode = {
4057
4818
  function createBaseClearBook() {
4058
4819
  return { reserved: 0, transactionTime: Long.ZERO };
4059
4820
  }
4060
- const ClearBookDecode = {
4821
+ const ClearBookEncode = {
4822
+ encode(message, writer = new BinaryWriter()) {
4823
+ if (message.reserved !== 0) {
4824
+ writer.uint32(8).sint32(message.reserved);
4825
+ }
4826
+ if (!message.transactionTime.equals(Long.ZERO)) {
4827
+ writer.uint32(16).sint64(message.transactionTime.toString());
4828
+ }
4829
+ return writer;
4830
+ }
4831
+ }, ClearBookDecode = {
4061
4832
  decode(input, length) {
4062
4833
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
4063
4834
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -4099,7 +4870,32 @@ function createBaseInstrumentStatus() {
4099
4870
  priorTradingStatus: 0
4100
4871
  };
4101
4872
  }
4102
- const InstrumentStatusDecode = {
4873
+ const InstrumentStatusEncode = {
4874
+ encode(message, writer = new BinaryWriter()) {
4875
+ if (!message.transactionTime.equals(Long.ZERO)) {
4876
+ writer.uint32(72).sint64(message.transactionTime.toString());
4877
+ }
4878
+ if (message.tradingStatus !== 0) {
4879
+ writer.uint32(80).int32(message.tradingStatus);
4880
+ }
4881
+ if (!message.openingTime.equals(Long.ZERO)) {
4882
+ writer.uint32(88).sint64(message.openingTime.toString());
4883
+ }
4884
+ if (message.note !== "") {
4885
+ writer.uint32(98).string(message.note);
4886
+ }
4887
+ if (message.tradeDate !== 0) {
4888
+ writer.uint32(104).sint32(message.tradeDate);
4889
+ }
4890
+ if (message.regulationSHOShortSalePriceTest !== 0) {
4891
+ writer.uint32(112).int32(message.regulationSHOShortSalePriceTest);
4892
+ }
4893
+ if (message.priorTradingStatus !== 0) {
4894
+ writer.uint32(120).int32(message.priorTradingStatus);
4895
+ }
4896
+ return writer;
4897
+ }
4898
+ }, InstrumentStatusDecode = {
4103
4899
  decode(input, length) {
4104
4900
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
4105
4901
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -4183,7 +4979,53 @@ function createBaseBestBidOffer() {
4183
4979
  transient: false
4184
4980
  };
4185
4981
  }
4186
- const BestBidOfferDecode = {
4982
+ const BestBidOfferEncode = {
4983
+ encode(message, writer = new BinaryWriter()) {
4984
+ if (!message.transactionTime.equals(Long.ZERO)) {
4985
+ writer.uint32(72).sint64(message.transactionTime.toString());
4986
+ }
4987
+ if (!message.bidPrice.equals(Long.ZERO)) {
4988
+ writer.uint32(80).sint64(message.bidPrice.toString());
4989
+ }
4990
+ if (!message.bidQuantity.equals(Long.ZERO)) {
4991
+ writer.uint32(88).sint64(message.bidQuantity.toString());
4992
+ }
4993
+ if (message.bidOrderCount !== 0) {
4994
+ writer.uint32(96).sint32(message.bidOrderCount);
4995
+ }
4996
+ if (message.bidOriginator.length !== 0) {
4997
+ writer.uint32(106).bytes(message.bidOriginator);
4998
+ }
4999
+ if (message.bidQuoteCondition.length !== 0) {
5000
+ writer.uint32(114).bytes(message.bidQuoteCondition);
5001
+ }
5002
+ if (!message.offerPrice.equals(Long.ZERO)) {
5003
+ writer.uint32(160).sint64(message.offerPrice.toString());
5004
+ }
5005
+ if (!message.offerQuantity.equals(Long.ZERO)) {
5006
+ writer.uint32(168).sint64(message.offerQuantity.toString());
5007
+ }
5008
+ if (message.offerOrderCount !== 0) {
5009
+ writer.uint32(176).sint32(message.offerOrderCount);
5010
+ }
5011
+ if (message.offerOriginator.length !== 0) {
5012
+ writer.uint32(186).bytes(message.offerOriginator);
5013
+ }
5014
+ if (message.offerQuoteCondition.length !== 0) {
5015
+ writer.uint32(194).bytes(message.offerQuoteCondition);
5016
+ }
5017
+ if (message.quoteCondition.length !== 0) {
5018
+ writer.uint32(242).bytes(message.quoteCondition);
5019
+ }
5020
+ if (message.regional !== false) {
5021
+ writer.uint32(256).bool(message.regional);
5022
+ }
5023
+ if (message.transient !== false) {
5024
+ writer.uint32(264).bool(message.transient);
5025
+ }
5026
+ return writer;
5027
+ }
5028
+ }, BestBidOfferDecode = {
4187
5029
  decode(input, length) {
4188
5030
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
4189
5031
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -4301,7 +5143,23 @@ const BestBidOfferDecode = {
4301
5143
  function createBaseOfficialBestBidOffer() {
4302
5144
  return { tradeDate: 0, transactionTime: Long.ZERO, bidPrice: Long.ZERO, offerPrice: Long.ZERO };
4303
5145
  }
4304
- const OfficialBestBidOfferDecode = {
5146
+ const OfficialBestBidOfferEncode = {
5147
+ encode(message, writer = new BinaryWriter()) {
5148
+ if (message.tradeDate !== 0) {
5149
+ writer.uint32(64).sint32(message.tradeDate);
5150
+ }
5151
+ if (!message.transactionTime.equals(Long.ZERO)) {
5152
+ writer.uint32(72).sint64(message.transactionTime.toString());
5153
+ }
5154
+ if (!message.bidPrice.equals(Long.ZERO)) {
5155
+ writer.uint32(80).sint64(message.bidPrice.toString());
5156
+ }
5157
+ if (!message.offerPrice.equals(Long.ZERO)) {
5158
+ writer.uint32(88).sint64(message.offerPrice.toString());
5159
+ }
5160
+ return writer;
5161
+ }
5162
+ }, OfficialBestBidOfferDecode = {
4305
5163
  decode(input, length) {
4306
5164
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
4307
5165
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -4357,7 +5215,32 @@ function createBaseAddPriceLevel() {
4357
5215
  impliedQuantity: Long.ZERO
4358
5216
  };
4359
5217
  }
4360
- const AddPriceLevelDecode = {
5218
+ const AddPriceLevelEncode = {
5219
+ encode(message, writer = new BinaryWriter()) {
5220
+ if (!message.transactionTime.equals(Long.ZERO)) {
5221
+ writer.uint32(72).sint64(message.transactionTime.toString());
5222
+ }
5223
+ if (message.level !== 0) {
5224
+ writer.uint32(80).sint32(message.level);
5225
+ }
5226
+ if (message.side !== 0) {
5227
+ writer.uint32(88).int32(message.side);
5228
+ }
5229
+ if (!message.price.equals(Long.ZERO)) {
5230
+ writer.uint32(96).sint64(message.price.toString());
5231
+ }
5232
+ if (!message.quantity.equals(Long.ZERO)) {
5233
+ writer.uint32(104).sint64(message.quantity.toString());
5234
+ }
5235
+ if (message.orderCount !== 0) {
5236
+ writer.uint32(112).sint32(message.orderCount);
5237
+ }
5238
+ if (!message.impliedQuantity.equals(Long.ZERO)) {
5239
+ writer.uint32(120).sint64(message.impliedQuantity.toString());
5240
+ }
5241
+ return writer;
5242
+ }
5243
+ }, AddPriceLevelDecode = {
4361
5244
  decode(input, length) {
4362
5245
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
4363
5246
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -4426,7 +5309,20 @@ const AddPriceLevelDecode = {
4426
5309
  function createBaseDeletePriceLevel() {
4427
5310
  return { transactionTime: Long.ZERO, level: 0, side: 0 };
4428
5311
  }
4429
- const DeletePriceLevelDecode = {
5312
+ const DeletePriceLevelEncode = {
5313
+ encode(message, writer = new BinaryWriter()) {
5314
+ if (!message.transactionTime.equals(Long.ZERO)) {
5315
+ writer.uint32(72).sint64(message.transactionTime.toString());
5316
+ }
5317
+ if (message.level !== 0) {
5318
+ writer.uint32(80).sint32(message.level);
5319
+ }
5320
+ if (message.side !== 0) {
5321
+ writer.uint32(88).int32(message.side);
5322
+ }
5323
+ return writer;
5324
+ }
5325
+ }, DeletePriceLevelDecode = {
4430
5326
  decode(input, length) {
4431
5327
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
4432
5328
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -4475,7 +5371,32 @@ function createBaseModifyPriceLevel() {
4475
5371
  impliedQuantity: Long.ZERO
4476
5372
  };
4477
5373
  }
4478
- const ModifyPriceLevelDecode = {
5374
+ const ModifyPriceLevelEncode = {
5375
+ encode(message, writer = new BinaryWriter()) {
5376
+ if (!message.transactionTime.equals(Long.ZERO)) {
5377
+ writer.uint32(72).sint64(message.transactionTime.toString());
5378
+ }
5379
+ if (message.level !== 0) {
5380
+ writer.uint32(80).sint32(message.level);
5381
+ }
5382
+ if (message.side !== 0) {
5383
+ writer.uint32(88).int32(message.side);
5384
+ }
5385
+ if (!message.price.equals(Long.ZERO)) {
5386
+ writer.uint32(96).sint64(message.price.toString());
5387
+ }
5388
+ if (!message.quantity.equals(Long.ZERO)) {
5389
+ writer.uint32(104).sint64(message.quantity.toString());
5390
+ }
5391
+ if (message.orderCount !== 0) {
5392
+ writer.uint32(112).sint32(message.orderCount);
5393
+ }
5394
+ if (!message.impliedQuantity.equals(Long.ZERO)) {
5395
+ writer.uint32(120).sint64(message.impliedQuantity.toString());
5396
+ }
5397
+ return writer;
5398
+ }
5399
+ }, ModifyPriceLevelDecode = {
4479
5400
  decode(input, length) {
4480
5401
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
4481
5402
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -4552,7 +5473,32 @@ function createBaseAddOrder() {
4552
5473
  priority: Long.ZERO
4553
5474
  };
4554
5475
  }
4555
- const AddOrderDecode = {
5476
+ const AddOrderEncode = {
5477
+ encode(message, writer = new BinaryWriter()) {
5478
+ if (!message.transactionTime.equals(Long.ZERO)) {
5479
+ writer.uint32(72).sint64(message.transactionTime.toString());
5480
+ }
5481
+ if (!message.orderId.equals(Long.ZERO)) {
5482
+ writer.uint32(80).sint64(message.orderId.toString());
5483
+ }
5484
+ if (message.side !== 0) {
5485
+ writer.uint32(88).int32(message.side);
5486
+ }
5487
+ if (!message.price.equals(Long.ZERO)) {
5488
+ writer.uint32(96).sint64(message.price.toString());
5489
+ }
5490
+ if (!message.quantity.equals(Long.ZERO)) {
5491
+ writer.uint32(104).sint64(message.quantity.toString());
5492
+ }
5493
+ if (message.isImplied !== false) {
5494
+ writer.uint32(112).bool(message.isImplied);
5495
+ }
5496
+ if (!message.priority.equals(Long.ZERO)) {
5497
+ writer.uint32(120).sint64(message.priority.toString());
5498
+ }
5499
+ return writer;
5500
+ }
5501
+ }, AddOrderDecode = {
4556
5502
  decode(input, length) {
4557
5503
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
4558
5504
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -4621,7 +5567,20 @@ const AddOrderDecode = {
4621
5567
  function createBaseDeleteOrder() {
4622
5568
  return { transactionTime: Long.ZERO, orderId: Long.ZERO, side: 0 };
4623
5569
  }
4624
- const DeleteOrderDecode = {
5570
+ const DeleteOrderEncode = {
5571
+ encode(message, writer = new BinaryWriter()) {
5572
+ if (!message.transactionTime.equals(Long.ZERO)) {
5573
+ writer.uint32(72).sint64(message.transactionTime.toString());
5574
+ }
5575
+ if (!message.orderId.equals(Long.ZERO)) {
5576
+ writer.uint32(80).sint64(message.orderId.toString());
5577
+ }
5578
+ if (message.side !== 0) {
5579
+ writer.uint32(88).int32(message.side);
5580
+ }
5581
+ return writer;
5582
+ }
5583
+ }, DeleteOrderDecode = {
4625
5584
  decode(input, length) {
4626
5585
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
4627
5586
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -4670,7 +5629,32 @@ function createBaseModifyOrder() {
4670
5629
  priority: Long.ZERO
4671
5630
  };
4672
5631
  }
4673
- const ModifyOrderDecode = {
5632
+ const ModifyOrderEncode = {
5633
+ encode(message, writer = new BinaryWriter()) {
5634
+ if (!message.transactionTime.equals(Long.ZERO)) {
5635
+ writer.uint32(72).sint64(message.transactionTime.toString());
5636
+ }
5637
+ if (!message.orderId.equals(Long.ZERO)) {
5638
+ writer.uint32(80).sint64(message.orderId.toString());
5639
+ }
5640
+ if (message.side !== 0) {
5641
+ writer.uint32(88).int32(message.side);
5642
+ }
5643
+ if (!message.price.equals(Long.ZERO)) {
5644
+ writer.uint32(96).sint64(message.price.toString());
5645
+ }
5646
+ if (!message.quantity.equals(Long.ZERO)) {
5647
+ writer.uint32(104).sint64(message.quantity.toString());
5648
+ }
5649
+ if (message.isImplied !== false) {
5650
+ writer.uint32(112).bool(message.isImplied);
5651
+ }
5652
+ if (!message.priority.equals(Long.ZERO)) {
5653
+ writer.uint32(120).sint64(message.priority.toString());
5654
+ }
5655
+ return writer;
5656
+ }
5657
+ }, ModifyOrderDecode = {
4674
5658
  decode(input, length) {
4675
5659
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
4676
5660
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -4752,7 +5736,47 @@ function createBaseIndexValue() {
4752
5736
  offer: Long.ZERO
4753
5737
  };
4754
5738
  }
4755
- const IndexValueDecode = {
5739
+ const IndexValueEncode = {
5740
+ encode(message, writer = new BinaryWriter()) {
5741
+ if (!message.transactionTime.equals(Long.ZERO)) {
5742
+ writer.uint32(72).sint64(message.transactionTime.toString());
5743
+ }
5744
+ if (message.tradeDate !== 0) {
5745
+ writer.uint32(80).sint32(message.tradeDate);
5746
+ }
5747
+ if (!message.last.equals(Long.ZERO)) {
5748
+ writer.uint32(88).sint64(message.last.toString());
5749
+ }
5750
+ if (!message.volume.equals(Long.ZERO)) {
5751
+ writer.uint32(96).sint64(message.volume.toString());
5752
+ }
5753
+ if (!message.open.equals(Long.ZERO)) {
5754
+ writer.uint32(104).sint64(message.open.toString());
5755
+ }
5756
+ if (!message.settlementOpen.equals(Long.ZERO)) {
5757
+ writer.uint32(112).sint64(message.settlementOpen.toString());
5758
+ }
5759
+ if (!message.specialOpen.equals(Long.ZERO)) {
5760
+ writer.uint32(120).sint64(message.specialOpen.toString());
5761
+ }
5762
+ if (!message.high.equals(Long.ZERO)) {
5763
+ writer.uint32(128).sint64(message.high.toString());
5764
+ }
5765
+ if (!message.low.equals(Long.ZERO)) {
5766
+ writer.uint32(136).sint64(message.low.toString());
5767
+ }
5768
+ if (!message.close.equals(Long.ZERO)) {
5769
+ writer.uint32(144).sint64(message.close.toString());
5770
+ }
5771
+ if (!message.bid.equals(Long.ZERO)) {
5772
+ writer.uint32(152).sint64(message.bid.toString());
5773
+ }
5774
+ if (!message.offer.equals(Long.ZERO)) {
5775
+ writer.uint32(160).sint64(message.offer.toString());
5776
+ }
5777
+ return writer;
5778
+ }
5779
+ }, IndexValueDecode = {
4756
5780
  decode(input, length) {
4757
5781
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
4758
5782
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -4856,7 +5880,14 @@ const IndexValueDecode = {
4856
5880
  function createBaseTrades() {
4857
5881
  return { trades: [] };
4858
5882
  }
4859
- const TradesDecode = {
5883
+ const TradesEncode = {
5884
+ encode(message, writer = new BinaryWriter()) {
5885
+ for (const v of message.trades) {
5886
+ Trades_EntryEncode.encode(v, writer.uint32(10).fork()).join();
5887
+ }
5888
+ return writer;
5889
+ }
5890
+ }, TradesDecode = {
4860
5891
  decode(input, length) {
4861
5892
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
4862
5893
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -4883,7 +5914,20 @@ const TradesDecode = {
4883
5914
  function createBaseTrades_Entry() {
4884
5915
  return { trade: void 0, tradeCorrection: void 0, tradeCancel: void 0 };
4885
5916
  }
4886
- const Trades_EntryDecode = {
5917
+ const Trades_EntryEncode = {
5918
+ encode(message, writer = new BinaryWriter()) {
5919
+ if (message.trade !== void 0) {
5920
+ TradeEncode.encode(message.trade, writer.uint32(10).fork()).join();
5921
+ }
5922
+ if (message.tradeCorrection !== void 0) {
5923
+ TradeCorrectionEncode.encode(message.tradeCorrection, writer.uint32(18).fork()).join();
5924
+ }
5925
+ if (message.tradeCancel !== void 0) {
5926
+ TradeCancelEncode.encode(message.tradeCancel, writer.uint32(26).fork()).join();
5927
+ }
5928
+ return writer;
5929
+ }
5930
+ }, Trades_EntryDecode = {
4887
5931
  decode(input, length) {
4888
5932
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
4889
5933
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -4953,23 +5997,111 @@ function createBaseTrade() {
4953
5997
  indexShortName: ""
4954
5998
  };
4955
5999
  }
4956
- const TradeDecode = {
4957
- decode(input, length) {
4958
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
4959
- const end = length === void 0 ? reader.len : reader.pos + length;
4960
- const message = createBaseTrade();
4961
- while (reader.pos < end) {
4962
- const tag = reader.uint32();
4963
- switch (tag >>> 3) {
4964
- case 8: {
4965
- if (tag !== 66) {
4966
- break;
4967
- }
4968
- message.originatorId = reader.bytes();
4969
- continue;
4970
- }
4971
- case 9: {
4972
- if (tag !== 72) {
6000
+ const TradeEncode = {
6001
+ encode(message, writer = new BinaryWriter()) {
6002
+ if (message.originatorId.length !== 0) {
6003
+ writer.uint32(66).bytes(message.originatorId);
6004
+ }
6005
+ if (!message.transactionTime.equals(Long.ZERO)) {
6006
+ writer.uint32(72).sint64(message.transactionTime.toString());
6007
+ }
6008
+ if (!message.price.equals(Long.ZERO)) {
6009
+ writer.uint32(80).sint64(message.price.toString());
6010
+ }
6011
+ if (!message.quantity.equals(Long.ZERO)) {
6012
+ writer.uint32(88).sint64(message.quantity.toString());
6013
+ }
6014
+ if (message.tradeId.length !== 0) {
6015
+ writer.uint32(98).bytes(message.tradeId);
6016
+ }
6017
+ if (message.side !== 0) {
6018
+ writer.uint32(104).int32(message.side);
6019
+ }
6020
+ if (message.tradeDate !== 0) {
6021
+ writer.uint32(112).sint32(message.tradeDate);
6022
+ }
6023
+ if (message.buyerId.length !== 0) {
6024
+ writer.uint32(122).bytes(message.buyerId);
6025
+ }
6026
+ if (message.sellerId.length !== 0) {
6027
+ writer.uint32(130).bytes(message.sellerId);
6028
+ }
6029
+ if (message.openingTrade !== false) {
6030
+ writer.uint32(136).bool(message.openingTrade);
6031
+ }
6032
+ if (message.systemPriced !== false) {
6033
+ writer.uint32(144).bool(message.systemPriced);
6034
+ }
6035
+ if (message.marketOnClose !== false) {
6036
+ writer.uint32(152).bool(message.marketOnClose);
6037
+ }
6038
+ if (message.oddLot !== false) {
6039
+ writer.uint32(160).bool(message.oddLot);
6040
+ }
6041
+ if (message.settlementTerms !== 0) {
6042
+ writer.uint32(168).int32(message.settlementTerms);
6043
+ }
6044
+ if (message.crossType !== 0) {
6045
+ writer.uint32(176).int32(message.crossType);
6046
+ }
6047
+ if (message.byPass !== false) {
6048
+ writer.uint32(184).bool(message.byPass);
6049
+ }
6050
+ if (!message.lastPrice.equals(Long.ZERO)) {
6051
+ writer.uint32(192).sint64(message.lastPrice.toString());
6052
+ }
6053
+ if (message.saleCondition.length !== 0) {
6054
+ writer.uint32(202).bytes(message.saleCondition);
6055
+ }
6056
+ if (message.currency !== "") {
6057
+ writer.uint32(210).string(message.currency);
6058
+ }
6059
+ if (message.doesNotUpdateLast !== false) {
6060
+ writer.uint32(216).bool(message.doesNotUpdateLast);
6061
+ }
6062
+ if (message.doesNotUpdateVolume !== false) {
6063
+ writer.uint32(224).bool(message.doesNotUpdateVolume);
6064
+ }
6065
+ if (message.session !== "") {
6066
+ writer.uint32(242).string(message.session);
6067
+ }
6068
+ if (message.blockTrade !== false) {
6069
+ writer.uint32(248).bool(message.blockTrade);
6070
+ }
6071
+ if (!message.distributionTime.equals(Long.ZERO)) {
6072
+ writer.uint32(256).sint64(message.distributionTime.toString());
6073
+ }
6074
+ if (!message.transactionTime2.equals(Long.ZERO)) {
6075
+ writer.uint32(264).sint64(message.transactionTime2.toString());
6076
+ }
6077
+ if (message.consolidatedPriceIndicator !== "") {
6078
+ writer.uint32(274).string(message.consolidatedPriceIndicator);
6079
+ }
6080
+ if (message.transient !== false) {
6081
+ writer.uint32(280).bool(message.transient);
6082
+ }
6083
+ if (message.indexShortName !== "") {
6084
+ writer.uint32(290).string(message.indexShortName);
6085
+ }
6086
+ return writer;
6087
+ }
6088
+ }, TradeDecode = {
6089
+ decode(input, length) {
6090
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6091
+ const end = length === void 0 ? reader.len : reader.pos + length;
6092
+ const message = createBaseTrade();
6093
+ while (reader.pos < end) {
6094
+ const tag = reader.uint32();
6095
+ switch (tag >>> 3) {
6096
+ case 8: {
6097
+ if (tag !== 66) {
6098
+ break;
6099
+ }
6100
+ message.originatorId = reader.bytes();
6101
+ continue;
6102
+ }
6103
+ case 9: {
6104
+ if (tag !== 72) {
4973
6105
  break;
4974
6106
  }
4975
6107
  message.transactionTime = Long.fromString(reader.sint64().toString());
@@ -5193,7 +6325,80 @@ function createBaseTradeCorrection() {
5193
6325
  originalTradeQuantity: Long.ZERO
5194
6326
  };
5195
6327
  }
5196
- const TradeCorrectionDecode = {
6328
+ const TradeCorrectionEncode = {
6329
+ encode(message, writer = new BinaryWriter()) {
6330
+ if (message.originatorId.length !== 0) {
6331
+ writer.uint32(66).bytes(message.originatorId);
6332
+ }
6333
+ if (!message.transactionTime.equals(Long.ZERO)) {
6334
+ writer.uint32(72).sint64(message.transactionTime.toString());
6335
+ }
6336
+ if (!message.price.equals(Long.ZERO)) {
6337
+ writer.uint32(80).sint64(message.price.toString());
6338
+ }
6339
+ if (!message.quantity.equals(Long.ZERO)) {
6340
+ writer.uint32(88).sint64(message.quantity.toString());
6341
+ }
6342
+ if (message.tradeId.length !== 0) {
6343
+ writer.uint32(98).bytes(message.tradeId);
6344
+ }
6345
+ if (message.side !== 0) {
6346
+ writer.uint32(104).int32(message.side);
6347
+ }
6348
+ if (message.tradeDate !== 0) {
6349
+ writer.uint32(112).sint32(message.tradeDate);
6350
+ }
6351
+ if (message.buyerId.length !== 0) {
6352
+ writer.uint32(122).bytes(message.buyerId);
6353
+ }
6354
+ if (message.sellerId.length !== 0) {
6355
+ writer.uint32(130).bytes(message.sellerId);
6356
+ }
6357
+ if (message.openingTrade !== false) {
6358
+ writer.uint32(136).bool(message.openingTrade);
6359
+ }
6360
+ if (message.systemPriced !== false) {
6361
+ writer.uint32(144).bool(message.systemPriced);
6362
+ }
6363
+ if (message.marketOnClose !== false) {
6364
+ writer.uint32(152).bool(message.marketOnClose);
6365
+ }
6366
+ if (message.oddLot !== false) {
6367
+ writer.uint32(160).bool(message.oddLot);
6368
+ }
6369
+ if (message.settlementTerms !== 0) {
6370
+ writer.uint32(168).int32(message.settlementTerms);
6371
+ }
6372
+ if (message.crossType !== 0) {
6373
+ writer.uint32(176).int32(message.crossType);
6374
+ }
6375
+ if (message.byPass !== false) {
6376
+ writer.uint32(184).bool(message.byPass);
6377
+ }
6378
+ if (message.originalTradeId.length !== 0) {
6379
+ writer.uint32(194).bytes(message.originalTradeId);
6380
+ }
6381
+ if (message.saleCondition.length !== 0) {
6382
+ writer.uint32(202).bytes(message.saleCondition);
6383
+ }
6384
+ if (message.currency !== "") {
6385
+ writer.uint32(210).string(message.currency);
6386
+ }
6387
+ if (!message.distributionTime.equals(Long.ZERO)) {
6388
+ writer.uint32(216).sint64(message.distributionTime.toString());
6389
+ }
6390
+ if (!message.transactionTime2.equals(Long.ZERO)) {
6391
+ writer.uint32(224).sint64(message.transactionTime2.toString());
6392
+ }
6393
+ if (!message.originalTradePrice.equals(Long.ZERO)) {
6394
+ writer.uint32(232).sint64(message.originalTradePrice.toString());
6395
+ }
6396
+ if (!message.originalTradeQuantity.equals(Long.ZERO)) {
6397
+ writer.uint32(240).sint64(message.originalTradeQuantity.toString());
6398
+ }
6399
+ return writer;
6400
+ }
6401
+ }, TradeCorrectionDecode = {
5197
6402
  decode(input, length) {
5198
6403
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5199
6404
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -5384,7 +6589,38 @@ function createBaseTradeCancel() {
5384
6589
  transactionTime2: Long.ZERO
5385
6590
  };
5386
6591
  }
5387
- const TradeCancelDecode = {
6592
+ const TradeCancelEncode = {
6593
+ encode(message, writer = new BinaryWriter()) {
6594
+ if (message.originatorId.length !== 0) {
6595
+ writer.uint32(66).bytes(message.originatorId);
6596
+ }
6597
+ if (!message.transactionTime.equals(Long.ZERO)) {
6598
+ writer.uint32(72).sint64(message.transactionTime.toString());
6599
+ }
6600
+ if (!message.correctedTradePrice.equals(Long.ZERO)) {
6601
+ writer.uint32(80).sint64(message.correctedTradePrice.toString());
6602
+ }
6603
+ if (!message.correctedTradeQuantity.equals(Long.ZERO)) {
6604
+ writer.uint32(88).sint64(message.correctedTradeQuantity.toString());
6605
+ }
6606
+ if (message.tradeId.length !== 0) {
6607
+ writer.uint32(98).bytes(message.tradeId);
6608
+ }
6609
+ if (message.saleCondition.length !== 0) {
6610
+ writer.uint32(106).bytes(message.saleCondition);
6611
+ }
6612
+ if (message.currency !== "") {
6613
+ writer.uint32(114).string(message.currency);
6614
+ }
6615
+ if (!message.distributionTime.equals(Long.ZERO)) {
6616
+ writer.uint32(120).sint64(message.distributionTime.toString());
6617
+ }
6618
+ if (!message.transactionTime2.equals(Long.ZERO)) {
6619
+ writer.uint32(128).sint64(message.transactionTime2.toString());
6620
+ }
6621
+ return writer;
6622
+ }
6623
+ }, TradeCancelDecode = {
5388
6624
  decode(input, length) {
5389
6625
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5390
6626
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -5467,7 +6703,26 @@ const TradeCancelDecode = {
5467
6703
  function createBaseOpen() {
5468
6704
  return { transactionTime: Long.ZERO, tradeDate: 0, price: Long.ZERO, OpenCloseSettlementFlag: 0, currency: "" };
5469
6705
  }
5470
- const OpenDecode = {
6706
+ const OpenEncode = {
6707
+ encode(message, writer = new BinaryWriter()) {
6708
+ if (!message.transactionTime.equals(Long.ZERO)) {
6709
+ writer.uint32(72).sint64(message.transactionTime.toString());
6710
+ }
6711
+ if (message.tradeDate !== 0) {
6712
+ writer.uint32(80).sint32(message.tradeDate);
6713
+ }
6714
+ if (!message.price.equals(Long.ZERO)) {
6715
+ writer.uint32(88).sint64(message.price.toString());
6716
+ }
6717
+ if (message.OpenCloseSettlementFlag !== 0) {
6718
+ writer.uint32(96).int32(message.OpenCloseSettlementFlag);
6719
+ }
6720
+ if (message.currency !== "") {
6721
+ writer.uint32(106).string(message.currency);
6722
+ }
6723
+ return writer;
6724
+ }
6725
+ }, OpenDecode = {
5471
6726
  decode(input, length) {
5472
6727
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5473
6728
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -5522,7 +6777,23 @@ const OpenDecode = {
5522
6777
  function createBaseHigh() {
5523
6778
  return { transactionTime: Long.ZERO, tradeDate: 0, price: Long.ZERO, currency: "" };
5524
6779
  }
5525
- const HighDecode = {
6780
+ const HighEncode = {
6781
+ encode(message, writer = new BinaryWriter()) {
6782
+ if (!message.transactionTime.equals(Long.ZERO)) {
6783
+ writer.uint32(72).sint64(message.transactionTime.toString());
6784
+ }
6785
+ if (message.tradeDate !== 0) {
6786
+ writer.uint32(80).sint32(message.tradeDate);
6787
+ }
6788
+ if (!message.price.equals(Long.ZERO)) {
6789
+ writer.uint32(88).sint64(message.price.toString());
6790
+ }
6791
+ if (message.currency !== "") {
6792
+ writer.uint32(98).string(message.currency);
6793
+ }
6794
+ return writer;
6795
+ }
6796
+ }, HighDecode = {
5526
6797
  decode(input, length) {
5527
6798
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5528
6799
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -5570,7 +6841,23 @@ const HighDecode = {
5570
6841
  function createBaseHighRolling() {
5571
6842
  return { transactionTime: Long.ZERO, tradeDate: 0, price: Long.ZERO, currency: "" };
5572
6843
  }
5573
- const HighRollingDecode = {
6844
+ const HighRollingEncode = {
6845
+ encode(message, writer = new BinaryWriter()) {
6846
+ if (!message.transactionTime.equals(Long.ZERO)) {
6847
+ writer.uint32(72).sint64(message.transactionTime.toString());
6848
+ }
6849
+ if (message.tradeDate !== 0) {
6850
+ writer.uint32(80).sint32(message.tradeDate);
6851
+ }
6852
+ if (!message.price.equals(Long.ZERO)) {
6853
+ writer.uint32(88).sint64(message.price.toString());
6854
+ }
6855
+ if (message.currency !== "") {
6856
+ writer.uint32(98).string(message.currency);
6857
+ }
6858
+ return writer;
6859
+ }
6860
+ }, HighRollingDecode = {
5574
6861
  decode(input, length) {
5575
6862
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5576
6863
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -5618,7 +6905,23 @@ const HighRollingDecode = {
5618
6905
  function createBaseLow() {
5619
6906
  return { transactionTime: Long.ZERO, tradeDate: 0, price: Long.ZERO, currency: "" };
5620
6907
  }
5621
- const LowDecode = {
6908
+ const LowEncode = {
6909
+ encode(message, writer = new BinaryWriter()) {
6910
+ if (!message.transactionTime.equals(Long.ZERO)) {
6911
+ writer.uint32(72).sint64(message.transactionTime.toString());
6912
+ }
6913
+ if (message.tradeDate !== 0) {
6914
+ writer.uint32(80).sint32(message.tradeDate);
6915
+ }
6916
+ if (!message.price.equals(Long.ZERO)) {
6917
+ writer.uint32(88).sint64(message.price.toString());
6918
+ }
6919
+ if (message.currency !== "") {
6920
+ writer.uint32(98).string(message.currency);
6921
+ }
6922
+ return writer;
6923
+ }
6924
+ }, LowDecode = {
5622
6925
  decode(input, length) {
5623
6926
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5624
6927
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -5666,7 +6969,23 @@ const LowDecode = {
5666
6969
  function createBaseLowRolling() {
5667
6970
  return { transactionTime: Long.ZERO, tradeDate: 0, price: Long.ZERO, currency: "" };
5668
6971
  }
5669
- const LowRollingDecode = {
6972
+ const LowRollingEncode = {
6973
+ encode(message, writer = new BinaryWriter()) {
6974
+ if (!message.transactionTime.equals(Long.ZERO)) {
6975
+ writer.uint32(72).sint64(message.transactionTime.toString());
6976
+ }
6977
+ if (message.tradeDate !== 0) {
6978
+ writer.uint32(80).sint32(message.tradeDate);
6979
+ }
6980
+ if (!message.price.equals(Long.ZERO)) {
6981
+ writer.uint32(88).sint64(message.price.toString());
6982
+ }
6983
+ if (message.currency !== "") {
6984
+ writer.uint32(98).string(message.currency);
6985
+ }
6986
+ return writer;
6987
+ }
6988
+ }, LowRollingDecode = {
5670
6989
  decode(input, length) {
5671
6990
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5672
6991
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -5714,7 +7033,23 @@ const LowRollingDecode = {
5714
7033
  function createBaseClose() {
5715
7034
  return { transactionTime: Long.ZERO, tradeDate: 0, price: Long.ZERO, currency: "" };
5716
7035
  }
5717
- const CloseDecode = {
7036
+ const CloseEncode = {
7037
+ encode(message, writer = new BinaryWriter()) {
7038
+ if (!message.transactionTime.equals(Long.ZERO)) {
7039
+ writer.uint32(72).sint64(message.transactionTime.toString());
7040
+ }
7041
+ if (message.tradeDate !== 0) {
7042
+ writer.uint32(80).sint32(message.tradeDate);
7043
+ }
7044
+ if (!message.price.equals(Long.ZERO)) {
7045
+ writer.uint32(88).sint64(message.price.toString());
7046
+ }
7047
+ if (message.currency !== "") {
7048
+ writer.uint32(98).string(message.currency);
7049
+ }
7050
+ return writer;
7051
+ }
7052
+ }, CloseDecode = {
5718
7053
  decode(input, length) {
5719
7054
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5720
7055
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -5762,7 +7097,23 @@ const CloseDecode = {
5762
7097
  function createBasePrevClose() {
5763
7098
  return { transactionTime: Long.ZERO, tradeDate: 0, price: Long.ZERO, currency: "" };
5764
7099
  }
5765
- const PrevCloseDecode = {
7100
+ const PrevCloseEncode = {
7101
+ encode(message, writer = new BinaryWriter()) {
7102
+ if (!message.transactionTime.equals(Long.ZERO)) {
7103
+ writer.uint32(72).sint64(message.transactionTime.toString());
7104
+ }
7105
+ if (message.tradeDate !== 0) {
7106
+ writer.uint32(80).sint32(message.tradeDate);
7107
+ }
7108
+ if (!message.price.equals(Long.ZERO)) {
7109
+ writer.uint32(88).sint64(message.price.toString());
7110
+ }
7111
+ if (message.currency !== "") {
7112
+ writer.uint32(98).string(message.currency);
7113
+ }
7114
+ return writer;
7115
+ }
7116
+ }, PrevCloseDecode = {
5766
7117
  decode(input, length) {
5767
7118
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5768
7119
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -5810,7 +7161,29 @@ const PrevCloseDecode = {
5810
7161
  function createBaseLast() {
5811
7162
  return { transactionTime: Long.ZERO, tradeDate: 0, price: Long.ZERO, quantity: Long.ZERO, currency: "", session: "" };
5812
7163
  }
5813
- const LastDecode = {
7164
+ const LastEncode = {
7165
+ encode(message, writer = new BinaryWriter()) {
7166
+ if (!message.transactionTime.equals(Long.ZERO)) {
7167
+ writer.uint32(72).sint64(message.transactionTime.toString());
7168
+ }
7169
+ if (message.tradeDate !== 0) {
7170
+ writer.uint32(80).sint32(message.tradeDate);
7171
+ }
7172
+ if (!message.price.equals(Long.ZERO)) {
7173
+ writer.uint32(88).sint64(message.price.toString());
7174
+ }
7175
+ if (!message.quantity.equals(Long.ZERO)) {
7176
+ writer.uint32(96).sint64(message.quantity.toString());
7177
+ }
7178
+ if (message.currency !== "") {
7179
+ writer.uint32(106).string(message.currency);
7180
+ }
7181
+ if (message.session !== "") {
7182
+ writer.uint32(242).string(message.session);
7183
+ }
7184
+ return writer;
7185
+ }
7186
+ }, LastDecode = {
5814
7187
  decode(input, length) {
5815
7188
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5816
7189
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -5872,7 +7245,20 @@ const LastDecode = {
5872
7245
  function createBaseYearHigh() {
5873
7246
  return { transactionTime: Long.ZERO, price: Long.ZERO, currency: "" };
5874
7247
  }
5875
- const YearHighDecode = {
7248
+ const YearHighEncode = {
7249
+ encode(message, writer = new BinaryWriter()) {
7250
+ if (!message.transactionTime.equals(Long.ZERO)) {
7251
+ writer.uint32(72).sint64(message.transactionTime.toString());
7252
+ }
7253
+ if (!message.price.equals(Long.ZERO)) {
7254
+ writer.uint32(80).sint64(message.price.toString());
7255
+ }
7256
+ if (message.currency !== "") {
7257
+ writer.uint32(90).string(message.currency);
7258
+ }
7259
+ return writer;
7260
+ }
7261
+ }, YearHighDecode = {
5876
7262
  decode(input, length) {
5877
7263
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5878
7264
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -5913,7 +7299,20 @@ const YearHighDecode = {
5913
7299
  function createBaseYearLow() {
5914
7300
  return { transactionTime: Long.ZERO, price: Long.ZERO, currency: "" };
5915
7301
  }
5916
- const YearLowDecode = {
7302
+ const YearLowEncode = {
7303
+ encode(message, writer = new BinaryWriter()) {
7304
+ if (!message.transactionTime.equals(Long.ZERO)) {
7305
+ writer.uint32(72).sint64(message.transactionTime.toString());
7306
+ }
7307
+ if (!message.price.equals(Long.ZERO)) {
7308
+ writer.uint32(80).sint64(message.price.toString());
7309
+ }
7310
+ if (message.currency !== "") {
7311
+ writer.uint32(90).string(message.currency);
7312
+ }
7313
+ return writer;
7314
+ }
7315
+ }, YearLowDecode = {
5917
7316
  decode(input, length) {
5918
7317
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5919
7318
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -5954,7 +7353,20 @@ const YearLowDecode = {
5954
7353
  function createBaseVolume() {
5955
7354
  return { transactionTime: Long.ZERO, tradeDate: 0, volume: Long.ZERO };
5956
7355
  }
5957
- const VolumeDecode = {
7356
+ const VolumeEncode = {
7357
+ encode(message, writer = new BinaryWriter()) {
7358
+ if (!message.transactionTime.equals(Long.ZERO)) {
7359
+ writer.uint32(72).sint64(message.transactionTime.toString());
7360
+ }
7361
+ if (message.tradeDate !== 0) {
7362
+ writer.uint32(80).sint32(message.tradeDate);
7363
+ }
7364
+ if (!message.volume.equals(Long.ZERO)) {
7365
+ writer.uint32(88).sint64(message.volume.toString());
7366
+ }
7367
+ return writer;
7368
+ }
7369
+ }, VolumeDecode = {
5958
7370
  decode(input, length) {
5959
7371
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5960
7372
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -5995,7 +7407,20 @@ const VolumeDecode = {
5995
7407
  function createBaseNumberOfTrades() {
5996
7408
  return { transactionTime: Long.ZERO, tradeDate: 0, numberTrades: Long.ZERO };
5997
7409
  }
5998
- const NumberOfTradesDecode = {
7410
+ const NumberOfTradesEncode = {
7411
+ encode(message, writer = new BinaryWriter()) {
7412
+ if (!message.transactionTime.equals(Long.ZERO)) {
7413
+ writer.uint32(72).sint64(message.transactionTime.toString());
7414
+ }
7415
+ if (message.tradeDate !== 0) {
7416
+ writer.uint32(80).sint32(message.tradeDate);
7417
+ }
7418
+ if (!message.numberTrades.equals(Long.ZERO)) {
7419
+ writer.uint32(88).sint64(message.numberTrades.toString());
7420
+ }
7421
+ return writer;
7422
+ }
7423
+ }, NumberOfTradesDecode = {
5999
7424
  decode(input, length) {
6000
7425
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6001
7426
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -6036,7 +7461,23 @@ const NumberOfTradesDecode = {
6036
7461
  function createBaseMonetaryValue() {
6037
7462
  return { transactionTime: Long.ZERO, tradeDate: 0, value: Long.ZERO, valueCurrencyCode: "" };
6038
7463
  }
6039
- const MonetaryValueDecode = {
7464
+ const MonetaryValueEncode = {
7465
+ encode(message, writer = new BinaryWriter()) {
7466
+ if (!message.transactionTime.equals(Long.ZERO)) {
7467
+ writer.uint32(72).sint64(message.transactionTime.toString());
7468
+ }
7469
+ if (message.tradeDate !== 0) {
7470
+ writer.uint32(80).sint32(message.tradeDate);
7471
+ }
7472
+ if (!message.value.equals(Long.ZERO)) {
7473
+ writer.uint32(88).sint64(message.value.toString());
7474
+ }
7475
+ if (message.valueCurrencyCode !== "") {
7476
+ writer.uint32(98).string(message.valueCurrencyCode);
7477
+ }
7478
+ return writer;
7479
+ }
7480
+ }, MonetaryValueDecode = {
6040
7481
  decode(input, length) {
6041
7482
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6042
7483
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -6094,7 +7535,38 @@ function createBaseSettlement() {
6094
7535
  reserved: false
6095
7536
  };
6096
7537
  }
6097
- const SettlementDecode = {
7538
+ const SettlementEncode = {
7539
+ encode(message, writer = new BinaryWriter()) {
7540
+ if (!message.transactionTime.equals(Long.ZERO)) {
7541
+ writer.uint32(72).sint64(message.transactionTime.toString());
7542
+ }
7543
+ if (message.tradeDate !== 0) {
7544
+ writer.uint32(80).sint32(message.tradeDate);
7545
+ }
7546
+ if (!message.price.equals(Long.ZERO)) {
7547
+ writer.uint32(88).sint64(message.price.toString());
7548
+ }
7549
+ if (message.preliminarySettle !== false) {
7550
+ writer.uint32(96).bool(message.preliminarySettle);
7551
+ }
7552
+ if (message.currency !== "") {
7553
+ writer.uint32(106).string(message.currency);
7554
+ }
7555
+ if (message.settlementSource !== 0) {
7556
+ writer.uint32(112).int32(message.settlementSource);
7557
+ }
7558
+ if (message.session !== "") {
7559
+ writer.uint32(122).string(message.session);
7560
+ }
7561
+ if (message.transient !== false) {
7562
+ writer.uint32(128).bool(message.transient);
7563
+ }
7564
+ if (message.reserved !== false) {
7565
+ writer.uint32(1016).bool(message.reserved);
7566
+ }
7567
+ return writer;
7568
+ }
7569
+ }, SettlementDecode = {
6098
7570
  decode(input, length) {
6099
7571
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6100
7572
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -6177,7 +7649,20 @@ const SettlementDecode = {
6177
7649
  function createBaseOpenInterest() {
6178
7650
  return { transactionTime: Long.ZERO, tradeDate: 0, volume: Long.ZERO };
6179
7651
  }
6180
- const OpenInterestDecode = {
7652
+ const OpenInterestEncode = {
7653
+ encode(message, writer = new BinaryWriter()) {
7654
+ if (!message.transactionTime.equals(Long.ZERO)) {
7655
+ writer.uint32(72).sint64(message.transactionTime.toString());
7656
+ }
7657
+ if (message.tradeDate !== 0) {
7658
+ writer.uint32(80).sint32(message.tradeDate);
7659
+ }
7660
+ if (!message.volume.equals(Long.ZERO)) {
7661
+ writer.uint32(88).sint64(message.volume.toString());
7662
+ }
7663
+ return writer;
7664
+ }
7665
+ }, OpenInterestDecode = {
6181
7666
  decode(input, length) {
6182
7667
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6183
7668
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -6218,7 +7703,20 @@ const OpenInterestDecode = {
6218
7703
  function createBaseMarketOpenInterest() {
6219
7704
  return { transactionTime: Long.ZERO, tradeDate: 0, volume: Long.ZERO };
6220
7705
  }
6221
- const MarketOpenInterestDecode = {
7706
+ const MarketOpenInterestEncode = {
7707
+ encode(message, writer = new BinaryWriter()) {
7708
+ if (!message.transactionTime.equals(Long.ZERO)) {
7709
+ writer.uint32(72).sint64(message.transactionTime.toString());
7710
+ }
7711
+ if (message.tradeDate !== 0) {
7712
+ writer.uint32(80).sint32(message.tradeDate);
7713
+ }
7714
+ if (!message.volume.equals(Long.ZERO)) {
7715
+ writer.uint32(88).sint64(message.volume.toString());
7716
+ }
7717
+ return writer;
7718
+ }
7719
+ }, MarketOpenInterestDecode = {
6222
7720
  decode(input, length) {
6223
7721
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6224
7722
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -6259,7 +7757,20 @@ const MarketOpenInterestDecode = {
6259
7757
  function createBaseVwap() {
6260
7758
  return { transactionTime: Long.ZERO, tradeDate: 0, vwap: Long.ZERO };
6261
7759
  }
6262
- const VwapDecode = {
7760
+ const VwapEncode = {
7761
+ encode(message, writer = new BinaryWriter()) {
7762
+ if (!message.transactionTime.equals(Long.ZERO)) {
7763
+ writer.uint32(72).sint64(message.transactionTime.toString());
7764
+ }
7765
+ if (message.tradeDate !== 0) {
7766
+ writer.uint32(80).sint32(message.tradeDate);
7767
+ }
7768
+ if (!message.vwap.equals(Long.ZERO)) {
7769
+ writer.uint32(88).sint64(message.vwap.toString());
7770
+ }
7771
+ return writer;
7772
+ }
7773
+ }, VwapDecode = {
6263
7774
  decode(input, length) {
6264
7775
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6265
7776
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -6319,7 +7830,65 @@ function createBaseDividendsIncomeDistributions() {
6319
7830
  reinvestDate: 0
6320
7831
  };
6321
7832
  }
6322
- const DividendsIncomeDistributionsDecode = {
7833
+ const DividendsIncomeDistributionsEncode = {
7834
+ encode(message, writer = new BinaryWriter()) {
7835
+ if (!message.transactionTime.equals(Long.ZERO)) {
7836
+ writer.uint32(48).sint64(message.transactionTime.toString());
7837
+ }
7838
+ if (message.instrumentType !== "") {
7839
+ writer.uint32(58).string(message.instrumentType);
7840
+ }
7841
+ if (message.corporateAction !== "") {
7842
+ writer.uint32(66).string(message.corporateAction);
7843
+ }
7844
+ if (message.distributionType !== "") {
7845
+ writer.uint32(74).string(message.distributionType);
7846
+ }
7847
+ if (message.payableDate !== 0) {
7848
+ writer.uint32(80).sint32(message.payableDate);
7849
+ }
7850
+ if (message.recordDate !== 0) {
7851
+ writer.uint32(88).sint32(message.recordDate);
7852
+ }
7853
+ if (message.exDividendDate !== 0) {
7854
+ writer.uint32(96).sint32(message.exDividendDate);
7855
+ }
7856
+ if (!message.amount.equals(Long.ZERO)) {
7857
+ writer.uint32(104).sint64(message.amount.toString());
7858
+ }
7859
+ if (message.currencyCode !== "") {
7860
+ writer.uint32(114).string(message.currencyCode);
7861
+ }
7862
+ for (const v of message.notes) {
7863
+ writer.uint32(122).string(v);
7864
+ }
7865
+ if (!message.totalCashDistribution.equals(Long.ZERO)) {
7866
+ writer.uint32(128).sint64(message.totalCashDistribution.toString());
7867
+ }
7868
+ if (!message.nonQualifiedCashDistribution.equals(Long.ZERO)) {
7869
+ writer.uint32(136).sint64(message.nonQualifiedCashDistribution.toString());
7870
+ }
7871
+ if (!message.qualifiedCashDistribution.equals(Long.ZERO)) {
7872
+ writer.uint32(144).sint64(message.qualifiedCashDistribution.toString());
7873
+ }
7874
+ if (!message.taxFreeCashDistribution.equals(Long.ZERO)) {
7875
+ writer.uint32(152).sint64(message.taxFreeCashDistribution.toString());
7876
+ }
7877
+ if (!message.ordinaryForeignTaxCredit.equals(Long.ZERO)) {
7878
+ writer.uint32(160).sint64(message.ordinaryForeignTaxCredit.toString());
7879
+ }
7880
+ if (!message.qualifiedForeignTaxCredit.equals(Long.ZERO)) {
7881
+ writer.uint32(168).sint64(message.qualifiedForeignTaxCredit.toString());
7882
+ }
7883
+ if (!message.stockDividendRatio.equals(Long.ZERO)) {
7884
+ writer.uint32(176).sint64(message.stockDividendRatio.toString());
7885
+ }
7886
+ if (message.reinvestDate !== 0) {
7887
+ writer.uint32(184).sint32(message.reinvestDate);
7888
+ }
7889
+ return writer;
7890
+ }
7891
+ }, DividendsIncomeDistributionsDecode = {
6323
7892
  decode(input, length) {
6324
7893
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6325
7894
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -6479,7 +8048,50 @@ function createBaseCapitalDistributions() {
6479
8048
  reinvestDate: 0
6480
8049
  };
6481
8050
  }
6482
- const CapitalDistributionsDecode = {
8051
+ const CapitalDistributionsEncode = {
8052
+ encode(message, writer = new BinaryWriter()) {
8053
+ if (!message.transactionTime.equals(Long.ZERO)) {
8054
+ writer.uint32(64).sint64(message.transactionTime.toString());
8055
+ }
8056
+ if (message.instrumentType !== "") {
8057
+ writer.uint32(74).string(message.instrumentType);
8058
+ }
8059
+ if (message.corporateAction !== "") {
8060
+ writer.uint32(82).string(message.corporateAction);
8061
+ }
8062
+ if (message.payableDate !== 0) {
8063
+ writer.uint32(88).sint32(message.payableDate);
8064
+ }
8065
+ if (message.recordDate !== 0) {
8066
+ writer.uint32(96).sint32(message.recordDate);
8067
+ }
8068
+ if (message.exDate !== 0) {
8069
+ writer.uint32(104).sint32(message.exDate);
8070
+ }
8071
+ if (!message.shortTermCapitalGain.equals(Long.ZERO)) {
8072
+ writer.uint32(112).sint64(message.shortTermCapitalGain.toString());
8073
+ }
8074
+ if (!message.longTermCapitalGain.equals(Long.ZERO)) {
8075
+ writer.uint32(120).sint64(message.longTermCapitalGain.toString());
8076
+ }
8077
+ if (!message.unallocatedDistributions.equals(Long.ZERO)) {
8078
+ writer.uint32(128).sint64(message.unallocatedDistributions.toString());
8079
+ }
8080
+ if (!message.returnOfCapital.equals(Long.ZERO)) {
8081
+ writer.uint32(136).sint64(message.returnOfCapital.toString());
8082
+ }
8083
+ if (message.currencyCode !== "") {
8084
+ writer.uint32(146).string(message.currencyCode);
8085
+ }
8086
+ for (const v of message.notes) {
8087
+ writer.uint32(154).string(v);
8088
+ }
8089
+ if (message.reinvestDate !== 0) {
8090
+ writer.uint32(160).sint32(message.reinvestDate);
8091
+ }
8092
+ return writer;
8093
+ }
8094
+ }, CapitalDistributionsDecode = {
6483
8095
  decode(input, length) {
6484
8096
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6485
8097
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -6590,7 +8202,17 @@ const CapitalDistributionsDecode = {
6590
8202
  function createBaseSharesOutstanding() {
6591
8203
  return { sharesOutstanding: Long.ZERO, transactionTime: Long.ZERO };
6592
8204
  }
6593
- const SharesOutstandingDecode = {
8205
+ const SharesOutstandingEncode = {
8206
+ encode(message, writer = new BinaryWriter()) {
8207
+ if (!message.sharesOutstanding.equals(Long.ZERO)) {
8208
+ writer.uint32(8).sint64(message.sharesOutstanding.toString());
8209
+ }
8210
+ if (!message.transactionTime.equals(Long.ZERO)) {
8211
+ writer.uint32(16).sint64(message.transactionTime.toString());
8212
+ }
8213
+ return writer;
8214
+ }
8215
+ }, SharesOutstandingDecode = {
6594
8216
  decode(input, length) {
6595
8217
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6596
8218
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -6624,7 +8246,23 @@ const SharesOutstandingDecode = {
6624
8246
  function createBasePriceLimits() {
6625
8247
  return { tradeDate: 0, transactionTime: Long.ZERO, upperPriceLimit: Long.ZERO, lowerPriceLimit: Long.ZERO };
6626
8248
  }
6627
- const PriceLimitsDecode = {
8249
+ const PriceLimitsEncode = {
8250
+ encode(message, writer = new BinaryWriter()) {
8251
+ if (message.tradeDate !== 0) {
8252
+ writer.uint32(8).sint32(message.tradeDate);
8253
+ }
8254
+ if (!message.transactionTime.equals(Long.ZERO)) {
8255
+ writer.uint32(16).sint64(message.transactionTime.toString());
8256
+ }
8257
+ if (!message.upperPriceLimit.equals(Long.ZERO)) {
8258
+ writer.uint32(24).sint64(message.upperPriceLimit.toString());
8259
+ }
8260
+ if (!message.lowerPriceLimit.equals(Long.ZERO)) {
8261
+ writer.uint32(32).sint64(message.lowerPriceLimit.toString());
8262
+ }
8263
+ return writer;
8264
+ }
8265
+ }, PriceLimitsDecode = {
6628
8266
  decode(input, length) {
6629
8267
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6630
8268
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -6672,9 +8310,31 @@ const PriceLimitsDecode = {
6672
8310
  function createBaseReferenceVolatilityPrice() {
6673
8311
  return { tradeDate: 0, atm: 0, surfaceDomain: "", volatility: Long.ZERO, premium: Long.ZERO, delta: Long.ZERO };
6674
8312
  }
6675
- const ReferenceVolatilityPriceDecode = {
6676
- decode(input, length) {
6677
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
8313
+ const ReferenceVolatilityPriceEncode = {
8314
+ encode(message, writer = new BinaryWriter()) {
8315
+ if (message.tradeDate !== 0) {
8316
+ writer.uint32(8).sint32(message.tradeDate);
8317
+ }
8318
+ if (message.atm !== 0) {
8319
+ writer.uint32(16).sint32(message.atm);
8320
+ }
8321
+ if (message.surfaceDomain !== "") {
8322
+ writer.uint32(26).string(message.surfaceDomain);
8323
+ }
8324
+ if (!message.volatility.equals(Long.ZERO)) {
8325
+ writer.uint32(32).sint64(message.volatility.toString());
8326
+ }
8327
+ if (!message.premium.equals(Long.ZERO)) {
8328
+ writer.uint32(40).sint64(message.premium.toString());
8329
+ }
8330
+ if (!message.delta.equals(Long.ZERO)) {
8331
+ writer.uint32(48).sint64(message.delta.toString());
8332
+ }
8333
+ return writer;
8334
+ }
8335
+ }, ReferenceVolatilityPriceDecode = {
8336
+ decode(input, length) {
8337
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6678
8338
  const end = length === void 0 ? reader.len : reader.pos + length;
6679
8339
  const message = createBaseReferenceVolatilityPrice();
6680
8340
  while (reader.pos < end) {
@@ -6734,7 +8394,17 @@ const ReferenceVolatilityPriceDecode = {
6734
8394
  function createBaseNetAssetValue() {
6735
8395
  return { netAssetValue: Long.ZERO, transactionTime: Long.ZERO };
6736
8396
  }
6737
- const NetAssetValueDecode = {
8397
+ const NetAssetValueEncode = {
8398
+ encode(message, writer = new BinaryWriter()) {
8399
+ if (!message.netAssetValue.equals(Long.ZERO)) {
8400
+ writer.uint32(8).sint64(message.netAssetValue.toString());
8401
+ }
8402
+ if (!message.transactionTime.equals(Long.ZERO)) {
8403
+ writer.uint32(16).sint64(message.transactionTime.toString());
8404
+ }
8405
+ return writer;
8406
+ }
8407
+ }, NetAssetValueDecode = {
6738
8408
  decode(input, length) {
6739
8409
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6740
8410
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -6790,7 +8460,74 @@ function createBaseMarketSummary() {
6790
8460
  transient: false
6791
8461
  };
6792
8462
  }
6793
- const MarketSummaryDecode = {
8463
+ const MarketSummaryEncode = {
8464
+ encode(message, writer = new BinaryWriter()) {
8465
+ if (!message.transactionTime.equals(Long.ZERO)) {
8466
+ writer.uint32(8).sint64(message.transactionTime.toString());
8467
+ }
8468
+ if (message.tradingDate !== 0) {
8469
+ writer.uint32(16).sint32(message.tradingDate);
8470
+ }
8471
+ if (message.startOfDay !== false) {
8472
+ writer.uint32(24).bool(message.startOfDay);
8473
+ }
8474
+ if (message.endOfDay !== false) {
8475
+ writer.uint32(32).bool(message.endOfDay);
8476
+ }
8477
+ if (message.clear !== 0) {
8478
+ writer.uint32(40).int32(message.clear);
8479
+ }
8480
+ if (message.instrumentStatus !== void 0) {
8481
+ InstrumentStatusEncode.encode(message.instrumentStatus, writer.uint32(74).fork()).join();
8482
+ }
8483
+ if (message.bbo !== void 0) {
8484
+ BestBidOfferEncode.encode(message.bbo, writer.uint32(82).fork()).join();
8485
+ }
8486
+ if (message.open !== void 0) {
8487
+ OpenEncode.encode(message.open, writer.uint32(90).fork()).join();
8488
+ }
8489
+ if (message.high !== void 0) {
8490
+ HighEncode.encode(message.high, writer.uint32(98).fork()).join();
8491
+ }
8492
+ if (message.low !== void 0) {
8493
+ LowEncode.encode(message.low, writer.uint32(106).fork()).join();
8494
+ }
8495
+ if (message.close !== void 0) {
8496
+ CloseEncode.encode(message.close, writer.uint32(114).fork()).join();
8497
+ }
8498
+ if (message.prevClose !== void 0) {
8499
+ PrevCloseEncode.encode(message.prevClose, writer.uint32(122).fork()).join();
8500
+ }
8501
+ if (message.last !== void 0) {
8502
+ LastEncode.encode(message.last, writer.uint32(130).fork()).join();
8503
+ }
8504
+ if (message.volume !== void 0) {
8505
+ VolumeEncode.encode(message.volume, writer.uint32(138).fork()).join();
8506
+ }
8507
+ if (message.settlement !== void 0) {
8508
+ SettlementEncode.encode(message.settlement, writer.uint32(146).fork()).join();
8509
+ }
8510
+ if (message.openInterest !== void 0) {
8511
+ OpenInterestEncode.encode(message.openInterest, writer.uint32(154).fork()).join();
8512
+ }
8513
+ if (message.vwap !== void 0) {
8514
+ VwapEncode.encode(message.vwap, writer.uint32(162).fork()).join();
8515
+ }
8516
+ if (message.session !== "") {
8517
+ writer.uint32(170).string(message.session);
8518
+ }
8519
+ if (message.summaryType !== 0) {
8520
+ writer.uint32(176).int32(message.summaryType);
8521
+ }
8522
+ if (message.prevVolume !== void 0) {
8523
+ VolumeEncode.encode(message.prevVolume, writer.uint32(186).fork()).join();
8524
+ }
8525
+ if (message.transient !== false) {
8526
+ writer.uint32(192).bool(message.transient);
8527
+ }
8528
+ return writer;
8529
+ }
8530
+ }, MarketSummaryDecode = {
6794
8531
  decode(input, length) {
6795
8532
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6796
8533
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -6957,7 +8694,17 @@ const MarketSummaryDecode = {
6957
8694
  function createBaseContext() {
6958
8695
  return { data: [], tracePoints: [] };
6959
8696
  }
6960
- const ContextDecode = {
8697
+ const ContextEncode = {
8698
+ encode(message, writer = new BinaryWriter()) {
8699
+ for (const v of message.data) {
8700
+ ContextDataEncode.encode(v, writer.uint32(10).fork()).join();
8701
+ }
8702
+ for (const v of message.tracePoints) {
8703
+ TracePointEncode.encode(v, writer.uint32(18).fork()).join();
8704
+ }
8705
+ return writer;
8706
+ }
8707
+ }, ContextDecode = {
6961
8708
  decode(input, length) {
6962
8709
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6963
8710
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -7000,7 +8747,35 @@ function createBaseContextData() {
7000
8747
  vdouble: void 0
7001
8748
  };
7002
8749
  }
7003
- const ContextDataDecode = {
8750
+ const ContextDataEncode = {
8751
+ encode(message, writer = new BinaryWriter()) {
8752
+ if (message.id !== "") {
8753
+ writer.uint32(10).string(message.id);
8754
+ }
8755
+ if (message.vstring !== void 0) {
8756
+ writer.uint32(42).string(message.vstring);
8757
+ }
8758
+ if (message.vbytes !== void 0) {
8759
+ writer.uint32(50).bytes(message.vbytes);
8760
+ }
8761
+ if (message.vbool !== void 0) {
8762
+ writer.uint32(56).bool(message.vbool);
8763
+ }
8764
+ if (message.vsint32 !== void 0) {
8765
+ writer.uint32(64).sint32(message.vsint32);
8766
+ }
8767
+ if (message.vsint64 !== void 0) {
8768
+ writer.uint32(72).sint64(message.vsint64.toString());
8769
+ }
8770
+ if (message.vfloat !== void 0) {
8771
+ writer.uint32(85).float(message.vfloat);
8772
+ }
8773
+ if (message.vdouble !== void 0) {
8774
+ writer.uint32(89).double(message.vdouble);
8775
+ }
8776
+ return writer;
8777
+ }
8778
+ }, ContextDataDecode = {
7004
8779
  decode(input, length) {
7005
8780
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7006
8781
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -7076,7 +8851,23 @@ const ContextDataDecode = {
7076
8851
  function createBaseTracePoint() {
7077
8852
  return { id: "", componentId: "", timestampNs: Long.ZERO, componentLatencyNs: 0 };
7078
8853
  }
7079
- const TracePointDecode = {
8854
+ const TracePointEncode = {
8855
+ encode(message, writer = new BinaryWriter()) {
8856
+ if (message.id !== "") {
8857
+ writer.uint32(10).string(message.id);
8858
+ }
8859
+ if (message.componentId !== "") {
8860
+ writer.uint32(18).string(message.componentId);
8861
+ }
8862
+ if (!message.timestampNs.equals(Long.ZERO)) {
8863
+ writer.uint32(24).sint64(message.timestampNs.toString());
8864
+ }
8865
+ if (message.componentLatencyNs !== 0) {
8866
+ writer.uint32(32).int32(message.componentLatencyNs);
8867
+ }
8868
+ return writer;
8869
+ }
8870
+ }, TracePointDecode = {
7080
8871
  decode(input, length) {
7081
8872
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7082
8873
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -7133,7 +8924,35 @@ function createBaseVolumeAtPrice() {
7133
8924
  priceVolumes: []
7134
8925
  };
7135
8926
  }
7136
- const VolumeAtPriceDecode = {
8927
+ const VolumeAtPriceEncode = {
8928
+ encode(message, writer = new BinaryWriter()) {
8929
+ if (!message.marketId.equals(Long.ZERO)) {
8930
+ writer.uint32(8).sint64(message.marketId.toString());
8931
+ }
8932
+ if (message.symbol !== "") {
8933
+ writer.uint32(18).string(message.symbol);
8934
+ }
8935
+ if (!message.transactionTime.equals(Long.ZERO)) {
8936
+ writer.uint32(24).sint64(message.transactionTime.toString());
8937
+ }
8938
+ if (!message.lastPrice.equals(Long.ZERO)) {
8939
+ writer.uint32(32).sint64(message.lastPrice.toString());
8940
+ }
8941
+ if (!message.lastQuantity.equals(Long.ZERO)) {
8942
+ writer.uint32(40).sint64(message.lastQuantity.toString());
8943
+ }
8944
+ if (!message.lastCumulativeVolume.equals(Long.ZERO)) {
8945
+ writer.uint32(48).sint64(message.lastCumulativeVolume.toString());
8946
+ }
8947
+ if (message.tradeDate !== 0) {
8948
+ writer.uint32(56).sint32(message.tradeDate);
8949
+ }
8950
+ for (const v of message.priceVolumes) {
8951
+ VolumeAtPrice_PriceLevelVolumeEncode.encode(v, writer.uint32(66).fork()).join();
8952
+ }
8953
+ return writer;
8954
+ }
8955
+ }, VolumeAtPriceDecode = {
7137
8956
  decode(input, length) {
7138
8957
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7139
8958
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -7209,7 +9028,17 @@ const VolumeAtPriceDecode = {
7209
9028
  function createBaseVolumeAtPrice_PriceLevelVolume() {
7210
9029
  return { price: Long.ZERO, volume: Long.ZERO };
7211
9030
  }
7212
- const VolumeAtPrice_PriceLevelVolumeDecode = {
9031
+ const VolumeAtPrice_PriceLevelVolumeEncode = {
9032
+ encode(message, writer = new BinaryWriter()) {
9033
+ if (!message.price.equals(Long.ZERO)) {
9034
+ writer.uint32(8).sint64(message.price.toString());
9035
+ }
9036
+ if (!message.volume.equals(Long.ZERO)) {
9037
+ writer.uint32(16).sint64(message.volume.toString());
9038
+ }
9039
+ return writer;
9040
+ }
9041
+ }, VolumeAtPrice_PriceLevelVolumeDecode = {
7213
9042
  decode(input, length) {
7214
9043
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7215
9044
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -7258,7 +9087,53 @@ function createBaseOhlc() {
7258
9087
  closeEndTime: Long.ZERO
7259
9088
  };
7260
9089
  }
7261
- const OhlcDecode = {
9090
+ const OhlcEncode = {
9091
+ encode(message, writer = new BinaryWriter()) {
9092
+ if (!message.marketId.equals(Long.ZERO)) {
9093
+ writer.uint32(8).sint64(message.marketId.toString());
9094
+ }
9095
+ if (message.symbol !== "") {
9096
+ writer.uint32(18).string(message.symbol);
9097
+ }
9098
+ if (message.open !== void 0) {
9099
+ OpenEncode.encode(message.open, writer.uint32(26).fork()).join();
9100
+ }
9101
+ if (message.high !== void 0) {
9102
+ HighEncode.encode(message.high, writer.uint32(34).fork()).join();
9103
+ }
9104
+ if (message.low !== void 0) {
9105
+ LowEncode.encode(message.low, writer.uint32(42).fork()).join();
9106
+ }
9107
+ if (message.close !== void 0) {
9108
+ CloseEncode.encode(message.close, writer.uint32(50).fork()).join();
9109
+ }
9110
+ if (!message.volume.equals(Long.ZERO)) {
9111
+ writer.uint32(56).sint64(message.volume.toString());
9112
+ }
9113
+ if (message.priceVolume !== 0) {
9114
+ writer.uint32(65).double(message.priceVolume);
9115
+ }
9116
+ if (!message.numberTrades.equals(Long.ZERO)) {
9117
+ writer.uint32(72).sint64(message.numberTrades.toString());
9118
+ }
9119
+ if (message.tradeDate !== 0) {
9120
+ writer.uint32(80).sint32(message.tradeDate);
9121
+ }
9122
+ if (!message.transactionTime.equals(Long.ZERO)) {
9123
+ writer.uint32(88).sint64(message.transactionTime.toString());
9124
+ }
9125
+ for (const v of message.tradeIds) {
9126
+ writer.uint32(98).string(v);
9127
+ }
9128
+ if (!message.openStartTime.equals(Long.ZERO)) {
9129
+ writer.uint32(104).sint64(message.openStartTime.toString());
9130
+ }
9131
+ if (!message.closeEndTime.equals(Long.ZERO)) {
9132
+ writer.uint32(112).sint64(message.closeEndTime.toString());
9133
+ }
9134
+ return writer;
9135
+ }
9136
+ }, OhlcDecode = {
7262
9137
  decode(input, length) {
7263
9138
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7264
9139
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -7384,7 +9259,32 @@ function createBaseInstrumentAction() {
7384
9259
  newInstrument: void 0
7385
9260
  };
7386
9261
  }
7387
- const InstrumentActionDecode = {
9262
+ const InstrumentActionEncode = {
9263
+ encode(message, writer = new BinaryWriter()) {
9264
+ if (!message.transactionTime.equals(Long.ZERO)) {
9265
+ writer.uint32(8).sint64(message.transactionTime.toString());
9266
+ }
9267
+ if (message.tradeDate !== 0) {
9268
+ writer.uint32(16).sint32(message.tradeDate);
9269
+ }
9270
+ if (message.action !== 0) {
9271
+ writer.uint32(24).int32(message.action);
9272
+ }
9273
+ if (message.message !== "") {
9274
+ writer.uint32(34).string(message.message);
9275
+ }
9276
+ if (message.oldAlias !== "") {
9277
+ writer.uint32(42).string(message.oldAlias);
9278
+ }
9279
+ if (message.instrument !== void 0) {
9280
+ InstrumentDefinitionEncode.encode(message.instrument, writer.uint32(82).fork()).join();
9281
+ }
9282
+ if (message.newInstrument !== void 0) {
9283
+ InstrumentDefinitionEncode.encode(message.newInstrument, writer.uint32(90).fork()).join();
9284
+ }
9285
+ return writer;
9286
+ }
9287
+ }, InstrumentActionDecode = {
7388
9288
  decode(input, length) {
7389
9289
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7390
9290
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -7453,7 +9353,29 @@ const InstrumentActionDecode = {
7453
9353
  function createBaseRequestForQuote() {
7454
9354
  return { quoteRequestId: "", symbol: "", securityId: Long.ZERO, orderQuantity: 0, quoteType: 0, side: 0 };
7455
9355
  }
7456
- const RequestForQuoteDecode = {
9356
+ const RequestForQuoteEncode = {
9357
+ encode(message, writer = new BinaryWriter()) {
9358
+ if (message.quoteRequestId !== "") {
9359
+ writer.uint32(10).string(message.quoteRequestId);
9360
+ }
9361
+ if (message.symbol !== "") {
9362
+ writer.uint32(18).string(message.symbol);
9363
+ }
9364
+ if (!message.securityId.equals(Long.ZERO)) {
9365
+ writer.uint32(24).sint64(message.securityId.toString());
9366
+ }
9367
+ if (message.orderQuantity !== 0) {
9368
+ writer.uint32(32).sint32(message.orderQuantity);
9369
+ }
9370
+ if (message.quoteType !== 0) {
9371
+ writer.uint32(40).sint32(message.quoteType);
9372
+ }
9373
+ if (message.side !== 0) {
9374
+ writer.uint32(48).sint32(message.side);
9375
+ }
9376
+ return writer;
9377
+ }
9378
+ }, RequestForQuoteDecode = {
7457
9379
  decode(input, length) {
7458
9380
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7459
9381
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -7555,6 +9477,17 @@ var SymbolType = /* @__PURE__ */ ((SymbolType2) => {
7555
9477
  SymbolType2[SymbolType2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
7556
9478
  return SymbolType2;
7557
9479
  })(SymbolType || {});
9480
+ function createBaseOpenfeedGatewayRequest() {
9481
+ return {
9482
+ loginRequest: void 0,
9483
+ logoutRequest: void 0,
9484
+ subscriptionRequest: void 0,
9485
+ instrumentRequest: void 0,
9486
+ instrumentReferenceRequest: void 0,
9487
+ exchangeRequest: void 0,
9488
+ listSubscriptionsRequest: void 0
9489
+ };
9490
+ }
7558
9491
  const OpenfeedGatewayRequestEncode = {
7559
9492
  encode(message, writer = new BinaryWriter()) {
7560
9493
  if (message.loginRequest !== void 0) {
@@ -7580,6 +9513,71 @@ const OpenfeedGatewayRequestEncode = {
7580
9513
  }
7581
9514
  return writer;
7582
9515
  }
9516
+ }, OpenfeedGatewayRequestDecode = {
9517
+ decode(input, length) {
9518
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
9519
+ const end = length === void 0 ? reader.len : reader.pos + length;
9520
+ const message = createBaseOpenfeedGatewayRequest();
9521
+ while (reader.pos < end) {
9522
+ const tag = reader.uint32();
9523
+ switch (tag >>> 3) {
9524
+ case 1: {
9525
+ if (tag !== 10) {
9526
+ break;
9527
+ }
9528
+ message.loginRequest = LoginRequestDecode.decode(reader, reader.uint32());
9529
+ continue;
9530
+ }
9531
+ case 2: {
9532
+ if (tag !== 18) {
9533
+ break;
9534
+ }
9535
+ message.logoutRequest = LogoutRequestDecode.decode(reader, reader.uint32());
9536
+ continue;
9537
+ }
9538
+ case 3: {
9539
+ if (tag !== 26) {
9540
+ break;
9541
+ }
9542
+ message.subscriptionRequest = SubscriptionRequestDecode.decode(reader, reader.uint32());
9543
+ continue;
9544
+ }
9545
+ case 4: {
9546
+ if (tag !== 34) {
9547
+ break;
9548
+ }
9549
+ message.instrumentRequest = InstrumentRequestDecode.decode(reader, reader.uint32());
9550
+ continue;
9551
+ }
9552
+ case 5: {
9553
+ if (tag !== 42) {
9554
+ break;
9555
+ }
9556
+ message.instrumentReferenceRequest = InstrumentReferenceRequestDecode.decode(reader, reader.uint32());
9557
+ continue;
9558
+ }
9559
+ case 6: {
9560
+ if (tag !== 50) {
9561
+ break;
9562
+ }
9563
+ message.exchangeRequest = ExchangeRequestDecode.decode(reader, reader.uint32());
9564
+ continue;
9565
+ }
9566
+ case 7: {
9567
+ if (tag !== 58) {
9568
+ break;
9569
+ }
9570
+ message.listSubscriptionsRequest = ListSubscriptionsRequestDecode.decode(reader, reader.uint32());
9571
+ continue;
9572
+ }
9573
+ }
9574
+ if ((tag & 7) === 4 || tag === 0) {
9575
+ break;
9576
+ }
9577
+ reader.skip(tag & 7);
9578
+ }
9579
+ return message;
9580
+ }
7583
9581
  };
7584
9582
  function createBaseOpenfeedGatewayMessage() {
7585
9583
  return {
@@ -7600,7 +9598,56 @@ function createBaseOpenfeedGatewayMessage() {
7600
9598
  listSubscriptionsResponse: void 0
7601
9599
  };
7602
9600
  }
7603
- const OpenfeedGatewayMessageDecode = {
9601
+ const OpenfeedGatewayMessageEncode = {
9602
+ encode(message, writer = new BinaryWriter()) {
9603
+ if (message.loginResponse !== void 0) {
9604
+ LoginResponseEncode.encode(message.loginResponse, writer.uint32(10).fork()).join();
9605
+ }
9606
+ if (message.logoutResponse !== void 0) {
9607
+ LogoutResponseEncode.encode(message.logoutResponse, writer.uint32(18).fork()).join();
9608
+ }
9609
+ if (message.instrumentResponse !== void 0) {
9610
+ InstrumentResponseEncode.encode(message.instrumentResponse, writer.uint32(26).fork()).join();
9611
+ }
9612
+ if (message.instrumentReferenceResponse !== void 0) {
9613
+ InstrumentReferenceResponseEncode.encode(message.instrumentReferenceResponse, writer.uint32(34).fork()).join();
9614
+ }
9615
+ if (message.subscriptionResponse !== void 0) {
9616
+ SubscriptionResponseEncode.encode(message.subscriptionResponse, writer.uint32(42).fork()).join();
9617
+ }
9618
+ if (message.marketStatus !== void 0) {
9619
+ MarketStatusEncode.encode(message.marketStatus, writer.uint32(50).fork()).join();
9620
+ }
9621
+ if (message.heartBeat !== void 0) {
9622
+ HeartBeatEncode.encode(message.heartBeat, writer.uint32(58).fork()).join();
9623
+ }
9624
+ if (message.instrumentDefinition !== void 0) {
9625
+ InstrumentDefinitionEncode.encode(message.instrumentDefinition, writer.uint32(66).fork()).join();
9626
+ }
9627
+ if (message.marketSnapshot !== void 0) {
9628
+ MarketSnapshotEncode.encode(message.marketSnapshot, writer.uint32(74).fork()).join();
9629
+ }
9630
+ if (message.marketUpdate !== void 0) {
9631
+ MarketUpdateEncode.encode(message.marketUpdate, writer.uint32(82).fork()).join();
9632
+ }
9633
+ if (message.volumeAtPrice !== void 0) {
9634
+ VolumeAtPriceEncode.encode(message.volumeAtPrice, writer.uint32(90).fork()).join();
9635
+ }
9636
+ if (message.ohlc !== void 0) {
9637
+ OhlcEncode.encode(message.ohlc, writer.uint32(98).fork()).join();
9638
+ }
9639
+ if (message.exchangeResponse !== void 0) {
9640
+ ExchangeResponseEncode.encode(message.exchangeResponse, writer.uint32(106).fork()).join();
9641
+ }
9642
+ if (message.instrumentAction !== void 0) {
9643
+ InstrumentActionEncode.encode(message.instrumentAction, writer.uint32(114).fork()).join();
9644
+ }
9645
+ if (message.listSubscriptionsResponse !== void 0) {
9646
+ ListSubscriptionsResponseEncode.encode(message.listSubscriptionsResponse, writer.uint32(122).fork()).join();
9647
+ }
9648
+ return writer;
9649
+ }
9650
+ }, OpenfeedGatewayMessageDecode = {
7604
9651
  decode(input, length) {
7605
9652
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7606
9653
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -7725,7 +9772,20 @@ const OpenfeedGatewayMessageDecode = {
7725
9772
  function createBaseStatus() {
7726
9773
  return { result: 0, message: "", service: 0 };
7727
9774
  }
7728
- const StatusDecode = {
9775
+ const StatusEncode = {
9776
+ encode(message, writer = new BinaryWriter()) {
9777
+ if (message.result !== 0) {
9778
+ writer.uint32(8).int32(message.result);
9779
+ }
9780
+ if (message.message !== "") {
9781
+ writer.uint32(18).string(message.message);
9782
+ }
9783
+ if (message.service !== 0) {
9784
+ writer.uint32(24).int32(message.service);
9785
+ }
9786
+ return writer;
9787
+ }
9788
+ }, StatusDecode = {
7729
9789
  decode(input, length) {
7730
9790
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7731
9791
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -7763,6 +9823,9 @@ const StatusDecode = {
7763
9823
  return message;
7764
9824
  }
7765
9825
  };
9826
+ function createBaseLoginRequest() {
9827
+ return { correlationId: Long.ZERO, username: "", password: "", clientVersion: "", protocolVersion: 0, jwt: "" };
9828
+ }
7766
9829
  const LoginRequestEncode = {
7767
9830
  encode(message, writer = new BinaryWriter()) {
7768
9831
  if (!message.correlationId.equals(Long.ZERO)) {
@@ -7785,15 +9848,11 @@ const LoginRequestEncode = {
7785
9848
  }
7786
9849
  return writer;
7787
9850
  }
7788
- };
7789
- function createBaseLoginResponse() {
7790
- return { correlationId: Long.ZERO, status: void 0, token: "" };
7791
- }
7792
- const LoginResponseDecode = {
9851
+ }, LoginRequestDecode = {
7793
9852
  decode(input, length) {
7794
9853
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7795
9854
  const end = length === void 0 ? reader.len : reader.pos + length;
7796
- const message = createBaseLoginResponse();
9855
+ const message = createBaseLoginRequest();
7797
9856
  while (reader.pos < end) {
7798
9857
  const tag = reader.uint32();
7799
9858
  switch (tag >>> 3) {
@@ -7808,14 +9867,35 @@ const LoginResponseDecode = {
7808
9867
  if (tag !== 18) {
7809
9868
  break;
7810
9869
  }
7811
- message.status = StatusDecode.decode(reader, reader.uint32());
9870
+ message.username = reader.string();
7812
9871
  continue;
7813
9872
  }
7814
9873
  case 3: {
7815
9874
  if (tag !== 26) {
7816
9875
  break;
7817
9876
  }
7818
- message.token = reader.string();
9877
+ message.password = reader.string();
9878
+ continue;
9879
+ }
9880
+ case 4: {
9881
+ if (tag !== 34) {
9882
+ break;
9883
+ }
9884
+ message.clientVersion = reader.string();
9885
+ continue;
9886
+ }
9887
+ case 5: {
9888
+ if (tag !== 40) {
9889
+ break;
9890
+ }
9891
+ message.protocolVersion = reader.sint32();
9892
+ continue;
9893
+ }
9894
+ case 6: {
9895
+ if (tag !== 50) {
9896
+ break;
9897
+ }
9898
+ message.jwt = reader.string();
7819
9899
  continue;
7820
9900
  }
7821
9901
  }
@@ -7827,25 +9907,27 @@ const LoginResponseDecode = {
7827
9907
  return message;
7828
9908
  }
7829
9909
  };
7830
- const LogoutRequestEncode = {
9910
+ function createBaseLoginResponse() {
9911
+ return { correlationId: Long.ZERO, status: void 0, token: "" };
9912
+ }
9913
+ const LoginResponseEncode = {
7831
9914
  encode(message, writer = new BinaryWriter()) {
7832
9915
  if (!message.correlationId.equals(Long.ZERO)) {
7833
9916
  writer.uint32(8).sint64(message.correlationId.toString());
7834
9917
  }
9918
+ if (message.status !== void 0) {
9919
+ StatusEncode.encode(message.status, writer.uint32(18).fork()).join();
9920
+ }
7835
9921
  if (message.token !== "") {
7836
9922
  writer.uint32(26).string(message.token);
7837
9923
  }
7838
9924
  return writer;
7839
9925
  }
7840
- };
7841
- function createBaseLogoutResponse() {
7842
- return { correlationId: Long.ZERO, status: void 0 };
7843
- }
7844
- const LogoutResponseDecode = {
9926
+ }, LoginResponseDecode = {
7845
9927
  decode(input, length) {
7846
9928
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7847
9929
  const end = length === void 0 ? reader.len : reader.pos + length;
7848
- const message = createBaseLogoutResponse();
9930
+ const message = createBaseLoginResponse();
7849
9931
  while (reader.pos < end) {
7850
9932
  const tag = reader.uint32();
7851
9933
  switch (tag >>> 3) {
@@ -7863,6 +9945,13 @@ const LogoutResponseDecode = {
7863
9945
  message.status = StatusDecode.decode(reader, reader.uint32());
7864
9946
  continue;
7865
9947
  }
9948
+ case 3: {
9949
+ if (tag !== 26) {
9950
+ break;
9951
+ }
9952
+ message.token = reader.string();
9953
+ continue;
9954
+ }
7866
9955
  }
7867
9956
  if ((tag & 7) === 4 || tag === 0) {
7868
9957
  break;
@@ -7872,19 +9961,120 @@ const LogoutResponseDecode = {
7872
9961
  return message;
7873
9962
  }
7874
9963
  };
7875
- const InstrumentRequestEncode = {
9964
+ function createBaseLogoutRequest() {
9965
+ return { correlationId: Long.ZERO, token: "" };
9966
+ }
9967
+ const LogoutRequestEncode = {
7876
9968
  encode(message, writer = new BinaryWriter()) {
7877
9969
  if (!message.correlationId.equals(Long.ZERO)) {
7878
9970
  writer.uint32(8).sint64(message.correlationId.toString());
7879
9971
  }
7880
9972
  if (message.token !== "") {
7881
- writer.uint32(18).string(message.token);
7882
- }
7883
- writer.uint32(26).fork();
7884
- for (const v of message.instrumentType) {
7885
- writer.int32(v);
9973
+ writer.uint32(26).string(message.token);
7886
9974
  }
7887
- writer.join();
9975
+ return writer;
9976
+ }
9977
+ }, LogoutRequestDecode = {
9978
+ decode(input, length) {
9979
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
9980
+ const end = length === void 0 ? reader.len : reader.pos + length;
9981
+ const message = createBaseLogoutRequest();
9982
+ while (reader.pos < end) {
9983
+ const tag = reader.uint32();
9984
+ switch (tag >>> 3) {
9985
+ case 1: {
9986
+ if (tag !== 8) {
9987
+ break;
9988
+ }
9989
+ message.correlationId = Long.fromString(reader.sint64().toString());
9990
+ continue;
9991
+ }
9992
+ case 3: {
9993
+ if (tag !== 26) {
9994
+ break;
9995
+ }
9996
+ message.token = reader.string();
9997
+ continue;
9998
+ }
9999
+ }
10000
+ if ((tag & 7) === 4 || tag === 0) {
10001
+ break;
10002
+ }
10003
+ reader.skip(tag & 7);
10004
+ }
10005
+ return message;
10006
+ }
10007
+ };
10008
+ function createBaseLogoutResponse() {
10009
+ return { correlationId: Long.ZERO, status: void 0 };
10010
+ }
10011
+ const LogoutResponseEncode = {
10012
+ encode(message, writer = new BinaryWriter()) {
10013
+ if (!message.correlationId.equals(Long.ZERO)) {
10014
+ writer.uint32(8).sint64(message.correlationId.toString());
10015
+ }
10016
+ if (message.status !== void 0) {
10017
+ StatusEncode.encode(message.status, writer.uint32(18).fork()).join();
10018
+ }
10019
+ return writer;
10020
+ }
10021
+ }, LogoutResponseDecode = {
10022
+ decode(input, length) {
10023
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
10024
+ const end = length === void 0 ? reader.len : reader.pos + length;
10025
+ const message = createBaseLogoutResponse();
10026
+ while (reader.pos < end) {
10027
+ const tag = reader.uint32();
10028
+ switch (tag >>> 3) {
10029
+ case 1: {
10030
+ if (tag !== 8) {
10031
+ break;
10032
+ }
10033
+ message.correlationId = Long.fromString(reader.sint64().toString());
10034
+ continue;
10035
+ }
10036
+ case 2: {
10037
+ if (tag !== 18) {
10038
+ break;
10039
+ }
10040
+ message.status = StatusDecode.decode(reader, reader.uint32());
10041
+ continue;
10042
+ }
10043
+ }
10044
+ if ((tag & 7) === 4 || tag === 0) {
10045
+ break;
10046
+ }
10047
+ reader.skip(tag & 7);
10048
+ }
10049
+ return message;
10050
+ }
10051
+ };
10052
+ function createBaseInstrumentRequest() {
10053
+ return {
10054
+ correlationId: Long.ZERO,
10055
+ token: "",
10056
+ instrumentType: [],
10057
+ spreadType: [],
10058
+ version: 0,
10059
+ symbol: void 0,
10060
+ marketId: void 0,
10061
+ exchange: void 0,
10062
+ channelId: void 0
10063
+ };
10064
+ }
10065
+ const InstrumentRequestEncode = {
10066
+ encode(message, writer = new BinaryWriter()) {
10067
+ if (!message.correlationId.equals(Long.ZERO)) {
10068
+ writer.uint32(8).sint64(message.correlationId.toString());
10069
+ }
10070
+ if (message.token !== "") {
10071
+ writer.uint32(18).string(message.token);
10072
+ }
10073
+ writer.uint32(26).fork();
10074
+ for (const v of message.instrumentType) {
10075
+ writer.int32(v);
10076
+ }
10077
+ writer.join();
7888
10078
  for (const v of message.spreadType) {
7889
10079
  writer.uint32(34).string(v);
7890
10080
  }
@@ -7905,6 +10095,92 @@ const InstrumentRequestEncode = {
7905
10095
  }
7906
10096
  return writer;
7907
10097
  }
10098
+ }, InstrumentRequestDecode = {
10099
+ decode(input, length) {
10100
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
10101
+ const end = length === void 0 ? reader.len : reader.pos + length;
10102
+ const message = createBaseInstrumentRequest();
10103
+ while (reader.pos < end) {
10104
+ const tag = reader.uint32();
10105
+ switch (tag >>> 3) {
10106
+ case 1: {
10107
+ if (tag !== 8) {
10108
+ break;
10109
+ }
10110
+ message.correlationId = Long.fromString(reader.sint64().toString());
10111
+ continue;
10112
+ }
10113
+ case 2: {
10114
+ if (tag !== 18) {
10115
+ break;
10116
+ }
10117
+ message.token = reader.string();
10118
+ continue;
10119
+ }
10120
+ case 3: {
10121
+ if (tag === 24) {
10122
+ message.instrumentType.push(reader.int32());
10123
+ continue;
10124
+ }
10125
+ if (tag === 26) {
10126
+ const end2 = reader.uint32() + reader.pos;
10127
+ while (reader.pos < end2) {
10128
+ message.instrumentType.push(reader.int32());
10129
+ }
10130
+ continue;
10131
+ }
10132
+ break;
10133
+ }
10134
+ case 4: {
10135
+ if (tag !== 34) {
10136
+ break;
10137
+ }
10138
+ message.spreadType.push(reader.string());
10139
+ continue;
10140
+ }
10141
+ case 5: {
10142
+ if (tag !== 40) {
10143
+ break;
10144
+ }
10145
+ message.version = reader.sint32();
10146
+ continue;
10147
+ }
10148
+ case 10: {
10149
+ if (tag !== 82) {
10150
+ break;
10151
+ }
10152
+ message.symbol = reader.string();
10153
+ continue;
10154
+ }
10155
+ case 11: {
10156
+ if (tag !== 88) {
10157
+ break;
10158
+ }
10159
+ message.marketId = Long.fromString(reader.sint64().toString());
10160
+ continue;
10161
+ }
10162
+ case 12: {
10163
+ if (tag !== 98) {
10164
+ break;
10165
+ }
10166
+ message.exchange = reader.string();
10167
+ continue;
10168
+ }
10169
+ case 13: {
10170
+ if (tag !== 104) {
10171
+ break;
10172
+ }
10173
+ message.channelId = reader.sint32();
10174
+ continue;
10175
+ }
10176
+ }
10177
+ if ((tag & 7) === 4 || tag === 0) {
10178
+ break;
10179
+ }
10180
+ reader.skip(tag & 7);
10181
+ }
10182
+ return message;
10183
+ }
7908
10184
  };
7909
10185
  function createBaseInstrumentResponse() {
7910
10186
  return {
@@ -7919,7 +10195,38 @@ function createBaseInstrumentResponse() {
7919
10195
  instrumentDefinition: void 0
7920
10196
  };
7921
10197
  }
7922
- const InstrumentResponseDecode = {
10198
+ const InstrumentResponseEncode = {
10199
+ encode(message, writer = new BinaryWriter()) {
10200
+ if (!message.correlationId.equals(Long.ZERO)) {
10201
+ writer.uint32(8).sint64(message.correlationId.toString());
10202
+ }
10203
+ if (message.status !== void 0) {
10204
+ StatusEncode.encode(message.status, writer.uint32(18).fork()).join();
10205
+ }
10206
+ if (message.numberOfDefinitions !== 0) {
10207
+ writer.uint32(24).sint32(message.numberOfDefinitions);
10208
+ }
10209
+ if (message.symbol !== "") {
10210
+ writer.uint32(34).string(message.symbol);
10211
+ }
10212
+ if (!message.marketId.equals(Long.ZERO)) {
10213
+ writer.uint32(40).sint64(message.marketId.toString());
10214
+ }
10215
+ if (message.exchange !== "") {
10216
+ writer.uint32(50).string(message.exchange);
10217
+ }
10218
+ if (message.channelId !== 0) {
10219
+ writer.uint32(56).sint32(message.channelId);
10220
+ }
10221
+ if (message.exchangeId !== 0) {
10222
+ writer.uint32(64).sint32(message.exchangeId);
10223
+ }
10224
+ if (message.instrumentDefinition !== void 0) {
10225
+ InstrumentDefinitionEncode.encode(message.instrumentDefinition, writer.uint32(122).fork()).join();
10226
+ }
10227
+ return writer;
10228
+ }
10229
+ }, InstrumentResponseDecode = {
7923
10230
  decode(input, length) {
7924
10231
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7925
10232
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -7999,6 +10306,16 @@ const InstrumentResponseDecode = {
7999
10306
  return message;
8000
10307
  }
8001
10308
  };
10309
+ function createBaseInstrumentReferenceRequest() {
10310
+ return {
10311
+ correlationId: Long.ZERO,
10312
+ token: "",
10313
+ symbol: void 0,
10314
+ marketId: void 0,
10315
+ exchange: void 0,
10316
+ channelId: void 0
10317
+ };
10318
+ }
8002
10319
  const InstrumentReferenceRequestEncode = {
8003
10320
  encode(message, writer = new BinaryWriter()) {
8004
10321
  if (!message.correlationId.equals(Long.ZERO)) {
@@ -8021,6 +10338,64 @@ const InstrumentReferenceRequestEncode = {
8021
10338
  }
8022
10339
  return writer;
8023
10340
  }
10341
+ }, InstrumentReferenceRequestDecode = {
10342
+ decode(input, length) {
10343
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
10344
+ const end = length === void 0 ? reader.len : reader.pos + length;
10345
+ const message = createBaseInstrumentReferenceRequest();
10346
+ while (reader.pos < end) {
10347
+ const tag = reader.uint32();
10348
+ switch (tag >>> 3) {
10349
+ case 1: {
10350
+ if (tag !== 8) {
10351
+ break;
10352
+ }
10353
+ message.correlationId = Long.fromString(reader.sint64().toString());
10354
+ continue;
10355
+ }
10356
+ case 2: {
10357
+ if (tag !== 18) {
10358
+ break;
10359
+ }
10360
+ message.token = reader.string();
10361
+ continue;
10362
+ }
10363
+ case 10: {
10364
+ if (tag !== 82) {
10365
+ break;
10366
+ }
10367
+ message.symbol = reader.string();
10368
+ continue;
10369
+ }
10370
+ case 11: {
10371
+ if (tag !== 88) {
10372
+ break;
10373
+ }
10374
+ message.marketId = Long.fromString(reader.sint64().toString());
10375
+ continue;
10376
+ }
10377
+ case 12: {
10378
+ if (tag !== 98) {
10379
+ break;
10380
+ }
10381
+ message.exchange = reader.string();
10382
+ continue;
10383
+ }
10384
+ case 13: {
10385
+ if (tag !== 104) {
10386
+ break;
10387
+ }
10388
+ message.channelId = reader.sint32();
10389
+ continue;
10390
+ }
10391
+ }
10392
+ if ((tag & 7) === 4 || tag === 0) {
10393
+ break;
10394
+ }
10395
+ reader.skip(tag & 7);
10396
+ }
10397
+ return message;
10398
+ }
8024
10399
  };
8025
10400
  function createBaseInstrumentReferenceResponse() {
8026
10401
  return {
@@ -8038,7 +10413,47 @@ function createBaseInstrumentReferenceResponse() {
8038
10413
  exchangeId: 0
8039
10414
  };
8040
10415
  }
8041
- const InstrumentReferenceResponseDecode = {
10416
+ const InstrumentReferenceResponseEncode = {
10417
+ encode(message, writer = new BinaryWriter()) {
10418
+ if (!message.correlationId.equals(Long.ZERO)) {
10419
+ writer.uint32(8).sint64(message.correlationId.toString());
10420
+ }
10421
+ if (message.status !== void 0) {
10422
+ StatusEncode.encode(message.status, writer.uint32(18).fork()).join();
10423
+ }
10424
+ if (message.numberOfDefinitions !== 0) {
10425
+ writer.uint32(24).sint32(message.numberOfDefinitions);
10426
+ }
10427
+ if (message.channelId !== 0) {
10428
+ writer.uint32(32).sint32(message.channelId);
10429
+ }
10430
+ if (!message.marketId.equals(Long.ZERO)) {
10431
+ writer.uint32(40).sint64(message.marketId.toString());
10432
+ }
10433
+ if (message.symbol !== "") {
10434
+ writer.uint32(50).string(message.symbol);
10435
+ }
10436
+ if (message.exchange !== "") {
10437
+ writer.uint32(58).string(message.exchange);
10438
+ }
10439
+ if (message.ddfSymbol !== "") {
10440
+ writer.uint32(66).string(message.ddfSymbol);
10441
+ }
10442
+ if (message.ddfExchange !== "") {
10443
+ writer.uint32(74).string(message.ddfExchange);
10444
+ }
10445
+ if (message.ddfBaseCode !== "") {
10446
+ writer.uint32(82).string(message.ddfBaseCode);
10447
+ }
10448
+ if (message.exchangeSymbol !== "") {
10449
+ writer.uint32(90).string(message.exchangeSymbol);
10450
+ }
10451
+ if (message.exchangeId !== 0) {
10452
+ writer.uint32(96).sint32(message.exchangeId);
10453
+ }
10454
+ return writer;
10455
+ }
10456
+ }, InstrumentReferenceResponseDecode = {
8042
10457
  decode(input, length) {
8043
10458
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
8044
10459
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -8139,6 +10554,9 @@ const InstrumentReferenceResponseDecode = {
8139
10554
  return message;
8140
10555
  }
8141
10556
  };
10557
+ function createBaseExchangeRequest() {
10558
+ return { correlationId: Long.ZERO, token: "" };
10559
+ }
8142
10560
  const ExchangeRequestEncode = {
8143
10561
  encode(message, writer = new BinaryWriter()) {
8144
10562
  if (!message.correlationId.equals(Long.ZERO)) {
@@ -8149,11 +10567,54 @@ const ExchangeRequestEncode = {
8149
10567
  }
8150
10568
  return writer;
8151
10569
  }
10570
+ }, ExchangeRequestDecode = {
10571
+ decode(input, length) {
10572
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
10573
+ const end = length === void 0 ? reader.len : reader.pos + length;
10574
+ const message = createBaseExchangeRequest();
10575
+ while (reader.pos < end) {
10576
+ const tag = reader.uint32();
10577
+ switch (tag >>> 3) {
10578
+ case 1: {
10579
+ if (tag !== 8) {
10580
+ break;
10581
+ }
10582
+ message.correlationId = Long.fromString(reader.sint64().toString());
10583
+ continue;
10584
+ }
10585
+ case 2: {
10586
+ if (tag !== 18) {
10587
+ break;
10588
+ }
10589
+ message.token = reader.string();
10590
+ continue;
10591
+ }
10592
+ }
10593
+ if ((tag & 7) === 4 || tag === 0) {
10594
+ break;
10595
+ }
10596
+ reader.skip(tag & 7);
10597
+ }
10598
+ return message;
10599
+ }
8152
10600
  };
8153
10601
  function createBaseExchangeResponse() {
8154
10602
  return { correlationId: Long.ZERO, status: void 0, exchanges: [] };
8155
10603
  }
8156
- const ExchangeResponseDecode = {
10604
+ const ExchangeResponseEncode = {
10605
+ encode(message, writer = new BinaryWriter()) {
10606
+ if (!message.correlationId.equals(Long.ZERO)) {
10607
+ writer.uint32(8).sint64(message.correlationId.toString());
10608
+ }
10609
+ if (message.status !== void 0) {
10610
+ StatusEncode.encode(message.status, writer.uint32(18).fork()).join();
10611
+ }
10612
+ for (const v of message.exchanges) {
10613
+ ExchangeResponse_ExchangeEncode.encode(v, writer.uint32(26).fork()).join();
10614
+ }
10615
+ return writer;
10616
+ }
10617
+ }, ExchangeResponseDecode = {
8157
10618
  decode(input, length) {
8158
10619
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
8159
10620
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -8188,46 +10649,180 @@ const ExchangeResponseDecode = {
8188
10649
  }
8189
10650
  reader.skip(tag & 7);
8190
10651
  }
8191
- return message;
10652
+ return message;
10653
+ }
10654
+ };
10655
+ function createBaseExchangeResponse_Exchange() {
10656
+ return { code: "", description: "", aliases: [], exchangeId: 0 };
10657
+ }
10658
+ const ExchangeResponse_ExchangeEncode = {
10659
+ encode(message, writer = new BinaryWriter()) {
10660
+ if (message.code !== "") {
10661
+ writer.uint32(10).string(message.code);
10662
+ }
10663
+ if (message.description !== "") {
10664
+ writer.uint32(18).string(message.description);
10665
+ }
10666
+ for (const v of message.aliases) {
10667
+ writer.uint32(26).string(v);
10668
+ }
10669
+ if (message.exchangeId !== 0) {
10670
+ writer.uint32(32).sint32(message.exchangeId);
10671
+ }
10672
+ return writer;
10673
+ }
10674
+ }, ExchangeResponse_ExchangeDecode = {
10675
+ decode(input, length) {
10676
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
10677
+ const end = length === void 0 ? reader.len : reader.pos + length;
10678
+ const message = createBaseExchangeResponse_Exchange();
10679
+ while (reader.pos < end) {
10680
+ const tag = reader.uint32();
10681
+ switch (tag >>> 3) {
10682
+ case 1: {
10683
+ if (tag !== 10) {
10684
+ break;
10685
+ }
10686
+ message.code = reader.string();
10687
+ continue;
10688
+ }
10689
+ case 2: {
10690
+ if (tag !== 18) {
10691
+ break;
10692
+ }
10693
+ message.description = reader.string();
10694
+ continue;
10695
+ }
10696
+ case 3: {
10697
+ if (tag !== 26) {
10698
+ break;
10699
+ }
10700
+ message.aliases.push(reader.string());
10701
+ continue;
10702
+ }
10703
+ case 4: {
10704
+ if (tag !== 32) {
10705
+ break;
10706
+ }
10707
+ message.exchangeId = reader.sint32();
10708
+ continue;
10709
+ }
10710
+ }
10711
+ if ((tag & 7) === 4 || tag === 0) {
10712
+ break;
10713
+ }
10714
+ reader.skip(tag & 7);
10715
+ }
10716
+ return message;
10717
+ }
10718
+ };
10719
+ function createBaseBulkSubscriptionFilter() {
10720
+ return { symbolType: 0, symbolPattern: "" };
10721
+ }
10722
+ const BulkSubscriptionFilterEncode = {
10723
+ encode(message, writer = new BinaryWriter()) {
10724
+ if (message.symbolType !== 0) {
10725
+ writer.uint32(8).int32(message.symbolType);
10726
+ }
10727
+ if (message.symbolPattern !== "") {
10728
+ writer.uint32(18).string(message.symbolPattern);
10729
+ }
10730
+ return writer;
10731
+ }
10732
+ }, BulkSubscriptionFilterDecode = {
10733
+ decode(input, length) {
10734
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
10735
+ const end = length === void 0 ? reader.len : reader.pos + length;
10736
+ const message = createBaseBulkSubscriptionFilter();
10737
+ while (reader.pos < end) {
10738
+ const tag = reader.uint32();
10739
+ switch (tag >>> 3) {
10740
+ case 1: {
10741
+ if (tag !== 8) {
10742
+ break;
10743
+ }
10744
+ message.symbolType = reader.int32();
10745
+ continue;
10746
+ }
10747
+ case 2: {
10748
+ if (tag !== 18) {
10749
+ break;
10750
+ }
10751
+ message.symbolPattern = reader.string();
10752
+ continue;
10753
+ }
10754
+ }
10755
+ if ((tag & 7) === 4 || tag === 0) {
10756
+ break;
10757
+ }
10758
+ reader.skip(tag & 7);
10759
+ }
10760
+ return message;
10761
+ }
10762
+ };
10763
+ function createBaseSubscriptionRequest() {
10764
+ return { correlationId: Long.ZERO, token: "", service: 0, unsubscribe: false, requests: [] };
10765
+ }
10766
+ const SubscriptionRequestEncode = {
10767
+ encode(message, writer = new BinaryWriter()) {
10768
+ if (!message.correlationId.equals(Long.ZERO)) {
10769
+ writer.uint32(8).sint64(message.correlationId.toString());
10770
+ }
10771
+ if (message.token !== "") {
10772
+ writer.uint32(18).string(message.token);
10773
+ }
10774
+ if (message.service !== 0) {
10775
+ writer.uint32(24).int32(message.service);
10776
+ }
10777
+ if (message.unsubscribe !== false) {
10778
+ writer.uint32(32).bool(message.unsubscribe);
10779
+ }
10780
+ for (const v of message.requests) {
10781
+ SubscriptionRequest_RequestEncode.encode(v, writer.uint32(42).fork()).join();
10782
+ }
10783
+ return writer;
8192
10784
  }
8193
- };
8194
- function createBaseExchangeResponse_Exchange() {
8195
- return { code: "", description: "", aliases: [], exchangeId: 0 };
8196
- }
8197
- const ExchangeResponse_ExchangeDecode = {
10785
+ }, SubscriptionRequestDecode = {
8198
10786
  decode(input, length) {
8199
10787
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
8200
10788
  const end = length === void 0 ? reader.len : reader.pos + length;
8201
- const message = createBaseExchangeResponse_Exchange();
10789
+ const message = createBaseSubscriptionRequest();
8202
10790
  while (reader.pos < end) {
8203
10791
  const tag = reader.uint32();
8204
10792
  switch (tag >>> 3) {
8205
10793
  case 1: {
8206
- if (tag !== 10) {
10794
+ if (tag !== 8) {
8207
10795
  break;
8208
10796
  }
8209
- message.code = reader.string();
10797
+ message.correlationId = Long.fromString(reader.sint64().toString());
8210
10798
  continue;
8211
10799
  }
8212
10800
  case 2: {
8213
10801
  if (tag !== 18) {
8214
10802
  break;
8215
10803
  }
8216
- message.description = reader.string();
10804
+ message.token = reader.string();
8217
10805
  continue;
8218
10806
  }
8219
10807
  case 3: {
8220
- if (tag !== 26) {
10808
+ if (tag !== 24) {
8221
10809
  break;
8222
10810
  }
8223
- message.aliases.push(reader.string());
10811
+ message.service = reader.int32();
8224
10812
  continue;
8225
10813
  }
8226
10814
  case 4: {
8227
10815
  if (tag !== 32) {
8228
10816
  break;
8229
10817
  }
8230
- message.exchangeId = reader.sint32();
10818
+ message.unsubscribe = reader.bool();
10819
+ continue;
10820
+ }
10821
+ case 5: {
10822
+ if (tag !== 42) {
10823
+ break;
10824
+ }
10825
+ message.requests.push(SubscriptionRequest_RequestDecode.decode(reader, reader.uint32()));
8231
10826
  continue;
8232
10827
  }
8233
10828
  }
@@ -8239,37 +10834,21 @@ const ExchangeResponse_ExchangeDecode = {
8239
10834
  return message;
8240
10835
  }
8241
10836
  };
8242
- const BulkSubscriptionFilterEncode = {
8243
- encode(message, writer = new BinaryWriter()) {
8244
- if (message.symbolType !== 0) {
8245
- writer.uint32(8).int32(message.symbolType);
8246
- }
8247
- if (message.symbolPattern !== "") {
8248
- writer.uint32(18).string(message.symbolPattern);
8249
- }
8250
- return writer;
8251
- }
8252
- };
8253
- const SubscriptionRequestEncode = {
8254
- encode(message, writer = new BinaryWriter()) {
8255
- if (!message.correlationId.equals(Long.ZERO)) {
8256
- writer.uint32(8).sint64(message.correlationId.toString());
8257
- }
8258
- if (message.token !== "") {
8259
- writer.uint32(18).string(message.token);
8260
- }
8261
- if (message.service !== 0) {
8262
- writer.uint32(24).int32(message.service);
8263
- }
8264
- if (message.unsubscribe !== false) {
8265
- writer.uint32(32).bool(message.unsubscribe);
8266
- }
8267
- for (const v of message.requests) {
8268
- SubscriptionRequest_RequestEncode.encode(v, writer.uint32(42).fork()).join();
8269
- }
8270
- return writer;
8271
- }
8272
- };
10837
+ function createBaseSubscriptionRequest_Request() {
10838
+ return {
10839
+ symbol: void 0,
10840
+ marketId: void 0,
10841
+ exchange: void 0,
10842
+ channelId: void 0,
10843
+ subscriptionType: [],
10844
+ snapshotIntervalSeconds: 0,
10845
+ instrumentType: [],
10846
+ bulkSubscriptionFilter: [],
10847
+ spreadTypeFilter: [],
10848
+ subscriptionDoNotSendInstruments: false,
10849
+ subscriptionDoNotSendSnapshots: false
10850
+ };
10851
+ }
8273
10852
  const SubscriptionRequest_RequestEncode = {
8274
10853
  encode(message, writer = new BinaryWriter()) {
8275
10854
  if (message.symbol !== void 0) {
@@ -8311,6 +10890,113 @@ const SubscriptionRequest_RequestEncode = {
8311
10890
  }
8312
10891
  return writer;
8313
10892
  }
10893
+ }, SubscriptionRequest_RequestDecode = {
10894
+ decode(input, length) {
10895
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
10896
+ const end = length === void 0 ? reader.len : reader.pos + length;
10897
+ const message = createBaseSubscriptionRequest_Request();
10898
+ while (reader.pos < end) {
10899
+ const tag = reader.uint32();
10900
+ switch (tag >>> 3) {
10901
+ case 1: {
10902
+ if (tag !== 10) {
10903
+ break;
10904
+ }
10905
+ message.symbol = reader.string();
10906
+ continue;
10907
+ }
10908
+ case 2: {
10909
+ if (tag !== 16) {
10910
+ break;
10911
+ }
10912
+ message.marketId = Long.fromString(reader.sint64().toString());
10913
+ continue;
10914
+ }
10915
+ case 3: {
10916
+ if (tag !== 26) {
10917
+ break;
10918
+ }
10919
+ message.exchange = reader.string();
10920
+ continue;
10921
+ }
10922
+ case 4: {
10923
+ if (tag !== 32) {
10924
+ break;
10925
+ }
10926
+ message.channelId = reader.sint32();
10927
+ continue;
10928
+ }
10929
+ case 10: {
10930
+ if (tag === 80) {
10931
+ message.subscriptionType.push(reader.int32());
10932
+ continue;
10933
+ }
10934
+ if (tag === 82) {
10935
+ const end2 = reader.uint32() + reader.pos;
10936
+ while (reader.pos < end2) {
10937
+ message.subscriptionType.push(reader.int32());
10938
+ }
10939
+ continue;
10940
+ }
10941
+ break;
10942
+ }
10943
+ case 11: {
10944
+ if (tag !== 88) {
10945
+ break;
10946
+ }
10947
+ message.snapshotIntervalSeconds = reader.sint32();
10948
+ continue;
10949
+ }
10950
+ case 12: {
10951
+ if (tag === 96) {
10952
+ message.instrumentType.push(reader.int32());
10953
+ continue;
10954
+ }
10955
+ if (tag === 98) {
10956
+ const end2 = reader.uint32() + reader.pos;
10957
+ while (reader.pos < end2) {
10958
+ message.instrumentType.push(reader.int32());
10959
+ }
10960
+ continue;
10961
+ }
10962
+ break;
10963
+ }
10964
+ case 13: {
10965
+ if (tag !== 106) {
10966
+ break;
10967
+ }
10968
+ message.bulkSubscriptionFilter.push(BulkSubscriptionFilterDecode.decode(reader, reader.uint32()));
10969
+ continue;
10970
+ }
10971
+ case 14: {
10972
+ if (tag !== 114) {
10973
+ break;
10974
+ }
10975
+ message.spreadTypeFilter.push(reader.string());
10976
+ continue;
10977
+ }
10978
+ case 15: {
10979
+ if (tag !== 120) {
10980
+ break;
10981
+ }
10982
+ message.subscriptionDoNotSendInstruments = reader.bool();
10983
+ continue;
10984
+ }
10985
+ case 16: {
10986
+ if (tag !== 128) {
10987
+ break;
10988
+ }
10989
+ message.subscriptionDoNotSendSnapshots = reader.bool();
10990
+ continue;
10991
+ }
10992
+ }
10993
+ if ((tag & 7) === 4 || tag === 0) {
10994
+ break;
10995
+ }
10996
+ reader.skip(tag & 7);
10997
+ }
10998
+ return message;
10999
+ }
8314
11000
  };
8315
11001
  function createBaseSubscriptionResponse() {
8316
11002
  return {
@@ -8326,7 +11012,41 @@ function createBaseSubscriptionResponse() {
8326
11012
  snapshotIntervalSeconds: 0
8327
11013
  };
8328
11014
  }
8329
- const SubscriptionResponseDecode = {
11015
+ const SubscriptionResponseEncode = {
11016
+ encode(message, writer = new BinaryWriter()) {
11017
+ if (!message.correlationId.equals(Long.ZERO)) {
11018
+ writer.uint32(8).sint64(message.correlationId.toString());
11019
+ }
11020
+ if (message.status !== void 0) {
11021
+ StatusEncode.encode(message.status, writer.uint32(18).fork()).join();
11022
+ }
11023
+ if (message.symbol !== "") {
11024
+ writer.uint32(26).string(message.symbol);
11025
+ }
11026
+ if (!message.marketId.equals(Long.ZERO)) {
11027
+ writer.uint32(32).sint64(message.marketId.toString());
11028
+ }
11029
+ if (message.exchange !== "") {
11030
+ writer.uint32(42).string(message.exchange);
11031
+ }
11032
+ if (message.channelId !== 0) {
11033
+ writer.uint32(48).sint32(message.channelId);
11034
+ }
11035
+ if (message.numberOfDefinitions !== 0) {
11036
+ writer.uint32(56).sint32(message.numberOfDefinitions);
11037
+ }
11038
+ if (message.subscriptionType !== 0) {
11039
+ writer.uint32(64).int32(message.subscriptionType);
11040
+ }
11041
+ if (message.unsubscribe !== false) {
11042
+ writer.uint32(72).bool(message.unsubscribe);
11043
+ }
11044
+ if (message.snapshotIntervalSeconds !== 0) {
11045
+ writer.uint32(80).sint32(message.snapshotIntervalSeconds);
11046
+ }
11047
+ return writer;
11048
+ }
11049
+ }, SubscriptionResponseDecode = {
8330
11050
  decode(input, length) {
8331
11051
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
8332
11052
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -8413,6 +11133,9 @@ const SubscriptionResponseDecode = {
8413
11133
  return message;
8414
11134
  }
8415
11135
  };
11136
+ function createBaseListSubscriptionsRequest() {
11137
+ return { correlationId: Long.ZERO, token: "", username: "" };
11138
+ }
8416
11139
  const ListSubscriptionsRequestEncode = {
8417
11140
  encode(message, writer = new BinaryWriter()) {
8418
11141
  if (!message.correlationId.equals(Long.ZERO)) {
@@ -8426,11 +11149,64 @@ const ListSubscriptionsRequestEncode = {
8426
11149
  }
8427
11150
  return writer;
8428
11151
  }
11152
+ }, ListSubscriptionsRequestDecode = {
11153
+ decode(input, length) {
11154
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
11155
+ const end = length === void 0 ? reader.len : reader.pos + length;
11156
+ const message = createBaseListSubscriptionsRequest();
11157
+ while (reader.pos < end) {
11158
+ const tag = reader.uint32();
11159
+ switch (tag >>> 3) {
11160
+ case 1: {
11161
+ if (tag !== 8) {
11162
+ break;
11163
+ }
11164
+ message.correlationId = Long.fromString(reader.sint64().toString());
11165
+ continue;
11166
+ }
11167
+ case 2: {
11168
+ if (tag !== 18) {
11169
+ break;
11170
+ }
11171
+ message.token = reader.string();
11172
+ continue;
11173
+ }
11174
+ case 3: {
11175
+ if (tag !== 26) {
11176
+ break;
11177
+ }
11178
+ message.username = reader.string();
11179
+ continue;
11180
+ }
11181
+ }
11182
+ if ((tag & 7) === 4 || tag === 0) {
11183
+ break;
11184
+ }
11185
+ reader.skip(tag & 7);
11186
+ }
11187
+ return message;
11188
+ }
8429
11189
  };
8430
11190
  function createBaseListSubscriptionsResponse() {
8431
11191
  return { correlationId: Long.ZERO, status: void 0, username: "", sessions: [] };
8432
11192
  }
8433
- const ListSubscriptionsResponseDecode = {
11193
+ const ListSubscriptionsResponseEncode = {
11194
+ encode(message, writer = new BinaryWriter()) {
11195
+ if (!message.correlationId.equals(Long.ZERO)) {
11196
+ writer.uint32(8).sint64(message.correlationId.toString());
11197
+ }
11198
+ if (message.status !== void 0) {
11199
+ StatusEncode.encode(message.status, writer.uint32(18).fork()).join();
11200
+ }
11201
+ if (message.username !== "") {
11202
+ writer.uint32(26).string(message.username);
11203
+ }
11204
+ for (const v of message.sessions) {
11205
+ ListSubscriptionsResponse_SessionEncode.encode(v, writer.uint32(82).fork()).join();
11206
+ }
11207
+ return writer;
11208
+ }
11209
+ }, ListSubscriptionsResponseDecode = {
8434
11210
  decode(input, length) {
8435
11211
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
8436
11212
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -8478,7 +11254,26 @@ const ListSubscriptionsResponseDecode = {
8478
11254
  function createBaseListSubscriptionsResponse_Session() {
8479
11255
  return { loginTime: Long.ZERO, token: "", clientVersion: "", marketSubscriptions: [], exchangeSubscriptions: [] };
8480
11256
  }
8481
- const ListSubscriptionsResponse_SessionDecode = {
11257
+ const ListSubscriptionsResponse_SessionEncode = {
11258
+ encode(message, writer = new BinaryWriter()) {
11259
+ if (!message.loginTime.equals(Long.ZERO)) {
11260
+ writer.uint32(8).sint64(message.loginTime.toString());
11261
+ }
11262
+ if (message.token !== "") {
11263
+ writer.uint32(18).string(message.token);
11264
+ }
11265
+ if (message.clientVersion !== "") {
11266
+ writer.uint32(26).string(message.clientVersion);
11267
+ }
11268
+ for (const v of message.marketSubscriptions) {
11269
+ ListSubscriptionsResponse_SubscriptionEncode.encode(v, writer.uint32(82).fork()).join();
11270
+ }
11271
+ for (const v of message.exchangeSubscriptions) {
11272
+ ListSubscriptionsResponse_SubscriptionEncode.encode(v, writer.uint32(90).fork()).join();
11273
+ }
11274
+ return writer;
11275
+ }
11276
+ }, ListSubscriptionsResponse_SessionDecode = {
8482
11277
  decode(input, length) {
8483
11278
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
8484
11279
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -8533,7 +11328,29 @@ const ListSubscriptionsResponse_SessionDecode = {
8533
11328
  function createBaseListSubscriptionsResponse_Subscription() {
8534
11329
  return { subscriptionId: "", symbolId: "", marketId: Long.ZERO, symbolCounts: [], exchange: "", root: "" };
8535
11330
  }
8536
- const ListSubscriptionsResponse_SubscriptionDecode = {
11331
+ const ListSubscriptionsResponse_SubscriptionEncode = {
11332
+ encode(message, writer = new BinaryWriter()) {
11333
+ if (message.subscriptionId !== "") {
11334
+ writer.uint32(10).string(message.subscriptionId);
11335
+ }
11336
+ if (message.symbolId !== "") {
11337
+ writer.uint32(18).string(message.symbolId);
11338
+ }
11339
+ if (!message.marketId.equals(Long.ZERO)) {
11340
+ writer.uint32(24).sint64(message.marketId.toString());
11341
+ }
11342
+ for (const v of message.symbolCounts) {
11343
+ ListSubscriptionsResponse_SymbolCountEncode.encode(v, writer.uint32(34).fork()).join();
11344
+ }
11345
+ if (message.exchange !== "") {
11346
+ writer.uint32(82).string(message.exchange);
11347
+ }
11348
+ if (message.root !== "") {
11349
+ writer.uint32(90).string(message.root);
11350
+ }
11351
+ return writer;
11352
+ }
11353
+ }, ListSubscriptionsResponse_SubscriptionDecode = {
8537
11354
  decode(input, length) {
8538
11355
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
8539
11356
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -8595,7 +11412,17 @@ const ListSubscriptionsResponse_SubscriptionDecode = {
8595
11412
  function createBaseListSubscriptionsResponse_SymbolCount() {
8596
11413
  return { symbol: "", count: 0 };
8597
11414
  }
8598
- const ListSubscriptionsResponse_SymbolCountDecode = {
11415
+ const ListSubscriptionsResponse_SymbolCountEncode = {
11416
+ encode(message, writer = new BinaryWriter()) {
11417
+ if (message.symbol !== "") {
11418
+ writer.uint32(10).string(message.symbol);
11419
+ }
11420
+ if (message.count !== 0) {
11421
+ writer.uint32(16).sint32(message.count);
11422
+ }
11423
+ return writer;
11424
+ }
11425
+ }, ListSubscriptionsResponse_SymbolCountDecode = {
8599
11426
  decode(input, length) {
8600
11427
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
8601
11428
  const end = length === void 0 ? reader.len : reader.pos + length;
@@ -9005,7 +11832,7 @@ class OpenFeedConnection {
9005
11832
  whenDisconnected = () => this.whenDisconnectedSource.whenCompleted;
9006
11833
  dispose = () => this.disconnect(new ConnectionDisposedError("Disposed"));
9007
11834
  }
9008
- const version = "1.6.5";
11835
+ const version = "1.6.6";
9009
11836
  const getClientVersion = async (clientId) => {
9010
11837
  let platformDescription;
9011
11838
  if (typeof window !== "undefined") {
@@ -9368,6 +12195,10 @@ export {
9368
12195
  OpenCloseSettlementFlag,
9369
12196
  OpenFeedClient,
9370
12197
  OpenFeedListeners,
12198
+ OpenfeedGatewayMessageDecode,
12199
+ OpenfeedGatewayMessageEncode,
12200
+ OpenfeedGatewayRequestDecode,
12201
+ OpenfeedGatewayRequestEncode,
9371
12202
  RegulationSHOShortSalePriceTest,
9372
12203
  Result,
9373
12204
  Service,