-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathitem-prices.proto
More file actions
84 lines (68 loc) · 1.77 KB
/
item-prices.proto
File metadata and controls
84 lines (68 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
syntax = "proto3";
package item_prices;
import "google/api/annotations.proto";
import "google/protobuf/timestamp.proto";
import "protoc-gen-openapiv2/options/annotations.proto";
option go_package = "./item-prices";
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
info: {
version: "1.0";
};
schemes: [HTTP, HTTPS];
};
message GetQuantilePriceRequest {
string hashName = 1;
float quantile = 2;
int64 periodSeconds = 3;
}
message GetQuantilePriceResponse {
float price = 1;
}
message GetTradeCountRequest {
string hashName = 1;
int64 periodSeconds = 2;
}
message GetTradeCountResponse {
int64 tradeCount = 1;
}
message GetAutoBuyPriceRequest {
string hashName = 1;
}
message GetAutoBuyPriceResponse {
float price = 1;
}
message Price {
string hashName = 1;
float price = 2;
bool autoBuy = 3;
}
message GetAllPricesRequest {
int64 periodSeconds = 1;
int64 countThreshold = 2;
float quantile = 3;
}
message GetAllPricesResponse {
repeated Price prices = 1;
}
service PriceService {
rpc GetQuantilePrice(GetQuantilePriceRequest) returns (GetQuantilePriceResponse) {
option (google.api.http) = {
get: "/api/get_quantile_price/{hashName}/{periodSeconds}/{quantile}"
};
}
rpc GetTradeCount(GetTradeCountRequest) returns (GetTradeCountResponse) {
option (google.api.http) = {
get: "/api/get_trade_count/{hashName}/{periodSeconds}"
};
}
rpc GetAutoBuyPrice(GetAutoBuyPriceRequest) returns (GetAutoBuyPriceResponse) {
option (google.api.http) = {
get: "/api/get_auto_buy_price/{hashName}"
};
}
rpc GetAllPrices(GetAllPricesRequest) returns (GetAllPricesResponse) {
option (google.api.http) = {
get: "/api/get_all_prices/{periodSeconds}/{countThreshold}/{quantile}"
};
}
}