-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBTCETrade.cpp
43 lines (36 loc) · 966 Bytes
/
BTCETrade.cpp
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
#include "BTCETrade.h"
BTCETrade::BTCETrade(const QJsonValue &amount, const QJsonValue &date,
const QJsonValue &price, const QJsonValue &tid,
const QJsonValue &tradeType)
: amount_(amount.toDouble()), date_(date.toInt()), price_(price.toDouble()),
tid_(tid.toInt()), tradeType_(tradeType.toString())
{}
BigDecimal BTCETrade::getAmount() const
{
return amount_;
}
long BTCETrade::getDate() const
{
return date_;
}
BigDecimal BTCETrade::getPrice() const
{
return price_;
}
long BTCETrade::getTid() const
{
return tid_;
}
String BTCETrade::getTradeType() const
{
return tradeType_;
}
String BTCETrade::toString() const
{
return "BTCETrade [amount=" + QString::number(amount_)
+ ", timestamp=" + QString::number(date_)
+ ", price=" + QString::number(price_)
+ ", tid=" + QString::number(tid_)
+ ", type=" + tradeType_
+ "]";
}