-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathTrade.java
More file actions
39 lines (30 loc) · 1.1 KB
/
Copy pathTrade.java
File metadata and controls
39 lines (30 loc) · 1.1 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
package bittrex;
import java.math.BigDecimal;
import java.util.Date;
public class Trade {
public final OrderType ordeType;
public final BigDecimal quantity;
public final CurrencyPair pair;
public final BigDecimal price;
private final Date timeStamp;
public final String id;
public Trade(OrderType ordeType, BigDecimal quantity, CurrencyPair pair, BigDecimal price, Date timeStamp) {
this(ordeType, quantity, pair, price, timeStamp, null);
}
public Trade(OrderType ordeType, BigDecimal quantity, CurrencyPair pair, BigDecimal price, Date timeStamp, String id) {
this.ordeType = ordeType;
this.quantity = quantity;
this.pair = pair;
this.price = price;
this.timeStamp = timeStamp;
this.id = id;
}
public Date getTimeStamp() {
return new Date(timeStamp.getTime());
}
@Override
public String toString() {
return "Trade [ordeType=" + ordeType + ", quantity=" + quantity + ", pair=" + pair + ", price=" + price + ", timeStamp="
+ timeStamp + ", id=" + id + "]";
}
}