This repository was archived by the owner on Oct 30, 2023. It is now read-only.
forked from joaopsilva/binance-java-api
-
Notifications
You must be signed in to change notification settings - Fork 599
Expand file tree
/
Copy pathOrder.java
More file actions
executable file
·276 lines (219 loc) · 5.24 KB
/
Order.java
File metadata and controls
executable file
·276 lines (219 loc) · 5.24 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
package com.binance.api.client.domain.account;
import com.binance.api.client.constant.BinanceApiConstants;
import com.binance.api.client.domain.OrderSide;
import com.binance.api.client.domain.OrderStatus;
import com.binance.api.client.domain.OrderType;
import com.binance.api.client.domain.TimeInForce;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
/**
* Trade order information.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class Order {
/**
* Symbol that the order was put on.
*/
private String symbol;
/**
* Order id.
*/
private Long orderId;
/**
* Order id.
*/
private Long orderListId;
/**
* Client order id.
*/
private String clientOrderId;
/**
* Price.
*/
private String price;
/**
* Original quantity.
*/
private String origQty;
/**
* Original quantity.
*/
private String executedQty;
/**
* Order status.
*/
private OrderStatus status;
/**
* Time in force to indicate how long will the order remain active.
*/
private TimeInForce timeInForce;
/**
* Type of order.
*/
private OrderType type;
/**
* Buy/Sell order side.
*/
private OrderSide side;
/**
* Used with stop orders.
*/
private String stopPrice;
/**
* Used with iceberg orders.
*/
private String icebergQty;
/**
* Order timestamp.
*/
private long time;
/**
* Used to calculate the average price
*/
private String cummulativeQuoteQty;
/**
* Update timestamp.
*/
private long updateTime;
/**
* Is working.
*/
@JsonProperty("isWorking")
private boolean working;
/**
* Original quote order quantity.
*/
private String origQuoteOrderQty;
public String getSymbol() {
return symbol;
}
public void setSymbol(String symbol) {
this.symbol = symbol;
}
public Long getOrderId() {
return orderId;
}
public void setOrderId(Long orderId) {
this.orderId = orderId;
}
public String getClientOrderId() {
return clientOrderId;
}
public void setClientOrderId(String clientOrderId) {
this.clientOrderId = clientOrderId;
}
public String getPrice() {
return price;
}
public void setPrice(String price) {
this.price = price;
}
public String getOrigQty() {
return origQty;
}
public void setOrigQty(String origQty) {
this.origQty = origQty;
}
public String getExecutedQty() {
return executedQty;
}
public void setExecutedQty(String executedQty) {
this.executedQty = executedQty;
}
public OrderStatus getStatus() {
return status;
}
public void setStatus(OrderStatus status) {
this.status = status;
}
public TimeInForce getTimeInForce() {
return timeInForce;
}
public void setTimeInForce(TimeInForce timeInForce) {
this.timeInForce = timeInForce;
}
public OrderType getType() {
return type;
}
public void setType(OrderType type) {
this.type = type;
}
public OrderSide getSide() {
return side;
}
public void setSide(OrderSide side) {
this.side = side;
}
public String getStopPrice() {
return stopPrice;
}
public void setStopPrice(String stopPrice) {
this.stopPrice = stopPrice;
}
public String getIcebergQty() {
return icebergQty;
}
public void setIcebergQty(String icebergQty) {
this.icebergQty = icebergQty;
}
public long getTime() {
return time;
}
public void setTime(long time) {
this.time = time;
}
public String getCummulativeQuoteQty() {
return cummulativeQuoteQty;
}
public void setCummulativeQuoteQty(String cummulativeQuoteQty) {
this.cummulativeQuoteQty = cummulativeQuoteQty;
}
public long getUpdateTime() {
return updateTime;
}
public void setUpdateTime(long updateTime) {
this.updateTime = updateTime;
}
public boolean isWorking() {
return working;
}
public void setWorking(boolean working) {
this.working = working;
}
public String getOrigQuoteOrderQty() {
return origQuoteOrderQty;
}
public void setOrigQuoteOrderQty(String origQuoteOrderQty) {
this.origQuoteOrderQty = origQuoteOrderQty;
}
@Override
public String toString() {
return new ToStringBuilder(this, BinanceApiConstants.TO_STRING_BUILDER_STYLE)
.append("symbol", symbol)
.append("orderId", orderId)
.append("orderListId", orderId)
.append("clientOrderId", clientOrderId)
.append("price", price)
.append("origQty", origQty)
.append("executedQty", executedQty)
.append("status", status)
.append("timeInForce", timeInForce)
.append("type", type)
.append("side", side)
.append("stopPrice", stopPrice)
.append("icebergQty", icebergQty)
.append("time", time)
.append("cummulativeQuoteQty", cummulativeQuoteQty)
.append("updateTime", updateTime)
.append("isWorking", working)
.append("origQuoteOrderQty", origQuoteOrderQty)
.toString();
}
public Long getOrderListId() {
return orderListId;
}
public void setOrderListId(Long orderListId) {
this.orderListId = orderListId;
}
}