@marleena/trb-proto 1.0.32 → 1.0.34

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.
@@ -309,6 +309,9 @@ export class ListCandlesRequest extends jspb.Message {
309
309
  getLimit(): number;
310
310
  setLimit(value: number): ListCandlesRequest;
311
311
 
312
+ getNewestFirst(): boolean;
313
+ setNewestFirst(value: boolean): ListCandlesRequest;
314
+
312
315
  serializeBinary(): Uint8Array;
313
316
  toObject(includeInstance?: boolean): ListCandlesRequest.AsObject;
314
317
  static toObject(includeInstance: boolean, msg: ListCandlesRequest): ListCandlesRequest.AsObject;
@@ -324,6 +327,7 @@ export namespace ListCandlesRequest {
324
327
  from?: google_protobuf_timestamp_pb.Timestamp.AsObject,
325
328
  to?: google_protobuf_timestamp_pb.Timestamp.AsObject,
326
329
  limit: number,
330
+ newestFirst: boolean,
327
331
  }
328
332
  }
329
333
 
@@ -2539,7 +2539,8 @@ uid: jspb.Message.getFieldWithDefault(msg, 1, ""),
2539
2539
  interval: jspb.Message.getFieldWithDefault(msg, 2, 0),
2540
2540
  from: (f = msg.getFrom()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
2541
2541
  to: (f = msg.getTo()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
2542
- limit: jspb.Message.getFieldWithDefault(msg, 5, 0)
2542
+ limit: jspb.Message.getFieldWithDefault(msg, 5, 0),
2543
+ newestFirst: jspb.Message.getBooleanFieldWithDefault(msg, 6, false)
2543
2544
  };
2544
2545
 
2545
2546
  if (includeInstance) {
@@ -2598,6 +2599,10 @@ proto.trb.clickhouse.v1.ListCandlesRequest.deserializeBinaryFromReader = functio
2598
2599
  var value = /** @type {number} */ (reader.readInt32());
2599
2600
  msg.setLimit(value);
2600
2601
  break;
2602
+ case 6:
2603
+ var value = /** @type {boolean} */ (reader.readBool());
2604
+ msg.setNewestFirst(value);
2605
+ break;
2601
2606
  default:
2602
2607
  reader.skipField();
2603
2608
  break;
@@ -2664,6 +2669,13 @@ proto.trb.clickhouse.v1.ListCandlesRequest.serializeBinaryToWriter = function(me
2664
2669
  f
2665
2670
  );
2666
2671
  }
2672
+ f = message.getNewestFirst();
2673
+ if (f) {
2674
+ writer.writeBool(
2675
+ 6,
2676
+ f
2677
+ );
2678
+ }
2667
2679
  };
2668
2680
 
2669
2681
 
@@ -2795,6 +2807,24 @@ proto.trb.clickhouse.v1.ListCandlesRequest.prototype.setLimit = function(value)
2795
2807
  };
2796
2808
 
2797
2809
 
2810
+ /**
2811
+ * optional bool newest_first = 6;
2812
+ * @return {boolean}
2813
+ */
2814
+ proto.trb.clickhouse.v1.ListCandlesRequest.prototype.getNewestFirst = function() {
2815
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false));
2816
+ };
2817
+
2818
+
2819
+ /**
2820
+ * @param {boolean} value
2821
+ * @return {!proto.trb.clickhouse.v1.ListCandlesRequest} returns this
2822
+ */
2823
+ proto.trb.clickhouse.v1.ListCandlesRequest.prototype.setNewestFirst = function(value) {
2824
+ return jspb.Message.setProto3BooleanField(this, 6, value);
2825
+ };
2826
+
2827
+
2798
2828
 
2799
2829
 
2800
2830
 
@@ -0,0 +1,129 @@
1
+ /**
2
+ * @fileoverview gRPC-Web generated client stub for trb.indicators.v1
3
+ * @enhanceable
4
+ * @public
5
+ */
6
+
7
+ // Code generated by protoc-gen-grpc-web. DO NOT EDIT.
8
+ // versions:
9
+ // protoc-gen-grpc-web v1.5.0
10
+ // protoc v7.34.1
11
+ // source: indicators/indicators.proto
12
+
13
+
14
+ /* eslint-disable */
15
+ // @ts-nocheck
16
+
17
+
18
+ import * as grpcWeb from 'grpc-web';
19
+
20
+ import * as indicators_indicators_pb from '../indicators/indicators_pb'; // proto import: "indicators/indicators.proto"
21
+
22
+
23
+ export class IndicatorsClient {
24
+ client_: grpcWeb.AbstractClientBase;
25
+ hostname_: string;
26
+ credentials_: null | { [index: string]: string; };
27
+ options_: null | { [index: string]: any; };
28
+
29
+ constructor (hostname: string,
30
+ credentials?: null | { [index: string]: string; },
31
+ options?: null | { [index: string]: any; }) {
32
+ if (!options) options = {};
33
+ if (!credentials) credentials = {};
34
+ options['format'] = 'binary';
35
+
36
+ this.client_ = new grpcWeb.GrpcWebClientBase(options);
37
+ this.hostname_ = hostname.replace(/\/+$/, '');
38
+ this.credentials_ = credentials;
39
+ this.options_ = options;
40
+ }
41
+
42
+ methodDescriptorCompute = new grpcWeb.MethodDescriptor(
43
+ '/trb.indicators.v1.Indicators/Compute',
44
+ grpcWeb.MethodType.UNARY,
45
+ indicators_indicators_pb.ComputeRequest,
46
+ indicators_indicators_pb.ComputeResponse,
47
+ (request: indicators_indicators_pb.ComputeRequest) => {
48
+ return request.serializeBinary();
49
+ },
50
+ indicators_indicators_pb.ComputeResponse.deserializeBinary
51
+ );
52
+
53
+ compute(
54
+ request: indicators_indicators_pb.ComputeRequest,
55
+ metadata?: grpcWeb.Metadata | null): Promise<indicators_indicators_pb.ComputeResponse>;
56
+
57
+ compute(
58
+ request: indicators_indicators_pb.ComputeRequest,
59
+ metadata: grpcWeb.Metadata | null,
60
+ callback: (err: grpcWeb.RpcError,
61
+ response: indicators_indicators_pb.ComputeResponse) => void): grpcWeb.ClientReadableStream<indicators_indicators_pb.ComputeResponse>;
62
+
63
+ compute(
64
+ request: indicators_indicators_pb.ComputeRequest,
65
+ metadata?: grpcWeb.Metadata | null,
66
+ callback?: (err: grpcWeb.RpcError,
67
+ response: indicators_indicators_pb.ComputeResponse) => void) {
68
+ if (callback !== undefined) {
69
+ return this.client_.rpcCall(
70
+ this.hostname_ +
71
+ '/trb.indicators.v1.Indicators/Compute',
72
+ request,
73
+ metadata || {},
74
+ this.methodDescriptorCompute,
75
+ callback);
76
+ }
77
+ return this.client_.unaryCall(
78
+ this.hostname_ +
79
+ '/trb.indicators.v1.Indicators/Compute',
80
+ request,
81
+ metadata || {},
82
+ this.methodDescriptorCompute);
83
+ }
84
+
85
+ methodDescriptorListSupported = new grpcWeb.MethodDescriptor(
86
+ '/trb.indicators.v1.Indicators/ListSupported',
87
+ grpcWeb.MethodType.UNARY,
88
+ indicators_indicators_pb.ListSupportedRequest,
89
+ indicators_indicators_pb.ListSupportedResponse,
90
+ (request: indicators_indicators_pb.ListSupportedRequest) => {
91
+ return request.serializeBinary();
92
+ },
93
+ indicators_indicators_pb.ListSupportedResponse.deserializeBinary
94
+ );
95
+
96
+ listSupported(
97
+ request: indicators_indicators_pb.ListSupportedRequest,
98
+ metadata?: grpcWeb.Metadata | null): Promise<indicators_indicators_pb.ListSupportedResponse>;
99
+
100
+ listSupported(
101
+ request: indicators_indicators_pb.ListSupportedRequest,
102
+ metadata: grpcWeb.Metadata | null,
103
+ callback: (err: grpcWeb.RpcError,
104
+ response: indicators_indicators_pb.ListSupportedResponse) => void): grpcWeb.ClientReadableStream<indicators_indicators_pb.ListSupportedResponse>;
105
+
106
+ listSupported(
107
+ request: indicators_indicators_pb.ListSupportedRequest,
108
+ metadata?: grpcWeb.Metadata | null,
109
+ callback?: (err: grpcWeb.RpcError,
110
+ response: indicators_indicators_pb.ListSupportedResponse) => void) {
111
+ if (callback !== undefined) {
112
+ return this.client_.rpcCall(
113
+ this.hostname_ +
114
+ '/trb.indicators.v1.Indicators/ListSupported',
115
+ request,
116
+ metadata || {},
117
+ this.methodDescriptorListSupported,
118
+ callback);
119
+ }
120
+ return this.client_.unaryCall(
121
+ this.hostname_ +
122
+ '/trb.indicators.v1.Indicators/ListSupported',
123
+ request,
124
+ metadata || {},
125
+ this.methodDescriptorListSupported);
126
+ }
127
+
128
+ }
129
+
@@ -0,0 +1,198 @@
1
+ import * as jspb from 'google-protobuf'
2
+
3
+ import * as google_api_annotations_pb from '../google/api/annotations_pb'; // proto import: "google/api/annotations.proto"
4
+ import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb'; // proto import: "google/protobuf/timestamp.proto"
5
+
6
+
7
+ export class Candle extends jspb.Message {
8
+ getTime(): google_protobuf_timestamp_pb.Timestamp | undefined;
9
+ setTime(value?: google_protobuf_timestamp_pb.Timestamp): Candle;
10
+ hasTime(): boolean;
11
+ clearTime(): Candle;
12
+
13
+ getOpen(): number;
14
+ setOpen(value: number): Candle;
15
+
16
+ getHigh(): number;
17
+ setHigh(value: number): Candle;
18
+
19
+ getLow(): number;
20
+ setLow(value: number): Candle;
21
+
22
+ getClose(): number;
23
+ setClose(value: number): Candle;
24
+
25
+ getVolume(): number;
26
+ setVolume(value: number): Candle;
27
+
28
+ serializeBinary(): Uint8Array;
29
+ toObject(includeInstance?: boolean): Candle.AsObject;
30
+ static toObject(includeInstance: boolean, msg: Candle): Candle.AsObject;
31
+ static serializeBinaryToWriter(message: Candle, writer: jspb.BinaryWriter): void;
32
+ static deserializeBinary(bytes: Uint8Array): Candle;
33
+ static deserializeBinaryFromReader(message: Candle, reader: jspb.BinaryReader): Candle;
34
+ }
35
+
36
+ export namespace Candle {
37
+ export type AsObject = {
38
+ time?: google_protobuf_timestamp_pb.Timestamp.AsObject,
39
+ open: number,
40
+ high: number,
41
+ low: number,
42
+ close: number,
43
+ volume: number,
44
+ }
45
+ }
46
+
47
+ export class ComputeRequest extends jspb.Message {
48
+ getType(): IndicatorType;
49
+ setType(value: IndicatorType): ComputeRequest;
50
+
51
+ getCandlesList(): Array<Candle>;
52
+ setCandlesList(value: Array<Candle>): ComputeRequest;
53
+ clearCandlesList(): ComputeRequest;
54
+ addCandles(value?: Candle, index?: number): Candle;
55
+
56
+ getParamsMap(): jspb.Map<string, number>;
57
+ clearParamsMap(): ComputeRequest;
58
+
59
+ serializeBinary(): Uint8Array;
60
+ toObject(includeInstance?: boolean): ComputeRequest.AsObject;
61
+ static toObject(includeInstance: boolean, msg: ComputeRequest): ComputeRequest.AsObject;
62
+ static serializeBinaryToWriter(message: ComputeRequest, writer: jspb.BinaryWriter): void;
63
+ static deserializeBinary(bytes: Uint8Array): ComputeRequest;
64
+ static deserializeBinaryFromReader(message: ComputeRequest, reader: jspb.BinaryReader): ComputeRequest;
65
+ }
66
+
67
+ export namespace ComputeRequest {
68
+ export type AsObject = {
69
+ type: IndicatorType,
70
+ candlesList: Array<Candle.AsObject>,
71
+ paramsMap: Array<[string, number]>,
72
+ }
73
+ }
74
+
75
+ export class IndicatorPoint extends jspb.Message {
76
+ getTime(): google_protobuf_timestamp_pb.Timestamp | undefined;
77
+ setTime(value?: google_protobuf_timestamp_pb.Timestamp): IndicatorPoint;
78
+ hasTime(): boolean;
79
+ clearTime(): IndicatorPoint;
80
+
81
+ getValuesMap(): jspb.Map<string, number>;
82
+ clearValuesMap(): IndicatorPoint;
83
+
84
+ serializeBinary(): Uint8Array;
85
+ toObject(includeInstance?: boolean): IndicatorPoint.AsObject;
86
+ static toObject(includeInstance: boolean, msg: IndicatorPoint): IndicatorPoint.AsObject;
87
+ static serializeBinaryToWriter(message: IndicatorPoint, writer: jspb.BinaryWriter): void;
88
+ static deserializeBinary(bytes: Uint8Array): IndicatorPoint;
89
+ static deserializeBinaryFromReader(message: IndicatorPoint, reader: jspb.BinaryReader): IndicatorPoint;
90
+ }
91
+
92
+ export namespace IndicatorPoint {
93
+ export type AsObject = {
94
+ time?: google_protobuf_timestamp_pb.Timestamp.AsObject,
95
+ valuesMap: Array<[string, number]>,
96
+ }
97
+ }
98
+
99
+ export class ComputeResponse extends jspb.Message {
100
+ getType(): IndicatorType;
101
+ setType(value: IndicatorType): ComputeResponse;
102
+
103
+ getParamsMap(): jspb.Map<string, number>;
104
+ clearParamsMap(): ComputeResponse;
105
+
106
+ getPointsList(): Array<IndicatorPoint>;
107
+ setPointsList(value: Array<IndicatorPoint>): ComputeResponse;
108
+ clearPointsList(): ComputeResponse;
109
+ addPoints(value?: IndicatorPoint, index?: number): IndicatorPoint;
110
+
111
+ serializeBinary(): Uint8Array;
112
+ toObject(includeInstance?: boolean): ComputeResponse.AsObject;
113
+ static toObject(includeInstance: boolean, msg: ComputeResponse): ComputeResponse.AsObject;
114
+ static serializeBinaryToWriter(message: ComputeResponse, writer: jspb.BinaryWriter): void;
115
+ static deserializeBinary(bytes: Uint8Array): ComputeResponse;
116
+ static deserializeBinaryFromReader(message: ComputeResponse, reader: jspb.BinaryReader): ComputeResponse;
117
+ }
118
+
119
+ export namespace ComputeResponse {
120
+ export type AsObject = {
121
+ type: IndicatorType,
122
+ paramsMap: Array<[string, number]>,
123
+ pointsList: Array<IndicatorPoint.AsObject>,
124
+ }
125
+ }
126
+
127
+ export class IndicatorInfo extends jspb.Message {
128
+ getType(): IndicatorType;
129
+ setType(value: IndicatorType): IndicatorInfo;
130
+
131
+ getName(): string;
132
+ setName(value: string): IndicatorInfo;
133
+
134
+ getMinBars(): number;
135
+ setMinBars(value: number): IndicatorInfo;
136
+
137
+ getDefaultParamsMap(): jspb.Map<string, number>;
138
+ clearDefaultParamsMap(): IndicatorInfo;
139
+
140
+ serializeBinary(): Uint8Array;
141
+ toObject(includeInstance?: boolean): IndicatorInfo.AsObject;
142
+ static toObject(includeInstance: boolean, msg: IndicatorInfo): IndicatorInfo.AsObject;
143
+ static serializeBinaryToWriter(message: IndicatorInfo, writer: jspb.BinaryWriter): void;
144
+ static deserializeBinary(bytes: Uint8Array): IndicatorInfo;
145
+ static deserializeBinaryFromReader(message: IndicatorInfo, reader: jspb.BinaryReader): IndicatorInfo;
146
+ }
147
+
148
+ export namespace IndicatorInfo {
149
+ export type AsObject = {
150
+ type: IndicatorType,
151
+ name: string,
152
+ minBars: number,
153
+ defaultParamsMap: Array<[string, number]>,
154
+ }
155
+ }
156
+
157
+ export class ListSupportedRequest extends jspb.Message {
158
+ serializeBinary(): Uint8Array;
159
+ toObject(includeInstance?: boolean): ListSupportedRequest.AsObject;
160
+ static toObject(includeInstance: boolean, msg: ListSupportedRequest): ListSupportedRequest.AsObject;
161
+ static serializeBinaryToWriter(message: ListSupportedRequest, writer: jspb.BinaryWriter): void;
162
+ static deserializeBinary(bytes: Uint8Array): ListSupportedRequest;
163
+ static deserializeBinaryFromReader(message: ListSupportedRequest, reader: jspb.BinaryReader): ListSupportedRequest;
164
+ }
165
+
166
+ export namespace ListSupportedRequest {
167
+ export type AsObject = {
168
+ }
169
+ }
170
+
171
+ export class ListSupportedResponse extends jspb.Message {
172
+ getIndicatorsList(): Array<IndicatorInfo>;
173
+ setIndicatorsList(value: Array<IndicatorInfo>): ListSupportedResponse;
174
+ clearIndicatorsList(): ListSupportedResponse;
175
+ addIndicators(value?: IndicatorInfo, index?: number): IndicatorInfo;
176
+
177
+ serializeBinary(): Uint8Array;
178
+ toObject(includeInstance?: boolean): ListSupportedResponse.AsObject;
179
+ static toObject(includeInstance: boolean, msg: ListSupportedResponse): ListSupportedResponse.AsObject;
180
+ static serializeBinaryToWriter(message: ListSupportedResponse, writer: jspb.BinaryWriter): void;
181
+ static deserializeBinary(bytes: Uint8Array): ListSupportedResponse;
182
+ static deserializeBinaryFromReader(message: ListSupportedResponse, reader: jspb.BinaryReader): ListSupportedResponse;
183
+ }
184
+
185
+ export namespace ListSupportedResponse {
186
+ export type AsObject = {
187
+ indicatorsList: Array<IndicatorInfo.AsObject>,
188
+ }
189
+ }
190
+
191
+ export enum IndicatorType {
192
+ INDICATOR_TYPE_UNSPECIFIED = 0,
193
+ INDICATOR_TYPE_RSI = 1,
194
+ INDICATOR_TYPE_SMA = 2,
195
+ INDICATOR_TYPE_EMA = 3,
196
+ INDICATOR_TYPE_MACD = 4,
197
+ INDICATOR_TYPE_BB = 5,
198
+ }