Total Complexity | 6 |
Total Lines | 120 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
21 | class OrderTrade extends AbstractResponse |
||
22 | { |
||
23 | use DateTrait; |
||
24 | |||
25 | public const TYPE_SELL = 'sell'; |
||
26 | public const TYPE_BUY = 'buy'; |
||
27 | |||
28 | public const TYPES = [ |
||
29 | self::TYPE_SELL, |
||
30 | self::TYPE_BUY, |
||
31 | ]; |
||
32 | |||
33 | /** |
||
34 | * Example: 20825863 |
||
35 | * |
||
36 | * @var int |
||
37 | */ |
||
38 | public $globalTradeId; |
||
39 | |||
40 | /** |
||
41 | * Example: 147142 |
||
42 | * |
||
43 | * @var int |
||
44 | */ |
||
45 | public $tradeId; |
||
46 | |||
47 | /** |
||
48 | * Example: "BTC_XVC" |
||
49 | * |
||
50 | * @var string |
||
51 | */ |
||
52 | public $currencyPair; |
||
53 | |||
54 | /** |
||
55 | * Example: "buy" |
||
56 | * |
||
57 | * @var string |
||
58 | */ |
||
59 | public $type; |
||
60 | |||
61 | /** |
||
62 | * Example: "0.00018500" |
||
63 | * |
||
64 | * @var float |
||
65 | */ |
||
66 | public $rate; |
||
67 | |||
68 | /** |
||
69 | * Example: "455.34206390" |
||
70 | * |
||
71 | * @var float |
||
72 | */ |
||
73 | public $amount; |
||
74 | |||
75 | /** |
||
76 | * Example: "0.08423828" |
||
77 | * |
||
78 | * @var float |
||
79 | */ |
||
80 | public $total; |
||
81 | |||
82 | /** |
||
83 | * Example: "0.00200000" |
||
84 | * |
||
85 | * @var float |
||
86 | */ |
||
87 | public $fee; |
||
88 | |||
89 | /** |
||
90 | * @internal |
||
91 | * @param int $globalTradeId |
||
92 | */ |
||
93 | public function setGlobalTradeId(int $globalTradeId): void |
||
94 | { |
||
95 | $this->globalTradeId = $globalTradeId; |
||
96 | } |
||
97 | |||
98 | /** |
||
99 | * @internal |
||
100 | * @param int $tradeId |
||
101 | */ |
||
102 | public function setTradeId(int $tradeId): void |
||
103 | { |
||
104 | $this->tradeId = $tradeId; |
||
105 | } |
||
106 | |||
107 | /** |
||
108 | * @internal |
||
109 | * @param float $rate |
||
110 | */ |
||
111 | public function setRate(float $rate): void |
||
112 | { |
||
113 | $this->rate = $rate; |
||
114 | } |
||
115 | |||
116 | /** |
||
117 | * @internal |
||
118 | * @param float $amount |
||
119 | */ |
||
120 | public function setAmount(float $amount): void |
||
123 | } |
||
124 | |||
125 | /** |
||
126 | * @internal |
||
127 | * @param float $total |
||
128 | */ |
||
129 | public function setTotal(float $total): void |
||
132 | } |
||
133 | |||
134 | /** |
||
135 | * @internal |
||
136 | * @param float $fee |
||
137 | */ |
||
138 | public function setFee(float $fee): void |
||
141 | } |
||
142 | } |