1
|
|
|
<?php |
2
|
|
|
namespace Carpenstar\ByBitAPI\Spot\Trade\OpenOrders\Request; |
3
|
|
|
|
4
|
|
|
use Carpenstar\ByBitAPI\Core\Objects\AbstractParameters; |
5
|
|
|
|
6
|
|
|
class OpenOrdersResponse extends AbstractParameters |
7
|
|
|
{ |
8
|
|
|
/** |
9
|
|
|
* Name of the trading pair |
10
|
|
|
* @var string $symbol |
11
|
|
|
*/ |
12
|
|
|
protected string $symbol; |
13
|
|
|
|
14
|
|
|
/** |
15
|
|
|
* Specify orderId to return all the orders that orderId of which are smaller than |
16
|
|
|
* this particular one for pagination purpose |
17
|
|
|
* @var int $orderId |
18
|
|
|
*/ |
19
|
|
|
protected int $orderId; |
20
|
|
|
|
21
|
|
|
/** |
22
|
|
|
* Limit for data size. [1, 500]. Default: 500 |
23
|
|
|
* @var int $limit |
24
|
|
|
*/ |
25
|
|
|
protected int $limit = 500; |
26
|
|
|
|
27
|
|
|
/** |
28
|
|
|
* Order category. 0:normal order by default; 1:TP/SL order, Required for TP/SL order. |
29
|
|
|
* @var int $orderCategory |
30
|
|
|
*/ |
31
|
|
|
protected int $orderCategory; |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* @param string $symbol |
35
|
|
|
* @return $this |
36
|
|
|
*/ |
37
|
|
|
public function setSymbol(string $symbol): self |
38
|
|
|
{ |
39
|
|
|
$this->symbol = $symbol; |
40
|
|
|
return $this; |
41
|
|
|
} |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* @return string |
45
|
|
|
*/ |
46
|
|
|
public function getSymbol(): string |
47
|
|
|
{ |
48
|
|
|
return $this->symbol; |
49
|
|
|
} |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* @param int $orderId |
53
|
|
|
* @return OpenOrdersResponse |
54
|
|
|
*/ |
55
|
|
|
public function setOrderId(int $orderId): self |
56
|
|
|
{ |
57
|
|
|
$this->orderId = $orderId; |
58
|
|
|
return $this; |
59
|
|
|
} |
60
|
|
|
|
61
|
|
|
/** |
62
|
|
|
* @return int |
63
|
|
|
*/ |
64
|
|
|
public function getOrderId(): int |
65
|
|
|
{ |
66
|
|
|
return $this->orderId; |
67
|
|
|
} |
68
|
|
|
|
69
|
|
|
/** |
70
|
|
|
* @param int $limit |
71
|
|
|
* @return OpenOrdersResponse |
72
|
|
|
*/ |
73
|
|
|
public function setLimit(int $limit): self |
74
|
|
|
{ |
75
|
|
|
$this->limit = $limit; |
76
|
|
|
return $this; |
77
|
|
|
} |
78
|
|
|
|
79
|
|
|
/** |
80
|
|
|
* @return int |
81
|
|
|
*/ |
82
|
|
|
public function getLimit(): int |
83
|
|
|
{ |
84
|
|
|
return $this->limit; |
85
|
|
|
} |
86
|
|
|
|
87
|
|
|
/** |
88
|
|
|
* @param int $orderCategory |
89
|
|
|
* @return OpenOrdersResponse |
90
|
|
|
*/ |
91
|
|
|
public function setOrderCategory(int $orderCategory): self |
92
|
|
|
{ |
93
|
|
|
$this->orderCategory = $orderCategory; |
94
|
|
|
return $this; |
95
|
|
|
} |
96
|
|
|
|
97
|
|
|
/** |
98
|
|
|
* @return int |
99
|
|
|
*/ |
100
|
|
|
public function getOrderCategory(): int |
101
|
|
|
{ |
102
|
|
|
return $this->orderCategory; |
103
|
|
|
} |
104
|
|
|
} |