1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* This file is part of Poloniex PHP SDK. |
4
|
|
|
* |
5
|
|
|
* For the full copyright and license information, please view the LICENSE |
6
|
|
|
* file that was distributed with this source code. |
7
|
|
|
* |
8
|
|
|
* @copyright 2017-2018 Chasovskih Grisha <[email protected]> |
9
|
|
|
* @license https://github.com/signulls/poloniex-php-sdk/blob/master/LICENSE MIT |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
namespace Poloniex\Response\PublicApi; |
13
|
|
|
|
14
|
|
|
use Poloniex\Response\AbstractResponse; |
15
|
|
|
|
16
|
|
|
/** |
17
|
|
|
* Class Ticker |
18
|
|
|
* |
19
|
|
|
* @author Grisha Chasovskih <[email protected]> |
20
|
|
|
*/ |
21
|
|
|
class Ticker extends AbstractResponse |
22
|
|
|
{ |
23
|
|
|
/** |
24
|
|
|
* Example: BTC_ETH |
25
|
|
|
* |
26
|
|
|
* @var string |
27
|
|
|
*/ |
28
|
|
|
public $pair; |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* Example: 8 |
32
|
|
|
* |
33
|
|
|
* @var int |
34
|
|
|
*/ |
35
|
|
|
public $id; |
36
|
|
|
|
37
|
|
|
/** |
38
|
|
|
* Example: "0.00001356" |
39
|
|
|
* |
40
|
|
|
* @var float |
41
|
|
|
*/ |
42
|
|
|
public $last; |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* "0.00001359" |
46
|
|
|
* |
47
|
|
|
* @var float |
48
|
|
|
*/ |
49
|
|
|
public $lowestAsk; |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* "0.00001356" |
53
|
|
|
* |
54
|
|
|
* @var float |
55
|
|
|
*/ |
56
|
|
|
public $highestBid; |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* "-0.05373342" |
60
|
|
|
* |
61
|
|
|
* @var float |
62
|
|
|
*/ |
63
|
|
|
public $percentChange; |
64
|
|
|
|
65
|
|
|
/** |
66
|
|
|
* "5.68453100" |
67
|
|
|
* |
68
|
|
|
* @var float |
69
|
|
|
*/ |
70
|
|
|
public $baseVolume; |
71
|
|
|
|
72
|
|
|
/** |
73
|
|
|
* "401407.79462359" |
74
|
|
|
* |
75
|
|
|
* @var float |
76
|
|
|
*/ |
77
|
|
|
public $quoteVolume; |
78
|
|
|
|
79
|
|
|
/** |
80
|
|
|
* @var bool |
81
|
|
|
*/ |
82
|
|
|
public $isFrozen; |
83
|
|
|
|
84
|
|
|
/** |
85
|
|
|
* "0.00001495" |
86
|
|
|
* |
87
|
|
|
* @var float |
88
|
|
|
*/ |
89
|
|
|
public $high24hr; |
90
|
|
|
|
91
|
|
|
/** |
92
|
|
|
* "0.00001356" |
93
|
|
|
* |
94
|
|
|
* @var float |
95
|
|
|
*/ |
96
|
|
|
public $low24hr; |
97
|
|
|
|
98
|
|
|
/** |
99
|
|
|
* @internal |
100
|
|
|
* @param string $pair |
101
|
|
|
*/ |
102
|
|
|
public function setPair(string $pair): void |
103
|
|
|
{ |
104
|
|
|
$this->pair = $pair; |
105
|
|
|
} |
106
|
|
|
|
107
|
|
|
/** |
108
|
|
|
* @internal |
109
|
|
|
* @param int $id |
110
|
|
|
*/ |
111
|
|
|
public function setId(int $id): void |
112
|
|
|
{ |
113
|
|
|
$this->id = $id; |
114
|
|
|
} |
115
|
|
|
|
116
|
|
|
/** |
117
|
|
|
* @internal |
118
|
|
|
* @param float $last |
119
|
|
|
*/ |
120
|
|
|
public function setLast(float $last): void |
121
|
|
|
{ |
122
|
|
|
$this->last = $last; |
123
|
|
|
} |
124
|
|
|
|
125
|
|
|
/** |
126
|
|
|
* @internal |
127
|
|
|
* @param float $lowestAsk |
128
|
|
|
*/ |
129
|
|
|
public function setLowestAsk(float $lowestAsk): void |
130
|
|
|
{ |
131
|
|
|
$this->lowestAsk = $lowestAsk; |
132
|
|
|
} |
133
|
|
|
|
134
|
|
|
/** |
135
|
|
|
* @internal |
136
|
|
|
* @param float $highestBid |
137
|
|
|
*/ |
138
|
|
|
public function setHighestBid(float $highestBid): void |
139
|
|
|
{ |
140
|
|
|
$this->highestBid = $highestBid; |
141
|
|
|
} |
142
|
|
|
|
143
|
|
|
/** |
144
|
|
|
* @internal |
145
|
|
|
* @param float $percentChange |
146
|
|
|
*/ |
147
|
|
|
public function setPercentChange(float $percentChange): void |
148
|
|
|
{ |
149
|
|
|
$this->percentChange = $percentChange; |
150
|
|
|
} |
151
|
|
|
|
152
|
|
|
/** |
153
|
|
|
* @internal |
154
|
|
|
* @param float $baseVolume |
155
|
|
|
*/ |
156
|
|
|
public function setBaseVolume(float $baseVolume): void |
157
|
|
|
{ |
158
|
|
|
$this->baseVolume = $baseVolume; |
159
|
|
|
} |
160
|
|
|
|
161
|
|
|
/** |
162
|
|
|
* @internal |
163
|
|
|
* @param float $quoteVolume |
164
|
|
|
*/ |
165
|
|
|
public function setQuoteVolume(float $quoteVolume): void |
166
|
|
|
{ |
167
|
|
|
$this->quoteVolume = $quoteVolume; |
168
|
|
|
} |
169
|
|
|
|
170
|
|
|
/** |
171
|
|
|
* @internal |
172
|
|
|
* @param bool $isFrozen |
173
|
|
|
*/ |
174
|
|
|
public function setIsFrozen(bool $isFrozen): void |
175
|
|
|
{ |
176
|
|
|
$this->isFrozen = $isFrozen; |
177
|
|
|
} |
178
|
|
|
|
179
|
|
|
/** |
180
|
|
|
* @internal |
181
|
|
|
* @param float $high24hr |
182
|
|
|
*/ |
183
|
|
|
public function setHigh24hr(float $high24hr): void |
184
|
|
|
{ |
185
|
|
|
$this->high24hr = $high24hr; |
186
|
|
|
} |
187
|
|
|
|
188
|
|
|
/** |
189
|
|
|
* @internal |
190
|
|
|
* @param float $low24hr |
191
|
|
|
*/ |
192
|
|
|
public function setLow24hr(float $low24hr): void |
193
|
|
|
{ |
194
|
|
|
$this->low24hr = $low24hr; |
195
|
|
|
} |
196
|
|
|
} |