-
Notifications
You must be signed in to change notification settings - Fork 0
/
trade.h
37 lines (30 loc) · 883 Bytes
/
trade.h
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
#ifndef TRADE_H
#define TRADE_H
#include "types.h"
#include "order.h"
#include "currencypair.h"
class Trade
{
public:
Trade(Order::OrderType type, BigDecimal tradableAmount, CurrencyPair currencyPair,
BigDecimal price, Date timestamp, String id, String orderId);
Order::OrderType getType() const;
BigDecimal getTradableAmount() const;
CurrencyPair getCurrencyPair() const;
BigDecimal getPrice() const;
Date getTimestamp() const;
String getId() const;
String getOrderId() const;
String toString() const;
bool operator==(const Trade& other) const;
bool operator!=(const Trade& other) const { return !(*this == other); };
private:
Order::OrderType type_;
BigDecimal tradableAmount_;
CurrencyPair currencyPair_;
BigDecimal price_;
Date timestamp_;
String id_;
String orderId_;
};
#endif // TRADE_H