-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathengine.proto
More file actions
40 lines (33 loc) · 872 Bytes
/
engine.proto
File metadata and controls
40 lines (33 loc) · 872 Bytes
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
syntax = "proto3";
service Engine {
rpc Process(Order) returns (OutputOrders);
rpc ProcessMarket(Order) returns (OutputOrders);
rpc Cancel(Order) returns (Order);
rpc FetchBook(BookInput) returns (BookOutput);
}
message Order {
Side Type = 1 [json_name = "type"];
string ID = 2 [json_name = "id"];
string Amount = 3 [json_name = "amount"];
string Price = 4 [json_name = "price"];
string Pair = 5 [json_name = "pair"];
}
message OutputOrders {
string OrdersProcessed = 1 [json_name = "orders_processed"];
string PartialOrder = 2 [json_name = "partial_order"];
}
enum Side {
buy = 0;
sell = 1;
}
message BookInput {
string pair = 1;
int64 limit = 2;
}
message BookArray {
repeated string price_amount = 1;
}
message BookOutput {
repeated BookArray Buys = 1;
repeated BookArray Sells = 2;
}