@loafmarkets/shared-types 1.0.34 → 1.0.37
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/package.json +1 -1
- package/proto/trading.proto +45 -78
package/package.json
CHANGED
package/proto/trading.proto
CHANGED
|
@@ -8,18 +8,20 @@ message Order {
|
|
|
8
8
|
uint32 user_id = 2;
|
|
9
9
|
uint32 property_id = 3;
|
|
10
10
|
uint64 price = 4;
|
|
11
|
-
uint32
|
|
12
|
-
uint32
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
string
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
int64
|
|
11
|
+
uint32 price_multiplier = 5; // 1, 100, 1000
|
|
12
|
+
uint32 quantity = 6;
|
|
13
|
+
uint32 quantitiy_multiplier = 7; // 1, 100, 1000
|
|
14
|
+
uint32 quantity_remaining = 8;
|
|
15
|
+
OrderSide side = 9;
|
|
16
|
+
OrderType type = 10;
|
|
17
|
+
TimeInForce time_in_force = 11;
|
|
18
|
+
int64 deadline = 12;
|
|
19
|
+
string signature = 13;
|
|
20
|
+
string wallet_address = 14;
|
|
21
|
+
string nonce = 15;
|
|
22
|
+
int64 created_at = 16;
|
|
23
|
+
int64 maker_fee = 17;
|
|
24
|
+
int64 taker_fee = 18;
|
|
23
25
|
|
|
24
26
|
}
|
|
25
27
|
|
|
@@ -40,15 +42,6 @@ enum TimeInForce {
|
|
|
40
42
|
GTD = 3;
|
|
41
43
|
}
|
|
42
44
|
|
|
43
|
-
// enum OrderStatus {
|
|
44
|
-
// PENDING = 0;
|
|
45
|
-
// PARTIALLY_FILLED = 1;
|
|
46
|
-
// FILLED = 2;
|
|
47
|
-
// CANCELLED = 3;
|
|
48
|
-
// REJECTED = 4;
|
|
49
|
-
// }
|
|
50
|
-
|
|
51
|
-
|
|
52
45
|
// Trade execution
|
|
53
46
|
message TradeExecution {
|
|
54
47
|
uint64 trade_id = 1;
|
|
@@ -56,28 +49,30 @@ message TradeExecution {
|
|
|
56
49
|
uint64 sell_order_id = 3;
|
|
57
50
|
uint32 property_id = 4;
|
|
58
51
|
string property_token_address = 5;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
string
|
|
71
|
-
string
|
|
72
|
-
string
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
52
|
+
uint64 price = 6;
|
|
53
|
+
uint32 price_multiplier = 7; // 1, 100, 1000
|
|
54
|
+
uint64 quantity = 8;
|
|
55
|
+
uint32 quantity_multiplier = 9; // 1, 100, 1000
|
|
56
|
+
double buyer_fee = 10;
|
|
57
|
+
double seller_fee = 11;
|
|
58
|
+
string buyer_wallet = 12;
|
|
59
|
+
string seller_wallet = 13;
|
|
60
|
+
OrderSide side = 14;
|
|
61
|
+
int64 timestamp = 15;
|
|
62
|
+
int64 deadline = 16;
|
|
63
|
+
string buyer_nonce = 17;
|
|
64
|
+
string seller_nonce = 18;
|
|
65
|
+
string buyer_signature = 19;
|
|
66
|
+
string seller_signature = 20;
|
|
67
|
+
string cpp_signature = 21;
|
|
68
|
+
uint64 buy_price = 22;
|
|
69
|
+
uint32 buy_quantity = 23;
|
|
70
|
+
uint32 buy_quantity_remaining = 24;
|
|
71
|
+
int64 buy_deadline = 25;
|
|
72
|
+
uint64 sell_price = 26;
|
|
73
|
+
uint32 sell_quantity = 27;
|
|
74
|
+
uint32 sell_quantity_remaining = 28;
|
|
75
|
+
int64 sell_deadline = 29;
|
|
81
76
|
}
|
|
82
77
|
|
|
83
78
|
// Order book
|
|
@@ -89,8 +84,10 @@ message PriceLevel {
|
|
|
89
84
|
|
|
90
85
|
message OrderBookSnapshot {
|
|
91
86
|
uint32 property_id = 1;
|
|
92
|
-
|
|
93
|
-
|
|
87
|
+
uint32 price_multiplier = 2;
|
|
88
|
+
uint32 quantity_multiplier = 3;
|
|
89
|
+
repeated PriceLevel bids = 4;
|
|
90
|
+
repeated PriceLevel asks = 5;
|
|
94
91
|
}
|
|
95
92
|
|
|
96
93
|
// Quote book
|
|
@@ -133,6 +130,8 @@ message SubmitOrderRequest {
|
|
|
133
130
|
string nonce = 12;
|
|
134
131
|
int64 maker_fee = 13;
|
|
135
132
|
int64 taker_fee = 14;
|
|
133
|
+
int32 price_multiplier = 15;
|
|
134
|
+
int32 quantity_multiplier = 16;
|
|
136
135
|
}
|
|
137
136
|
|
|
138
137
|
message SubmitOrderResponse {
|
|
@@ -163,36 +162,4 @@ message OrderCancelled {
|
|
|
163
162
|
int64 timestamp = 3;
|
|
164
163
|
}
|
|
165
164
|
|
|
166
|
-
//
|
|
167
|
-
// Service 2: TradingService (for Market Maker)
|
|
168
|
-
// --------------------------------------------------------------
|
|
169
|
-
|
|
170
|
-
// service TradingService {
|
|
171
|
-
// rpc StreamTradingData(stream MarketMakerMessage) returns (stream EngineMessage);
|
|
172
|
-
// }
|
|
173
|
-
|
|
174
|
-
// message MarketMakerMessage {
|
|
175
|
-
// oneof message {
|
|
176
|
-
// MarketMakerRegistration registration = 1;
|
|
177
|
-
// Quote quote = 2;
|
|
178
|
-
// TradeAck trade_ack = 3;
|
|
179
|
-
// }
|
|
180
|
-
// }
|
|
181
|
-
|
|
182
|
-
// message EngineMessage {
|
|
183
|
-
// oneof message {
|
|
184
|
-
// Order order = 1;
|
|
185
|
-
// TradeExecution trade_execution = 2;
|
|
186
|
-
// }
|
|
187
|
-
// }
|
|
188
|
-
|
|
189
|
-
// message MarketMakerRegistration {
|
|
190
|
-
// string market_maker_id = 1;
|
|
191
|
-
// repeated string property_ids = 2;
|
|
192
|
-
// }
|
|
193
|
-
|
|
194
|
-
// message TradeAck {
|
|
195
|
-
// string trade_id = 1;
|
|
196
|
-
// bool acknowledged = 2;
|
|
197
|
-
// string error_message = 3;
|
|
198
|
-
// }
|
|
165
|
+
//
|