@marleena/trb-proto 1.0.33 → 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.
|
@@ -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
|
+
}
|