Skip to content

Commit fb62ad1

Browse files
authored
Merge pull request #26 from natercioluno/master
Fix MarketInfo min & max price field names
2 parents f6fc191 + fbb878f commit fb62ad1

File tree

3 files changed

+56
-49
lines changed

3 files changed

+56
-49
lines changed

src/Luno/AbstractClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212
abstract class AbstractClient
1313
{
14-
private static $version = "0.0.10";
14+
private static $version = "0.0.11";
1515
private static $defaultBaseURL = 'https://api.luno.com/';
1616
private static $defaultTimeoutSeconds = 10.0;
1717

src/Luno/Types/MarketInfo.php

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,6 @@
44

55
class MarketInfo
66
{
7-
/**
8-
* Maximum order price
9-
*/
10-
protected $MaxPrice;
11-
12-
/**
13-
* Minimum order price
14-
*/
15-
protected $MinPrice;
16-
177
/**
188
* Base currency code
199
*/
@@ -34,11 +24,21 @@ class MarketInfo
3424
*/
3525
protected $market_id;
3626

27+
/**
28+
* Maximum order price
29+
*/
30+
protected $max_price;
31+
3732
/**
3833
* Maximum order volume
3934
*/
4035
protected $max_volume;
4136

37+
/**
38+
* Minimum order price
39+
*/
40+
protected $min_price;
41+
4242
/**
4343
* Minimum order volume
4444
*/
@@ -67,44 +67,6 @@ class MarketInfo
6767
*/
6868
protected $volume_scale;
6969

70-
/**
71-
* @return float
72-
*/
73-
public function getMaxPrice(): float
74-
{
75-
if (!isset($this->MaxPrice)) {
76-
return 0;
77-
}
78-
return $this->MaxPrice;
79-
}
80-
81-
/**
82-
* @param float $MaxPrice
83-
*/
84-
public function setMaxPrice(float $MaxPrice)
85-
{
86-
$this->MaxPrice = $MaxPrice;
87-
}
88-
89-
/**
90-
* @return float
91-
*/
92-
public function getMinPrice(): float
93-
{
94-
if (!isset($this->MinPrice)) {
95-
return 0;
96-
}
97-
return $this->MinPrice;
98-
}
99-
100-
/**
101-
* @param float $MinPrice
102-
*/
103-
public function setMinPrice(float $MinPrice)
104-
{
105-
$this->MinPrice = $MinPrice;
106-
}
107-
10870
/**
10971
* @return string
11072
*/
@@ -181,6 +143,25 @@ public function setMarketId(string $marketId)
181143
$this->market_id = $marketId;
182144
}
183145

146+
/**
147+
* @return float
148+
*/
149+
public function getMaxPrice(): float
150+
{
151+
if (!isset($this->max_price)) {
152+
return 0;
153+
}
154+
return $this->max_price;
155+
}
156+
157+
/**
158+
* @param float $maxPrice
159+
*/
160+
public function setMaxPrice(float $maxPrice)
161+
{
162+
$this->max_price = $maxPrice;
163+
}
164+
184165
/**
185166
* @return float
186167
*/
@@ -200,6 +181,25 @@ public function setMaxVolume(float $maxVolume)
200181
$this->max_volume = $maxVolume;
201182
}
202183

184+
/**
185+
* @return float
186+
*/
187+
public function getMinPrice(): float
188+
{
189+
if (!isset($this->min_price)) {
190+
return 0;
191+
}
192+
return $this->min_price;
193+
}
194+
195+
/**
196+
* @param float $minPrice
197+
*/
198+
public function setMinPrice(float $minPrice)
199+
{
200+
$this->min_price = $minPrice;
201+
}
202+
203203
/**
204204
* @return float
205205
*/

src/Luno/Types/OrderBookEntry.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@
44

55
class OrderBookEntry
66
{
7+
/**
8+
* Limit price
9+
*/
710
protected $price;
11+
12+
/**
13+
* Volume available
14+
*/
815
protected $volume;
916

1017
/**

0 commit comments

Comments
 (0)